Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 08:10 am EST
Geeklog Forums
Tabular Dynamics Tab Issue
Hey there,
I'm working on tweaking the Tabular Dynamics theme for my site (www.jeffandcrystal.com). One of the things I'm trying to do is to edit the acutal tabs across the top of the page that link to different sections of the site. One of the tabs is setup to direct to a specific article/story section (Julia's News). The problem is that the code in the header.thtml page for Tabular Dynamics seems to cause a problem.
Here's what I see:
if ($_SERVER['PHP_SELF'] == "/index.php") {
print '<a href="{site_url}/" class="selected">home</a><span class="netscape4"> </span>';
} else {
print '<a href="{site_url}/" class="plain">home</a><span class="netscape4"> </span>';
}
if ($_SERVER['PHP_SELF'] == "/index.php?topic=Julia") {
print '<a href="{site_url}/index.php?topic=Julia" class="selected">julia's page</a><span class="netscape4"> </span>';
} else {
print '<a href="{site_url}/index.php?topic=Julia" class="plain">julia's page</a><span class="netscape4"> </span>';
}
So, you can see that the Julia's News tab is looking for the same PHP page (index.php) and thus wont have the tab show up as colored when selected.
What I'm trying to figure out is what is the PHP variable for the actual page? That way I can say:
instead of:
Any thoughts?
Thanks!
Jeff.
I'm working on tweaking the Tabular Dynamics theme for my site (www.jeffandcrystal.com). One of the things I'm trying to do is to edit the acutal tabs across the top of the page that link to different sections of the site. One of the tabs is setup to direct to a specific article/story section (Julia's News). The problem is that the code in the header.thtml page for Tabular Dynamics seems to cause a problem.
Here's what I see:
Text Formatted Code
<?phpif ($_SERVER['PHP_SELF'] == "/index.php") {
print '<a href="{site_url}/" class="selected">home</a><span class="netscape4"> </span>';
} else {
print '<a href="{site_url}/" class="plain">home</a><span class="netscape4"> </span>';
}
if ($_SERVER['PHP_SELF'] == "/index.php?topic=Julia") {
print '<a href="{site_url}/index.php?topic=Julia" class="selected">julia's page</a><span class="netscape4"> </span>';
} else {
print '<a href="{site_url}/index.php?topic=Julia" class="plain">julia's page</a><span class="netscape4"> </span>';
}
So, you can see that the Julia's News tab is looking for the same PHP page (index.php) and thus wont have the tab show up as colored when selected.
What I'm trying to figure out is what is the PHP variable for the actual page? That way I can say:
Text Formatted Code
if (PHP.Page.Variable == "/index.php?topic=Julia")instead of:
Text Formatted Code
if ($_SERVER['PHP_SELF'] == "/index.php?topic=Julia")Any thoughts?
Thanks!
Jeff.
18
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
There is no single PHP variable that holds the current URL with all parameters.
We have the same problem in Geeklog itself, actually. Our solution is the function COM_getCurrentURL in lib-common.php. It's somewhat hackish, but seems to do the job ...
bye, Dirk
We have the same problem in Geeklog itself, actually. Our solution is the function COM_getCurrentURL in lib-common.php. It's somewhat hackish, but seems to do the job ...
bye, Dirk
15
10
Quote
ahh, yeah that works wonders! Now, all I need to do is ensure that anyone who goes to my base URL (http://www.jeffandcrystal.com) gets sent to (http://www.jeffandcrystal.com/index.php). Is there a way to do that? Something in config.php?
15
12
Quote
ok, the heck with my previous post. I found a way around that. Now, my new stumbling-block (don't act surprised, I find them, or rather they find me all the time) is to figure out what the PHP tag/variable is for the user groups. I want to show something within the TabularDynamics theme but only to a specific User Group.
Anyone know what variable I should be referencing?
Any help would be greatly appreciated, thanks!
Jeff.
Anyone know what variable I should be referencing?
Any help would be greatly appreciated, thanks!
Jeff.
9
10
Quote
dang, I just need to do some digging before I post here... sorry.
I found what I was looking for:
if (SEC_hasRights ('link.edit'))
I'm starting to get a hang of Geeklog, Unix, PHP and all this craziness that goes along with maintaining a CMS-based website. Thanks to all those out there in GeeklogLand who've helped so far...
Cheers!
I found what I was looking for:
if (SEC_hasRights ('link.edit'))
I'm starting to get a hang of Geeklog, Unix, PHP and all this craziness that goes along with maintaining a CMS-based website. Thanks to all those out there in GeeklogLand who've helped so far...
Cheers!
15
11
Quote
All times are EST. The time is now 08:10 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content