Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:01 pm EDT

Geeklog Forums

Tabular Dynamics Tab Issue


Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
determined
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:
Text Formatted Code
<?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:
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.
 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
 Quote

Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
cold
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?
 Quote

Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
awake
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.
 Quote

Status: offline

jbpaul17

Forum User
Chatty
Registered: 05/14/04
Posts: 49
Location:New York City
cheerful
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!
 Quote

All times are EDT. The time is now 06:01 pm.

  • 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