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: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 276
  • Total: 276

Is it possible?

Started by Jokey, January 27, 2009, 05:50:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jokey

Is it possible to put the logout, admin, and help links in the User box??  ???

Crip

Where is Your Themes User Box Located?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



JPDeni

Quote from: p v c blue on January 27, 2009, 05:50:31 AM
Is it possible to put the logout, admin, and help links in the User box??  ???

Yes.

nevoomatse

Quote from: JPDeni on January 27, 2009, 03:00:41 PM
Quote from: p v c blue on January 27, 2009, 05:50:31 AM
Is it possible to put the logout, admin, and help links in the User box??  ???

Yes.

Quite useful to make the "navigation bar" clean.
Can be done by editing ./Themes/default/TPBlocks.template.php under "function TPortal_userbox()".

Jokey

Quote from: Crip on January 27, 2009, 10:37:16 AM
Where is Your Themes User Box Located?

Hey Crip in the usual place - ./Themes/default/TPBlocks.template.php

I just don't know what to put in it to make it happen, LOL! You know me, all graphic and no code!  :laugh:

Jokey

So does anyone know what to add to make it do this?  :-\

JPDeni

For logout:


if ($context['user']['is_logged'])
          echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>';


For admin:


if ($context['allow_admin'])
          echo '<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>';


For help:


echo '<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>';


Be sure to have $scripturl, $txt, and $context in your "global" line.

All of these are from the default index.template.php file.

This website is proudly hosted on Crocweb Cloud Website Hosting.