- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
- Adding Custom Online Locations (per pagine extra forum) come?
-
Adding Custom Online Locations (per pagine extra forum) come?
Per aggiungere alla pagina who's online la righetta di dove il nostro utente sta navigando in una pagina custom del forum è necessario usare questi code:
If you want Who's Online to reflect your new custom page when someone is browsing it (rather than Unknown Location), do the following steps:
-
Open AdminCP.
-
Plugin System -> Add New Plugin
-
Fill in the following:
Code:
Product: vBulletin
Hook Location: online_location_process
Title: My Custom Location (Part1)
Plugin PHP Code: if ($filename == 'test.php')
{
$userinfo['activity'] = 'test';
}
Plugin is Active: Yes -
Click Save.
-
Plugin System -> Add New Plugin
-
Fill in the following:
Code:
Product: vBulletin
Hook Location: online_location_unknown
Title: My Custom Location (Part2)
Plugin PHP Code: if ($userinfo['activity'] == 'test')
{
$userinfo['action'] = 'Viewing Test Page'; // you might wanna use a $vbphrase here...
$userinfo['where'] = '<a href="./test.php?' . $vbulletin->session->vars['sessionurl'] . '">This is My Test Page</a>'; // you might wanna use a $vbphrase here...
$handled = true;
}
Plugin is Active: Yes -
In each of the above two, make sure to change "test" values to your own.
-
Note that $userinfo['where'] is optional. It can be controlled with a usergroup permission "can view detailed location".
La mia domanda è la seguente:
e per una pagina esterna al forum come devo modificare i plugin sopra?Per esempio per la pagina:
skiforum.it/resources/index.html
-
-
Credo sarebbe possibile solo in una pagina php e dicendo allo script come collegarsi al database del forum.
Per sapere come fare ti consiglio di chiedere direttamente in sezione php e mysql e magari tornare quì per condividere i risultati

-
if ($filename == 'test.php')
Se voglio "osservare" una pagina esterna alla cartella del forum cosa devo mettere?if ($filename == 'resources/index.html') { $userinfo['activity'] = 'resources'; }Non mi funziona e nemmeno
../resources/index.html
e nemmeno
./resources/index.htmlIl forum si trova in
/forum/Come devo fare?
-
Ti ho consigliato di chiedere in sezione php e mysql proprio perchè non è il mio campo e non vorrei far danni
