PDA

View Full Version : vBadvanced WOL



r_hippy
05-02-2010, 03:05 PM
First off I'm no coder by no means..

This is why this took me hours to get working by studing the plugins that I have installed from other mods..


Feel free to change what ever you like.
Feel free to use it in the next release


This bothered me that I would view WOL and see unknown location and a link to the home page / portal..

so I have a quick fix..
Go to Admincp>Plugin & Products>Add New Plugin
Create two plugins using the following hooks.

Product: vBadvanced CMPS
Hook Location: online_location_process
Title: vBadvanced CMPS WOL process

Plugin PHP Code : copy & paste from below


switch ($filename)
{
case 'adv_index.php':
$userinfo['activity'] = 'Home';
break;
}

Plugin is Active: yes

Save

Now go back to

Admincp>Plugin & Products>Add New Plugin

Product: vBadvanced CMPS
Hook Location: online_location_unknown
Title: vBadvanced CMPS WOL unknown

Plugin PHP Code : copy & paste from below


switch ($userinfo['activity'])
{
case 'Home':
$userinfo['where'] = '<a href="adv_index.php'.$vbulletin->session->vars[sessionurl].'">Home</a>';
$userinfo['action'] = "Viewing The Portal";
$handled = true;
break;
}

Plugin is Active: yes

Save

you can change home to what ever you want to call your vBadvanced page.. they have to be the same name in both plugins.

I use adv_index.php as my home page file name.
you will need to change that in both plugins to what ever you have yours named to.
"Viewing The Portal" and "Home" in vBadvanced CMPS WOL unknown plugin you can change to what ever you like as well..



here are a couple screen shots of before and after..
enjoy!

Sanphing
10-05-2011, 05:40 AM
work from me , thanks for tips ;)

Our Sponsors
 

r_hippy
10-05-2011, 04:29 PM
indeed.. your welcome
still working flawlessly for me as well..

enjoy

i.s.s.w
10-06-2011, 07:12 AM
enjoy

Our Sponsors
 

willisx719
11-04-2011, 10:53 AM
Didn't work for vB 4.1.7..

skaterag
11-09-2011, 04:04 PM
Thanks - working for me in vb 4.1.7 PL2

See: http://www.LinuxForum.com

r_hippy
01-05-2012, 09:59 PM
Didn't work for vB 4.1.7..

weird because it's still working even wit hthe 4.1.10 beta releases
check your work

cbiweb
01-18-2012, 10:27 AM
Works perfectly on 4.1.10. Thank you, this is exactly what I needed!

M.C.
02-17-2012, 01:14 PM
Am I wrong but this was working OK on 3.8.x version WITHOUT that plugin? I just checked my vb 3.8.7 and there no plugin needed, but why for vb4 do I need one?



"Viewing The Portal" and "Home" in vBadvanced CMPS WOL unknown plugin you can change to what ever you like as well..
well I can change it to phrase to be able to translate it but


Home

I can't change to phrase I want. It just don't parse phrase at all :(

r_hippy
02-17-2012, 10:08 PM
dunno .. what are you looking it to say ?

Peejay
03-03-2012, 08:51 AM
Excellent, many thanks, this was just what I was looking for :D

doctorsexy
04-04-2012, 03:14 PM
Works well with 4.1.11...thanks m8

r_hippy
04-04-2012, 06:07 PM
welcome

Amaury
05-30-2012, 10:32 PM
Hi, there. I'm an assistant administrator at KH-MediaFlare Forum (http://www.kh-mediaflare.net/forum.php), and I was wondering if this worked on vBulletin 4.2.0?

Here's a screenshot I took yesterday:

http://i101.photobucket.com/albums/m62/AmauryGarcia/UnknownLocation.png

That should say Viewing Page Home, although I'll probably edit it in the Phrase Manager so it says Viewing Homepage.

r_hippy
05-30-2012, 11:11 PM
yes

Amaury
05-30-2012, 11:15 PM
yes

Excellent. Thank you kindly.

Amaury
05-30-2012, 11:23 PM
That's odd. It's not working.

Edit: Here are screenshots:

http://i101.photobucket.com/albums/m62/AmauryGarcia/OnlineProcess.png

http://i101.photobucket.com/albums/m62/AmauryGarcia/OnlineUnknown.png

Edit 2: Fixed it. I was missing the file name.

Now, is there a way I can make it more specific? For example, we have a music archive that's part of our homepage, but instead of it saying Viewing Page Home, we would like it to say Viewing Page Music Archive.

r_hippy
05-31-2012, 05:20 PM
your Product is set to vBulletin Advanced CMS

needs to be set to
Product: vBadvanced CMPS

r_hippy
05-31-2012, 05:24 PM
[Now, is there a way I can make it more specific? For example, we have a music archive that's part of our homepage, but instead of it saying Viewing Page Home, we would like it to say Viewing Page Music Archive.

edit the colored text in the code in the first post to your liking
example



switch ($userinfo['activity'])
{
case 'Home':
$userinfo['where'] = '<a href="adv_index.php'.$vbulletin->session->vars[sessionurl].'">Music Archive</a>';
$userinfo['action'] = "Viewing Page Music Archive";
$handled = true;
break;
}




switch ($filename)
{
case 'adv_index.php':
$userinfo['activity'] = 'Music Archive';
break;
}

Amaury
05-31-2012, 05:27 PM
edit the colored text in the code in the first post to your liking
example



switch ($userinfo['activity'])
{
case 'Home':
$userinfo['where'] = '<a href="adv_index.php'.$vbulletin->session->vars[sessionurl].'">Music Archive</a>';
$userinfo['action'] = "Viewing Page Music Archive";
$handled = true;
break;
}




switch ($filename)
{
case 'adv_index.php':
$userinfo['activity'] = 'Music Archive';
break;
}

So create two more plugins (process and unknown) or add on to the one I already created for Viewing Page Home?

r_hippy
05-31-2012, 10:12 PM
it's one or the other...

Amaury
05-31-2012, 10:16 PM
it's one or the other...

I think I'll stay with Viewing Page Home, then.

Thanks for the help. :)

r_hippy
05-31-2012, 11:23 PM
Thanks so much...

welcome

kidc
06-23-2012, 01:04 AM
thanks...

works in 4.2.2

thecore762
08-07-2012, 10:47 PM
Is there a way to disable this?

r_hippy
08-09-2012, 05:24 PM
Is there a way to disable this?

start a new thread..for help with this matter

mike406
08-12-2012, 05:32 PM
Is there a way to use this with pages created with vBa?

Pages I have

/forums/home.php - I'd like to say Viewing Forum Home

But for /forums/home.php?pageid=radio - I'd like to say Listening to our Radio

If I follow the steps and make the plugins for home.php, it will apply the same Location to all ?pageid's. Is there a way around this?

too_cool_3
10-11-2012, 10:30 AM
Still working perfectly on vB 4.2. Very useful plugin, vBadvanced should include by default. Very easy to implement. Easy to use plugin. a+ Thanks r_hippy.

r_hippy
10-11-2012, 05:01 PM
welcome

dilbert05
10-11-2012, 11:32 PM
Terrific, thank you!

mike406
03-17-2013, 11:18 PM
Can this be tailored to specific pageid's?