Welcome to Geeklog, Anonymous Tuesday, December 10 2024 @ 03:42 pm EST

Geeklog Forums

Suggestion


Peregrine

Anonymous
On the geeklog site I've been working on, I've replaced the {menu_elements} with:

Text Formatted Code
                <table border="0" align="right">
                        <COLGROUP span="9" width="80*"></COLGROUP>
                        <tr align="center">
                                <td class="navigation-bar" onClick='window.location.href="/"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/">Home</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/gallery/"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/gallery/">Gallery</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/submit.php?type=story"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/submit.php?type=story">Post</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/links.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/links.php">Links</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/calendar.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/calendar.php">Calendar</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/search.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/search.php">Search</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/filemgmt/index.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/filemgmt/index.php">Downloads</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/forum/index.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/forum/index.php">Forums</a></td>
                                <td class="navigation-bar" onClick='window.location.href="/stats.php"' onMouseOver="this.style.backgroundColor='#2A2535'" onMouseOut="this.style.backgroundColor='#1E1929'"><a href="/stats.php">Site Info</a></td>
                <tr>
                </table>

 


What I wish was a way to use a function so I could only have that show once a user is logged in. Something like:

{ReqUserLogin}Home{/ReqUserLogin}

So what would happen in effect would be that the line would only be compiled into the page by geeklog if the user was logged in. As far as I can find, there is no way to do this.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
why not just edit the appropriate template files, e.g., menuitem.thtml, etc... Then you can control (via config.php) what links require a member to be logged in before it is displayed. It's all set up for this already--and without hardcoding your menu.

unless I've misunderstood what you are trying to accomplish.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
otherwise, any PHP in the header.thtml will be parsed so yes, you could just check if the current $_USER['uid'] is more than 1. or something like that
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Maybe {allowed_menu_elements} is what you're looking for?

bye, Dirk
 Quote

All times are EST. The time is now 03:42 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