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: 374
  • Total: 374

Creating a Custom Who's Online Action

Started by technodragon73, March 22, 2006, 01:58:44 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

technodragon73

I originally posted this over at SMF but was subsequestly ignored...you guys here are excellent at replting...could you please help me?
Quote
I have searched all over this forum and while I have found snippets leading to this end I have found no solid expolanation on how to create/add a custom action to the who's online page.

I have several mods that when a member goes to them it says unknown action.

I understand that you go into I believe the who.template and add a whoall to the list, but it still does not work.  I have seen others say add a get action as well, but where?

If anyone could help me so I can get the who's online page to show when members are visiting those specific pages  Iwould greatly appreciate it.

I am using SMF 1.1RC2 and TPv0.8.6

ontap

#1
Quote
i understand that you go into I believe the who.template and add a whoall to the list, but it still does not work.  I have seen others say add a get action as well, but where?

If anyone could help me so I can get the who's online page to show when members are visiting those specific pages  Iwould greatly appreciate it.

you add online actions to "Modifications.english.php" or "Who.english.php",

Example: Going into TP Admin section,
on your users online it might say "Unkown action"..

just add this bit of code to Modifications.english.php
$txt['whoall_tpadmin'] = 'Viewing The TP Admin Pannel';

?action=arcade would be
$txt['whoall_arcade'] = 'Viewing The <a href="' . $scripturl . '?action=arcade">Arcade</a>';

your own action would be something like
$txt['whoall_actionhere'] = 'Text Here';

technodragon73

So I don't have to modify any other files but one of those two? 

And thank you so very much for aswering...everybody here is so awesome!

ontap

Quote from: technodragon73 on March 22, 2006, 02:34:10 AM
So I don't have to modify any other files but one of those two? 

nope, just add the action and it should work.  :)

technodragon73

#4
I just did...it is working wonderfully...again...thanks a million you are awesome!

Okay...then can you answer how to get that custom action to show in the link tree?

Right now when  Iclick on the button the link tree shows Hom, then forum, but not the action after it...ex: when you go to the arcade it shows, home, forum, arcade

TwinsX2Dad

Do you mean the forum button vanishes when you're in the forum and the home button goes away when you're on the home page, but both appear in the arcade?

I am confused.

technodragon73

Quote from: TwinsX2Dad on March 22, 2006, 06:42:50 AM
Do you mean the forum button vanishes when you're in the forum and the home button goes away when you're on the home page, but both appear in the arcade?

I am confused.

No, I the link tree...
Home
 |_Forum
 |_  |_(pagename)  <-----this is the part I want to know how to add as some pages don't show the title, just the first two parts

bloc

Any addon to the linktree variable is usually done in the source file - the file used for the custom action. Its done like this:

$context['linktree'][] = array('url' => 'yourlinkhere', 'name' => 'nameofthelink');

technodragon73

#8
Quote from: Bloc on March 22, 2006, 01:35:32 PM
Any addon to the linktree variable is usually done in the source file - the file used for the custom action. Its done like this:

$context['linktree'][] = array('url' => 'yourlinkhere', 'name' => 'nameofthelink');

Coolness...so is there any specific palce in the sorce file?  or does it just go any where after the globals call?

The reason I ask...is some of the files in question have two pars...a file.php and a file.template.php

ontap


This website is proudly hosted on Crocweb Cloud Website Hosting.