The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Backstory:
On every postbit/postbit_legacy I am displaying a 'Panic Button'. The Panic Button's purpose is to immediately take a user out of the forum to a 'safe' website. The website is: www.worksafeboredom.com thus you can probably understand the need to leave the site if say your boss shows up, coworker, etc. Well right now the URL for the button is Google.com just as a temp solution until I can get the custom user field working. Plan: I would like the Panic Button to link to the specific user's URL...and I sort of accomplished that. here's the code in my postbit_legacy: Code:
<if condition="$post[field5]"> <a href="$post[field5]" target="_self"><img src="$stylevar[imgdir_button]/panic.gif" alt="Click to Exit Quickly!" border="0" /></a> <else /> <a href="http://google.com" target="_self"><img src="$stylevar[imgdir_button]/panic.gif" alt="Click to Exit Quickly!" border="0" /></a> </if> as you know, and i have figured out, the custom user field changes per post, aka per user, so what's happening is each user's post contains their specific URL. Desired Result: What I want to have happen is that every single Panic Button (irregardless of whose post it is attached to) to attach the current user's URL. Example: My URL is www.emptythecup.com, if I go to click on Foo's panic button I want to be taken to emptythecup.com NOT his URL of vB.org. Does that make sense? I somehow need to qualify the $post[field5] to be specific to the logged in user...and this is what I don't know how to do ![]() Here's the thread I originally made before I realized the problem I had created for myself ![]() ![]() http://www.worksafeboredom.com/forum...=5663#post5663 Thank you, John |
#2
|
|||
|
|||
![]()
You would use $vbulletin->userinfo['field5'] in that case as that would use the members panic address instead of Foo's address.
|
#3
|
|||
|
|||
![]() Code:
$bbuserinfo[field5] |
#4
|
|||
|
|||
![]()
are you sure about that? I thought it was changed to be used how I suggested in a template or I am mixing up my files with my templates?
|
#5
|
||||
|
||||
![]() Quote:
![]() ![]() Quote:
![]() |
#6
|
|||
|
|||
![]() Quote:
Easy mistake to make though when you are working with both a lot. |
#7
|
|||
|
|||
![]()
yeah, my bad, sorry. I'll try to make sure that doesn't happen. Been working with templates and files all day and all week. lol
Cheers mate |
#8
|
|||
|
|||
![]()
[high]* Guest210212002 just wants to say that this is a great idea.
![]() [/high] It'd be ideal if it only displayed in your own postbit. |
#9
|
|||
|
|||
![]()
well the panic button would be useless then, if your viewing someone elses thread and your panic button was the only one that would work for you then you would have to find a thread you posted in.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|