Hi Guys,
I've been using greybox on some static pages for a while, and now wish
to use the same type of links in some dynamic output from a simple PHP
script I have.
The affected PHP statement is as follows:
print("<div class=\"tablerow80\"><a href=\"index.php?
p=viewplayer&userid=" . $data[userID] . "\" title=\"" . $data[name] .
"\" rel=\"gb_page[700, 500]\">" . $data[name] . "</a></div>");
Ignoring all that funk, the output from this when viewed on the
webpage is as follows:
<div class="tablerow80">
<a href="index.php?p=viewplayer&userid=2" title="Theo Cooter"
rel="gb_page[700, 500]">Theo Cooter</a>
</div>
As far as I can see, there is no issue there, when I load that URL, it
loads fine. I've tried using the onload method of loading a page to no
avail. I've also tried making the URL absolute at this point but that
doesn't help either.
Is there something fundamental relating to perhaps things like using
query strings in links? or should this concept be fine?
If it's not something basic like it won't handle amphersands or
something like that, the only thing I can think of it paths. It may
help if I explain my site structure a little bit
/index.php
/includes/navcontroller.php
/includes/viewplayer.php
/scripts/playerscripts.php
/greybox/
What i do, is include the navcontroller file in the index file. The
index.php file acts as a template and is used in all pages.
The navcontroller takes the p variable from the query string and uses
a case statement to decide which page to include (nested include). In
this example, it would be including 'viewplayer.php'
The viewplayer.php page uses a require statement to pull in functions
from the playerscripts.php file, and those are used to generate the
HTML output.
I have left the installation links for .js and css files as the
default, because from the site root, they are purely in /greybox. They
read as below:
<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript"
src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet"
type="text/css" /
>
<script type="text/javascript">
var GB_ROOT_DIR = "http://www.my site.com/greybox/";
</script>
I wonder if i need to alter any of these paths to map out of perhaps
the includes or scripts folders instead of assuming that I will be
working from the site root.
Any ideas? I'm a little stuck on this one!
Cheers,
Doug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GreyBox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/greybox?hl=en
-~----------~----~----~----~------~----~------~--~---