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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 894
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 287
  • Total: 287

Creating new links

Started by spagetiokillers, December 08, 2012, 08:06:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spagetiokillers

I created new links on my forum in the navigation center and pointed them to some articles i made so the link extension is /index.php/page,1.html . Im trying to figure out what the action is here exactly so that while im viewing the page the button is selected instead of the home button. I am using v2.0.2, i hope this is enough information needed to help me.

Edit: for more information on this im looking for the action for this code


elseif ($context['current_action'] == 'page,1.html')
$current_action = 'Feautres';

IchBin

The $context['current_action'] variable is directly connected to what action=something in the URL is set to. So you can't check for 'page' in the same way, because it has nothing to do with what action is set to. So you just need to check for $_GET['page'].


if(isset($_GET['page']) && $_GET['page'] == 1)
{
    $current_action = 'features';
}

spagetiokillers

Quote from: IchBin™ on December 10, 2012, 03:36:34 AM
The $context['current_action'] variable is directly connected to what action=something in the URL is set to. So you can't check for 'page' in the same way, because it has nothing to do with what action is set to. So you just need to check for $_GET['page'].


if(isset($_GET['page']) && $_GET['page'] == 1)
{
    $current_action = 'features';
}


Yes i realized that it shouldnt have been action i just didnt know what would be used because it wasnt setup like page=1 so thats why i was confused. But thanks for the help i will try it in a moment to see if it works and ill get back to you thanks!

spagetiokillers

Alright it works im just having an issue with another mod now. making it show that a nonexistent button is selected even though the mod isnt installed anymore

This website is proudly hosted on Crocweb Cloud Website Hosting.