Custom Page voor Vb

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Stefano test

stefano test

27/02/2013 21:00:30
Quote Anchor link
Hello Hello,

Heb een website en een forum... ik wil op het forum kunnen zien wie op mijn site kijkt + waar precies dit kan doormiddel van:

http://www.vbulletin.org/forum/showthread.php?t=157329

Enigste Probleem dat ik nu heb is dat ik zon 5000 pagina's heb die ik wil toevoegen dit kan simpel door een Iframe in de footer van elke pagina

Alleen ik moet via een plugin aangeven voor elke pagina los: ( Dus zon 5000 plugins aanmaken lijkt me niet slim :P )

if ($userinfo['activity'] == 'extra_online_users')
{
$handled = true;
$userinfo['action'] = 'Viewing -your custom page title comes here-';//Hier de Pagina Titel
$userinfo['where'] = '<a href="http://-your custom page url comes here-">//Url here ofcourse
</a>';

Nou heb ik in de footer van elke "Pagina" wel een Scriptje staan dat de titel/link van elke pagina opzoekt en die dan Echoet doormiddel: Echo CurPageURL();

Maar dit werkt natuurlijk niet in de Plugin van vbulletin.... weet iemand een Quik fix?

Alvast Bedankt,

Stefano.
Gewijzigd op 27/02/2013 21:01:20 door Stefano test
 
PHP hulp

PHP hulp

24/04/2024 16:36:28
 
Frank Nietbelangrijk

Frank Nietbelangrijk

28/02/2013 00:07:41
Quote Anchor link
Stefano test op 27/02/2013 21:00:30:
Alleen ik moet via een plugin aangeven voor elke pagina los: ( Dus zon 5000 plugins aanmaken lijkt me niet slim :P )


Plugin? Plugin voor wat voor programma / framework of css?

p.s.
ik kan uit heel het verhaal maar weinig concreets halen..
 
Stefano test

stefano test

28/02/2013 02:21:56
Quote Anchor link
Sorry misschien wat onduidelijk overgekomen...

Ik heb een Vbulletin forum waar je een pagina hebt waar je kan zien wie er online is + welk topic ze bekijken

Ik heb ook een Website Geheel los van het forum, Doormiddel van een klein scriptje kan ik pagina's toevoegen aan die online lijst zonder dat ze iets te maken hebben met het forum.

Het probleem wat ik heb dit is een plugin voor het forum:

if ($userinfo['activity'] == 'extra_online_users')
{
$handled = true;
$userinfo['action'] = 'Viewing -your custom page title comes here-';//Hier de Pagina Titel
$userinfo['where'] = '<a href="http://-your custom page url comes here-">//Url here ofcourse
</a>';

Nou moet ik telkens als ik een pagina wil toevoegen aan die online lijst een nieuwe plugin maken met een TITEL en de URL dus straks heb ik 5000+ plugins.... is er een manier dat die TITEL en URL automatisch worden neergezet??

Ik post de Tut wel hier want meeste van jullie hebben geen vb license denk ik:

Step - 1

Create a page called 'extra_online_users.php'.

Copy these lines in it:
PHP Code:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);

$forumpath = 'yourforumpath';
//example = '/home/msxorg/public_html/forum'

chdir($forumpath);

$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once('./global.php');


exec_shut_down();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Extra Online Users</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="content-language" content="en" />
</head>
<body style="margin: 0px">
<!-- anything can be put here. a little image, some text, etc... or you may keep it like this -->
</body>
</html>
Save and upload this page to your domain or forum root.

Step - 2

Open your non-vbulletin page and copy these lines to the very bottom of your page:
(Note: Before </body>)

HTML Code:
<iframe src="http://www.yourdomain.com/extra_online_users.php" scrolling="no" allowtransparency="true" frameborder="0" width="0" height="0"></iframe>
Now, anybody visits your non-vbulletin page will be displayed at "Online Users".

But it will show their location as "Unknown Location". We can fix this of course.

Step - 3

Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin

Product: vBulletin
Hook Location: online_location_process
Title: Extra Online Users Process
Execution Order: 5

Code:
PHP Code:
if ($filename == 'extra_online_users.php')
{
$userinfo['activity'] = 'extra_online_users';
}
Save.

Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin

Product: vBulletin
Hook Location: online_location_unknown
Title: Extra Online Users Unknown
Execution Order: 5

Code:
PHP Code:
if ($userinfo['activity'] == 'extra_online_users')
{
$handled = true;
$userinfo['action'] = 'Viewing -your custom page title comes here-';
$userinfo['where'] = '<a href="http://-your custom page url comes here-">-your custom page title-</a>';
}
Save.

If you want to apply this tutorial for more than one page, just create another instance of "extra_online_users.php" and name it like "extra_online_users2.php".

Don't forget to add the lines to the plugins and make the name changes.

Toevoeging op 28/02/2013 21:43:13:

Iemand??? please??? :P
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.