PDA

View Full Version : Question about [HOW TO - vB4] Create your own vBulletin page


Vodkaholic
16 May 2010, 03:40
Instructions to Add your Page to the Who's Online List (WOL):
Create two plugins using the following hooks. Replace mypage and similar with your information.

1. hook location - online_location_process:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

.
2. hook location online_location_unknown:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

.
The colored part in the code above shows what you need to change in the plugins (both reds should be the same and both blues should be the same, whereas green can be whatever you want).
[/URL]

Hey i quoted this from your "[HOW TO - vB4] Create your own vBulletin page" but didnt want to ask on that Article because my question is to do with a None Vbulletin page

Can i use this code for adding a none Vbulletin page on 4.0?

case 'href="www.test.com'
Something like that?

Thanks

Lynne
16 May 2010, 04:31
Follow the hook_location "online_location_process" and find out what the switch is doing. It's looking at the location your user is at. And, that location is grabbed from the location field in the session table. If your users location is in there, then you can use it. If your user is somewhere where the location isn't entered into the session table, they you can't use it.

Vodkaholic
16 May 2010, 04:37
Follow the hook_location "online_location_process" and find out what the switch is doing. It's looking at the location your user is at. And, that location is grabbed from the location field in the session table. If your users location is in there, then you can use it. If your user is somewhere where the location isn't entered into the session table, they you can't use it.

Thanks i have never messed with Hooks before and no idea where to find them
Where would i search "online_location_process" or "hook_location" in the adminCP

Would it be the "Plugin System"?
Thanks

Lynne
16 May 2010, 04:39
Doesn't your text editor search files? I just plug in a word and ask it to do a search in my uploads directory. I couldn't code if I couldn't go look up hook locations (how else do you find what variables are available for use?). This particular hook is in the functions_online.php file.

Vodkaholic
16 May 2010, 04:41
Doesn't your text editor search files? No can you tell me which one you use please?

and you can search Within the files in your FTP?

Edit wow it does lol Thanks
i didnt even know it could do this Thank you !

Lynne
16 May 2010, 15:54
I use BBEdit, but it's for Macs.

Vodkaholic
17 May 2010, 04:27
All right hours trying (thought i could do it without asking your help again but here i am)

This is what i have done and where i am also stuck

I made this php script



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



And uploaded it to my root
I than added


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


To my none VB page

Than added these two in the plugin manager

online_location_proces


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



online_location_unknown


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Now on my whos online i see the user on my page But it says
Unknown Location
/extra_online_users.php

I just cant seem to get it to say "Viewing MAI-Wallpapers" and point to the URL
Anyone any ideas?

Thanks alot:D

Lynne
17 May 2010, 15:27
I don't think putting it in an iframe is going to work with this. Have you tried going to the page and then checking your location in the session table to see what it says? Like I said above, the location is in there and so you need to make sure it is correct in there or you can't use it.

Vodkaholic
17 May 2010, 16:33
I don't think putting it in an iframe is going to work with this. Have you tried going to the page and then checking your location in the session table to see what it says? Like I said above, the location is in there and so you need to make sure it is correct in there or you can't use it.

Hey
Yea ive been to the page and it says Unknown Location /extra_online_users.php in the whos-online

You say iframe might not work how would you add it if you was doing this?

Thanks Lynne your the best :up:

Lynne
17 May 2010, 20:03
Try changing these lines to not have the .php:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Also, did you make sure your plugins were turned on?

Vodkaholic
17 May 2010, 21:54
Try changing these lines to not have the .php:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Also, did you make sure your plugins were turned on?

Hey
I tryed without the .php same problem tho

here is a screeny of the "whos online"

117244

Thanks

Lynne
17 May 2010, 22:39
Have you looked to see exactly what is in the session table at all? and those plugins are active?

Vodkaholic
17 May 2010, 22:43
Have you looked to see exactly what is in the session table at all? I dont understand what you mean so ;/ No dont think i have.

and those plugins are active?
Yup there are Active

Lynne
17 May 2010, 22:50
I mean, have you actually looked at the session table in the database and seen what is in there - you need to see what information is in there. Also, is your custom page in the same directory as the vbulletin files? This won't work if it isn't.

Vodkaholic
17 May 2010, 23:22
Also, is your custom page in the same directory as the vbulletin files? This won't work if it isn't.

Oh wait yes the "extra_online_users.php" is in my Forum Dir
As for the database no i stay away from them they scare me :/

if this means i have to mess with SQL i guess ill have to forget the idea
I saw you tut and the other guys "whos online idea" and tryed to get it to work on 4.0

Thanks

Lynne
18 May 2010, 00:03
Wait a sec... why did you make this line like this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



It's supposed to just be:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Vodkaholic
18 May 2010, 00:15
Wait a sec... why did you make this line like this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



It's supposed to just be:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I was mixing codes from http://www.vbulletin.org/forum/showthread.php?t=157329&highlight=online

An i trying without == 'extra_online_users

Same results

Lynne
18 May 2010, 00:18
So exactly what is your code in those two plugins right now?

Vodkaholic
18 May 2010, 00:38
So exactly what is your code in those two plugins right now?


Product= vBulletin
Hook Location = online_location_process
Title = online_location_process


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Plugin is Active = Yes

Product= vBulletin
Hook Location = online_location_unknown
Title = online_location_unknown


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Plugin is Active = Yes

This is the two codes from the plugins
Thanks

Lynne
18 May 2010, 02:53
Whoops.... when I told you to change that one line and remove the .php from it, I meant the other one, not both. Sorry about that. For the first plugin, you need to have that in the case line:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Leave the second one as is. Now let's see if it works. (Again, sorry about that, I didn't look to see that the line was the same in two places.)

Vodkaholic
18 May 2010, 04:09
Whoops.... when I told you to change that one line and remove the .php from it, I meant the other one, not both. Sorry about that. For the first plugin, you need to have that in the case line:
Leave the second one as is. Now let's see if it works. (Again, sorry about that, I didn't look to see that the line was the same in two places.)

lol its not a problem at all hehe your helping me nothing to be sorry about :up:
Anyways, Good news it now shows
Viewing MAI-Wallpapers
MAI-Wallpapers

But the Url still showing /extra_online_users.php?
Soo close hehe

Vodkaholic
23 May 2010, 17:55
Well ive tryed and tryed i still cant get the Link to work

Anyone got any more ideas?

Thanks

Vodkaholic
01 Jun 2010, 13:35
Anyone know anymore why the last bit wont work >? so close to give up :D

Thanks

Vodkaholic
20 Jun 2010, 16:17
Bump :(

ChopSuey
20 Jun 2010, 16:45
If you want, you can PM me your XML and your template. I'll see what i can do.

Vodkaholic
20 Jun 2010, 16:51
If you want, you can PM me your XML and your template. I'll see what i can do.

Hey ChopSuey
Where is no XML mate or template
or i dont understand what you mean :confused:

p.s lmfao at your avy i remmber this dude from some time ago me and a made made a youtube (http://www.youtube.com/user/MyLittleWigger) account after he deleted his one :) so he is never lost

ChopSuey
20 Jun 2010, 16:54
Download your plugin for the WOL as an xml...that's what i meant.

Vodkaholic
20 Jun 2010, 17:00
Download your plugin for the WOL as an xml...that's what i meant.

http://www.vbulletin.org/forum/showpost.php?p=2038876&postcount=19
There is my two plugins mate :up:

ChopSuey
20 Jun 2010, 17:16
Try this for second one?



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Vodkaholic
20 Jun 2010, 17:28
Try this for second one?



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

Parse error: syntax error, unexpected ')' in /home/myanimeisland/public_html/includes/functions_online.php(1201) : eval()'d code on line 59

etc

ChopSuey
20 Jun 2010, 17:45
Okay here's the online_location_process



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



K now! For the second part online_unknown_location


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



;)

Replace your old code.

Vodkaholic
20 Jun 2010, 18:06
Okay here's the online_location_process



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



K now! For the second part online_unknown_location


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



;)

Replace your old code.

OH so close thanks
It shows right
But the URL points to

http://www.myanimeisland.com/extra_whos_online.php?

ChopSuey
20 Jun 2010, 18:16
Sorry
use this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



&



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I may warn you that it gives a little error when you go to the online.php page. Since its vB3 code.

Vodkaholic
20 Jun 2010, 18:23
Sorry
use this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



&



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I may warn you that it gives a little error when you go to the online.php page. Since its vB3 code.

Same as before mate when you click the "Viewing MAI Wallpapers" take me too
http://www.myanimeisland.com/extra_online_users.php
not the page there viewing

and aye its changed all my over links to "Unknown Location"

ChopSuey
20 Jun 2010, 18:25
I'm sorry i would help more but yet i don't have admincp access and would mess with the code more but i have other things to do.

Delete the plugin's that you just made. Also your page is blank.

Vodkaholic
20 Jun 2010, 18:34
I'm sorry i would help more but yet i don't have admincp access and would mess with the code more but i have other things to do.

Delete the plugin's that you just made. Also your page is blank.

Hmm i think am asking the wrong way

all i am trying to do is get my None Vbulletin pages to show in the Whosonline in vbulletin when a user is on them
maybe making that extra_online_users.php was a bad idea (there is nothing on it should be blank)

Thanks anyway :up:

DragonBlade
20 Jun 2010, 22:41
What is the URL to your wallpaper page

Vodkaholic
20 Jun 2010, 22:43
What is the URL to your wallpaper page

i cant link it its 18+
But here is one more i also need to show

http://www.myanimeisland.com/

miku <3

DragonBlade
20 Jun 2010, 23:21
Right now, I'm trying to figure out if it can detect something else rather than file since you are using WP page URLs right?

Vodkaholic
20 Jun 2010, 23:37
Right now, I'm trying to figure out if it can detect something else rather than file since you are using WP page URLs right?

Yea i have 2 wordpress and 2 gallerys am trying to work with

Reeve of shinra
21 Jun 2010, 03:50
Just a gut feeling but I don't think your wordpress files are using the vb session table. If its not, then this code wont have anything to read.

$userinfo['where'] = '<a href="extra_online_users.php?'.$vbulletin->session->vars[sessionurl].'">MAI-Wallpapers</a>';

Vodkaholic
21 Jun 2010, 04:00
Just a gut feeling but I don't think your wordpress files are using the vb session table. If its not, then this code wont have anything to read.

$userinfo['where'] = '<a href="extra_online_users.php?'.$vbulletin->session->vars[sessionurl].'">MAI-Wallpapers</a>';



hey Thanks
yea looks that way
this gives me

Unknown Location
/extra_online_users.php

and i was on page http://www.myanimeisland.com/music/new-vocaloid-character-sukone-tei/

looks like am trying to do something which cant be done :(

or is there a way to get them to use vb session tables :D