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,970
  • Latest: bynw
Stats
  • Total Posts: 196,031
  • Total Topics: 21,335
  • Online today: 264
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 219
  • Total: 219

How do you do this??

Started by pvcblue, November 01, 2006, 01:41:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pvcblue

nope - neither of those show as active :(

IchBin

Post your code so I can see. The code I posted works on mine.

IchBin

Oops.... I looked at the wrong site when I confirmed my code. I apologize for that.

Try this:

// Edit Profile... [download]
if ($context['allow_edit_profile'])
echo ($current_action == 'dlmanager' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'dlmanager' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl">Download</a>
</td>' , $current_action == 'dlmanager' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


You don't need the tpmod added to the array as you did before because its already taken care of in the code following it in the index.template.php

Nokonium

That works as far as an active tab is concerned  :up:

But ..... it shows to peeps who don't have download permission.

IchBin

Well, I'm not sure about download. But I do know you can set it to show for only people with upload permissions.
Use this if statement instead
if(AllowedTo('tp_dlupload'))

Nokonium

I think this code is where TP permissions are read (I can't write code so I'm making a considered guess)

if ($context['TPortal']['show_download'])

Or is that checking if it is turned on?

pvcblue

YAE!!!!! IT WORKED!!! THANK YOU!!!!!!!!!!  :laugh: :laugh: :laugh: :laugh: :laugh:

borgBOB

As a lesson for others who may read this, can you post one last time the code that did work?

pvcblue

THE CODE THAT WORKED BY ICHBIN about 4-5 posts back,

Quote from: IchBinâ„¢ on November 03, 2006, 02:36:50 PM
Oops.... I looked at the wrong site when I confirmed my code. I apologize for that.

Try this:

// Edit Profile... [download]
if ($context['allow_edit_profile'])
echo ($current_action == 'dlmanager' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'dlmanager' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl">Download</a>
</td>' , $current_action == 'dlmanager' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


You don't need the tpmod added to the array as you did before because its already taken care of in the code following it in the index.template.php


This website is proudly hosted on Crocweb Cloud Website Hosting.