TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 744
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 397
  • Total: 397

Main Menu Tweaking ... little problem.

Started by Theberge43, May 10, 2006, 01:48:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theberge43

Hi, I'm tweaking my index.template.php file and I in a dead end on my Main Menu.
I've installed TinyPortal 0.8.6 on SMF 1.1 RC2.

I want to add the link for Downloads and Uploads in the menu, but I have a problem with the active tab.

1. I've added the links to 'Downloads' and 'Upload a file' without a problem.
2. When I click on the 'Downloads' link and get to the downloads page, the 'Downloads' tab is active.
3. When I click on the 'Upload a file' link and get to the upload page, the 'Downloads' tab is active.

I know it's a problem with this part of the code
if (isset($_GET['dl']))
$current_action = 'dlmanager';


You see the address for my the download page is : 'index.php?action=tpmod;dl=0'
And the address for my upload page is : 'index.php?action=tpmod;dl=upload'

They both have 'dl' in them, so when I'm in the Upload page, PHP thinks I'm in the Download page.
I need to add an 'if' so that it recognize that when I'm in the upload page I'm not in the Download page.

Hope you didn't get lost in my post ... I understand the problem, but my PHP knowledge is limited and I don't know how to fix it.

Thanks.

This website is proudly hosted on Crocweb Cloud Website Hosting.