Posted on: 01/08/06 04:57pm
By: jbpaul17
Hey there,
I'm working on tweaking the Tabular Dynamics theme for my site (
www.jeffandcrystal.com[*1] ). 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:
<?php
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:
if (PHP.Page.Variable == "/index.php?topic=Julia")
instead of:
if ($_SERVER['PHP_SELF'] == "/index.php?topic=Julia")
Any thoughts?
Thanks!
Jeff.
Tabular Dynamics Tab Issue
Posted on: 01/08/06 05:09pm
By: Dirk
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
Tabular Dynamics Tab Issue
Posted on: 01/09/06 02:27pm
By: jbpaul17
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?
Tabular Dynamics Tab Issue
Posted on: 01/09/06 11:52pm
By: jbpaul17
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.
Tabular Dynamics Tab Issue
Posted on: 01/10/06 12:00am
By: jbpaul17
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!