The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
getFieldValue or similar query
I'm looking to edit a template to display something if a user has checked a Radio Button (custom field) in their UserCP.
So what I'm looking for is how I could do this: Code:
<if condition="radiobuttonischeckedyes"> <script type="text/javascript"> <!-- window.location = "http://www.google.com/" //--> </script> </if> Thanks, Danny. --------------- Added [DATE]1256155121[/DATE] at [TIME]1256155121[/TIME] --------------- BUMP - any help? --------------- Added [DATE]1256165702[/DATE] at [TIME]1256165702[/TIME] --------------- Anyone? |
#2
|
|||
|
|||
Anyone?
|
#3
|
||||
|
||||
What template are you wanting to put it in? Search in the Articles forums for "profile*" in "titles only" and you should find an article on how to add user profile fields into the postbit templates.
|
#4
|
|||
|
|||
I think I got it, I added this to the PHP file for the portal (reason I was doing this):
Code:
<if condition="$post['field11'] == 'No'"> <script type="text/javascript"> window.location="redirectlocation.com" </script> </if> |
#5
|
||||
|
||||
That is not going to work in a php file, no, cuz it's html. That should work in a template though.
|
#6
|
|||
|
|||
It's outside of the <?php tag though.
|
#7
|
||||
|
||||
I don't think the condition will work unless it's in a template. That is a special type of vbulletin only condition - it isn't regular html. Try it and you'll see what happens.
|
#8
|
|||
|
|||
Wait, what if I changed the option in the ACP where it is "Change page type", what if I made it a template, and would it be accessible from there?
|
#9
|
||||
|
||||
Change page type? I have no idea what option you are talking about there.
|
#10
|
|||
|
|||
I'm using "vBadvanced CMPS", and there's an option to change page type in the ACP, and the options are "PHP", "HTML", "Template", and "BBCode", would changing the page type solve it?
--------------- Added [DATE]1256257017[/DATE] at [TIME]1256257017[/TIME] --------------- EDIT: I found the template for it, and the home template, I've added this script, however, should it go at the VERY top, or under the <html> tags, ect.? Code:
<if condition="$post['field11'] == 'No'"> <script type="text/javascript"> window.location="LINK" </script> </if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|