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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 889
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 877
  • Total: 877

Current Action help fix..

Started by TestMonkey, January 30, 2007, 08:09:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TestMonkey

In the main index.template.php, to allow your menu's to still show "Help" as the current action when you're viewing the tinyportal help link/area you can add this code..

Find:

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}


Add After:

if ($context['current_action'] == 'tpmod' && $_REQUEST['sa'] == 'help')
$current_action = 'help';

IchBin

You may want to specify that this is for the TP help. :) The SMF help is already included in the array.

TestMonkey

Quote from: IchBinâ„¢ on January 30, 2007, 08:37:30 PM
You may want to specify that this is for the TP help. :) The SMF help is already included in the array.

I thought I did, this is for the default theme or any theme that uses the actions with the help button, by default the help button will become the active current action.. but if you click "tinyportal" while in the help area, their is no longer an active current action defined..
This fixes that, I tried to state that in the 1st sentance I posted.

Hope this clears it up for everyone..

IchBin

The way I read it, it didn't seem clear.

TestMonkey

#4
-bump-
Still not included in the default theme or babylon action array's for TP 0.98.
To cleafiy once again:
Once in the help area it should indicate this even if you are in the tinyportal help area..
It should all fall under help same as it does for the admin area's etc.

Fixes the default theme's menu uptop:

IchBin

In the template_menu function find this:
isset($_GET['dl'])

Add this above.
        if ($context['current_action'] == 'tpmod')
                $current_action = isset($_REQUEST['sa']) == 'help' ? 'help' : '';

This website is proudly hosted on Crocweb Cloud Website Hosting.