Jump to content


- - - - -

IP.Board 2.3: Using a greybox to display pop-up boxes


  • Please log in to reply
53 replies to this topic

#1 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 23 February 2009 - 02:18 PM

This is the support topic for the tutorial Using a greybox to display pop-up boxes.  Please post here if you have any questions or feedback.

#2 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 23 February 2009 - 03:26 PM

Guardsman wrote:

Quote

For some reason it doesn't want to work for me. Any link I create opens my home page (my portal) in the popup. Even this...

<a href="http://google.com/" title="Google" rel="gb_page[500, 500]">Launch Google.com</a>

... results in my portal being displayed in the popup window.


is it creating the grey box correctly? you get a greybox appearing to the size that you specify? if that is the case, it is an error with your actual URL.

Try using a fixed URL such as
<a href="www.mysite.com/index.php

and not a dynamic URL such as:
<a href="{$this->ipsclass->base_url}"act=idx rel="gb_page_fs[]">
there is some discussion that it needs to be a static URL, so try that.

if you copy/paste the google example, does it work?
is your greybox folder in your root directory?
is the gb_page file in that directory? try reuploading that file

also, reply with your link code you have done so I can see if it is anything obvious

#3 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 23 February 2009 - 03:35 PM

First thanks for the effors and sharing the tutorial with us.

RE: Greybox - I was following your instructions but was not able to get it working.

I've double checked all issues bit can't find any mistakes.
Maybe a path issue?

I've created th path like described.
The path url to the script is

/greybox/greybox/AJS.js


Is that right?

#4 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 23 February 2009 - 03:44 PM

View PostTom, on Feb 23 2009, 03:35 PM, said:

First thanks for the effors and sharing the tutorial with us.

RE: Greybox - I was following your instructions but was not able to get it working.

I've double checked all issues bit can't find any mistakes.
Maybe a path issue?

I've created th path like described.
The path url to the script is

/greybox/greybox/AJS.js


Is that right?

The path to your script should be

/greybox/ajs.js

assuming you have a greybox folder in your Cpanel's root directory as instructed

and, you're welcome ;)

#5 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 23 February 2009 - 03:48 PM

Guardsman wrote:

Quote

This exact link:
<a href="http://google.com/" title="Google" rel="gb_page[500, 500]">Launch Google.com</a>
...opens my home page in a greybox window (actually it opens in a window 50% of the time - the rest of the time it opens in a (non greybox) full default browser page).

I created a couple of html pages containing some basic information for my members and, because they wouldn't open when placed in a directory) dropped them in my forum root. I then used the same link format (ie):
<a href="http://mydomain.com/forum/infopage.html" title="Info" rel="gb_page[500, 500]">Basic Info</a>
... again, IF it opens in a greybox it displays my home page.

clutching at straws here, is there some other javascript in your board header and footer wrapper that could be conflicting? I occasionally have the link open in a new browser page and not in the greybox, but only occasionally.

Have you got any hotlink protection running through your cpanel, or a mod to prevent people accessing external links?

I think you may have to contact the greybox author to resolve this, I can only really post what I have done, I cant really offer support other than that as I do not know enough about it.

I just loaded the default google link (as above) in to my menu at the very bottom/left: http://www.autoxfactor.com/index.php
does it work correctly for you? If it does, that should eliminate any issues with your browser.

sorry I cant be much help, let me know how you get on

*edit*

couple of things I have found while writing a tutorial for this (link later once/if it has been approved).

1. make sure the javascript code goes immediately after <HEAD> and NOT </HEAD>
2. check and double check your URL is correct eg:
<script type="text/javascript">var GB_ROOT_DIR = "http://www.autoxfactor.com/greybox/";</script>
and it must be a 'hardcoded' URL not dynamic (such as)
{$this->ipsclass->base_url}
3. make sure the page is fully loaded before clicking on the link.

Richard

**I am happy to have a look at your 'view source' for your forum if you want to PM or post here your URL to see if its obvious from there**

#6 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 23 February 2009 - 05:39 PM

View PostRichardC, on Feb 23 2009, 11:44 AM, said:

The path to your script should be

/greybox/ajs.js

assuming you have a greybox folder in your Cpanel's root directory as instructed


RichardC, many thank's for assisting. I'd really like to get it running but i assume, that something is wrong with my server configuration.

My path structure is

-// root

/greybox/   {this is the folder you have described to create}
/greybox/greybox  {this is the folder I've upload the stuff = scripts}

#7 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 23 February 2009 - 06:09 PM

Could it be that the SEO Mod prevent that it works properly?

#8 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 23 February 2009 - 06:47 PM

View PostTom, on Feb 23 2009, 01:09 PM, said:

Could it be that the SEO Mod prevent that it works properly?

No, it can't.
I've created a greybox.html with the javascript + the Google Link which has been posted above.
Putting the html in the root and starting the URL doesnt work, so i guess the error is somewhere else

#9 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 01:26 AM

View PostTom, on Feb 23 2009, 05:39 PM, said:

View PostRichardC, on Feb 23 2009, 11:44 AM, said:

The path to your script should be

/greybox/ajs.js

assuming you have a greybox folder in your Cpanel's root directory as instructed


RichardC, many thank's for assisting. I'd really like to get it running but i assume, that something is wrong with my server configuration.

My path structure is

-// root

/greybox/   {this is the folder you have described to create}
/greybox/greybox  {this is the folder I've upload the stuff = scripts}

move the files from /greybox/greybox/
and put them in the /greybox/ folder eg: up one level

you uploaded the folder and contents instead of JUST the contents

#10 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 07:09 AM

View PostRichardC, on Feb 23 2009, 11:26 AM, said:

is the gb_page file in that directory?


RichardC, i'm a bit confused about that => gb_page <= because the greybox zip I've downloaded doesnt contain a file with such a name

these are the files which exist

gb_scripts.js
gb_styles.css
g_close.gif

#11 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 09:11 AM

Thats ok Tom, when you call for gb_page, it looks for the code inside the file gb_scripts.js
Attached File  greybox1.JPG   23.26K   1 downloads

all the files in that image should be in a folder called greybox in your server's root

incidentally (off topic) AJS_fx.js contains various javascript effects which may help you in your quest for an expanding menu
http://orangoo.com/A...ion/AJS_fx.html

#12 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 09:21 AM

That is so weired - the installation is such as simple, so what else could be the reason why it work?
Lightbox effect works in gallery, so it cant be any script issues.

I've trible checked the tutorial as well the manual at their website - no luck.
I'm so frustrated ....

#13 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 09:30 AM

post or pm me your board URL and I will  view source on your forum board index

#14 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 10:35 AM

View PostRichardC, on Feb 24 2009, 04:30 AM, said:

post or pm me your board URL and I will  view source on your forum board index


CPM

#15 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 01:29 PM

View PostTom, on Feb 24 2009, 10:35 AM, said:

View PostRichardC, on Feb 24 2009, 04:30 AM, said:

post or pm me your board URL and I will  view source on your forum board index


CPM

OK, I think its fixed.

It would appear that you need to upload ALL the files to your ROOT/greybox folder
but
ALSO upload some of the files to your FORUM-ROOT/greybox folder (eg: /community/greybox - in your case)

Tom, if you change your skin to the default IPB classic blue, then click on the 'My Friends' link, you should see it working ;)

Let me know that its all ok and I will update the tutorial

regards

Richard

#16 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 02:02 PM

View PostRichardC, on Feb 24 2009, 08:29 AM, said:

ALSO upload some of the files to your FORUM-ROOT/greybox folder (eg: /community/greybox - in your case)

Tom, if you change your skin to the default IPB classic blue, then click on the 'My Friends' link, you should see it working ;)

Let me know that its all ok and I will update the tutorial

Thanks so much RichardC - now it work and I know that not SEO or any other issues prevent a proper working

This works
<a href="{$this->ipsclass->base_url}act=profile&CODE=friends_list_popup" title="My Friends" rel="gb_page[600, 500]">{$this->ipsclass->lang['gbl_my_friends']}</a>

At the moment I have still some issues with plain URL which refers to external sources. That doesnt work for any reason.
But for the moment I'm very happy - the rest I guess I will achieve with try and error.


Million thanks RichardC!!!!

#17 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 02:13 PM

glad I could help, I will update the tutorial, meantime, I will delete the info I used to access your ACP/FTP etc

regards

Richard

#18 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 02:48 PM

RichardC, may I ask if this code starts Google within the GreyBox Popup on your server?

<a href="http://google.com/" title="Google" rel="gb_page[500, 500]">Launch Google.com</a>

I play a while with the settings, but without any success. The interal links seems to work (like my_friends shows above), but not the exteral

#19 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 24 February 2009 - 03:12 PM

View PostTom, on Feb 24 2009, 02:48 PM, said:

RichardC, may I ask if this code starts Google within the GreyBox Popup on your server?

<a href="http://google.com/" title="Google" rel="gb_page[500, 500]">Launch Google.com</a>

I play a while with the settings, but without any success. The interal links seems to work (like my_friends shows above), but not the exteral

yes the sample google link works fine, bearing in mind my forum is in the root directory mysite.com/index.php and not mysite.com/forums/index.php
I think the issues may all be to do with relative paths for the URLs.

try changing your rel= to
rel="greybox/gb_page[500, 500]"

I have no idea if it will work, but its got to be worth a try

#20 Tom

Tom

    Posting God

  • IM Supporters
  • PipPipPipPipPipPipPipPipPip
  • 1,541 posts
  • IPB Version:v2.3.x

Posted 24 February 2009 - 03:29 PM

View PostRichardC, on Feb 24 2009, 11:12 AM, said:

try changing your rel= to
rel="greybox/gb_page[500, 500]"

I have no idea if it will work, but its got to be worth a try


I've tried both

rel="greybox/gb_page[500, 500]"

and

rel="community/greybox/gb_page[500, 500]"

unfortunately without any success.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users