The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
External Profile Links
I'm looking for the best way to add a profile link below some of my users "usernames" in their posts. These are not vB profile links but rather a link to an external webpage of their profile.
Here is exactly what I want to do. I want to add this button directly below the users avatar/img in the post bit. I would then like it linked to an external user profile using this code: Code:
<a href="http://website.com/users-profile" target="slideshow" onclick="window.open(this.getAttribute('href'), this.getAttribute('target'), 'width=770,height=800,scrollbars=yes,resizable=yes').focus(); return false;"></a> This button and code will only be available to members of a specific usergroup. Is there a way I can add a profile field that is visible/edible only by admin for each individual so that I can personally put this code into their profile. Then use the postbit template and put a conditional in there so that this button option is only for a specific usergroup and to pull the info from their profile field 5? If it's not possible for me to get access myself to their profile then I can email them the specific code I guess but would this work? If so can I get a step by step for the template and conditionals etc I need to edit? Thanks! |
#2
|
|||
|
|||
Really hoping to get this going. Thanks for looking : )
|
#3
|
||||
|
||||
You can make a User Profile Field and set it to not be editable by the user. Then you, the admin, can change it in the admincp.
Then, in the postbit, just put the html code in there and put a condition around it to only show it to usergroup xx. |
#4
|
|||
|
|||
How do I connect the button part? Through the link code like twitter badges or something just minus the script?
Thanks! |
#5
|
||||
|
||||
You mean what html to use?
HTML Code:
<a href="link.php"><img src="button.png" alt="" /></a> |
#6
|
|||
|
|||
Oh, ok. I'm a dope and was thinking this whole time that I needed to code a button separately and then attach it. I don't know... I'll try it and see what happens. I've had a splitting headache for 3 days strait now so nothing I'm saying or thinking makes much sense I guess. Sorry. I'll report back if it works out (surely it will).
Thanks again Lynne! |
#7
|
||||
|
||||
Quote:
Code:
<vb:if condition="$post['field12']"><a href="YOUR URL">{vb:raw post.field2}</a></vb:if> Code:
<vb:if condition="$post['field12']"><a href="http://website.com/users-profile" target="slideshow" onclick="window.open(this.getAttribute('href'), this.getAttribute('target'), 'width=770,height=800,scrollbars=yes,resizable=yes').focus(); return false;"></a></vb:if> Edit: And the headache... 3 days that's a migraine imo... visit your doctor and ask if he/she recommends immitrex it's the only thing that can make mine go away. Alternatively all the lights off in the bathroom and a warm bath soaking your head under water usually "helps" mine not cure but anything to help it subside! |
#8
|
|||
|
|||
what does this part do?
Code:
{vb:raw post.field2} Code:
<vb:if condition="$post['field6']"></vb:if> Code:
<a href="http://website.com/users-profile" img src="button.png" alt="" target="slideshow" onclick="window.open(this.getAttribute('href'), this.getAttribute('target'), 'width=770,height=800,scrollbars=yes,resizable=yes').focus(); return false;"></a> |
#9
|
||||
|
||||
Most likely you want to do something more along the lines of....
Insert "http://website.com/users-profile" (no quotes) into the field6 for the user. Then, put something like this in the template: HTML Code:
<vb:if condition="$post['field6']"><a href="{vb:raw post.field6}" img src="button.png" alt="" target="slideshow" onclick="window.open(this.getAttribute('href'), this.getAttribute('target'), 'width=770,height=800,scrollbars=yes,resizable=yes').focus(); return false;"><img src="button.png" alt="" /></a></vb:if> |
#10
|
|||
|
|||
Lynne, that does look exactly like what I'd like to do but for some reason it's not even trying to show it. I have the conditional entered exactly as you've instructed and the web address in profile 6 but when I look at the source code from a page with that users posts it's not showing up at all in there as if the conditional isn't being activated?
--------------- Added [DATE]1294004227[/DATE] at [TIME]1294004227[/TIME] --------------- Currently I have: Postbit Template Code:
<vb:if condition="$post['userid']"> <div class="userinfo_extra"> <vb:if condition="$post['field6']"><a href="{vb:raw post.field6}" img src="../../images/profilebutton.png" alt="Profile Button" target="slideshow" onclick="window.open(this.getAttribute('href'), this.getAttribute('target'), 'width=770,height=800,scrollbars=yes,resizable=yes').focus(); return false;"><img src="../../images/profilebutton.png" /></a></vb:if> <dl class="userstats"> <vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if> Code:
http://mysite.com/profile-whatever.php |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|