News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

add action in who page

Started by mrday, May 28, 2011, 10:49:15 AM

Previous topic - Next topic

mrday

smf version 1.1.13.
I have added some action to show in the who page.
For first I have defined the $txt to be show.
Code (Themes/default/languages/who.language.php) Select

$txt['whoall_homepage'] = 'sta guardando la <a href="">home</a>';
$txt['whoall_ocr'] = 'sta usando il servizio <a href="">ocr</a>';
$txt['whoall_faq'] = 'sta guardando le <a href="">faq</a>';
$txt['whoall_youtube2mp3'] = 'sta <a href="">trasformando un video di youtube in mp3</a>';

and then I added this code to the home.php(that is the same folder where index.php(forum) is).
Code (mysite/home.php) Select

$_GET['action'] = $_REQUEST["page"];
if ($_GET['action']==""){
$_GET['action'] = 'homepage';
}

Where the page variable can be ocr, faq or youtube2mp3 (is defined by site/home.php?page=ocr). now it works only for the homepage. I need to add something more?
Thanks

All Colours Sam

To be able to add a page to your Who page you must do this,


on your page, for example, on your ocr page  add this:


$_GET['page'] = 'ocr';
                 writeLog(true);


and then on your Who.language.php file add:



$txt['whoall_ocr'] = 'sta usando il servizio <a href="">ocr</a>';



the same applies to your other pages.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

mrday

Do you mean $_GET['action']? cause if I set $_GET['action'] in each page it works, don't know why if I did it dinamically it didn't works. Thank you

Advertisement: