• Bannato User Attivo

    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:

    1. Open AdminCP.

    2. Plugin System -> Add New Plugin

    3. 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

    4. Click Save.

    5. Plugin System -> Add New Plugin

    6. 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

    7. In each of the above two, make sure to change "test" values to your own.

    8. 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


  • Super User

    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 😉


  • Bannato User Attivo

    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.html

    Il forum si trova in
    /forum/

    Come devo fare?


  • Super User

    Ti ho consigliato di chiedere in sezione php e mysql proprio perchè non è il mio campo e non vorrei far danni 😉