Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2010, 05:49 PM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
The users aren't going to have that exact code unless I provide it for them individually.

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!
Reply With Quote
  #2  
Old 01-02-2011, 03:04 AM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really hoping to get this going. Thanks for looking : )
Reply With Quote
  #3  
Old 01-02-2011, 04:23 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-02-2011, 04:34 PM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I connect the button part? Through the link code like twitter badges or something just minus the script?

Thanks!
Reply With Quote
  #5  
Old 01-02-2011, 04:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You mean what html to use?
HTML Code:
<a href="link.php"><img src="button.png" alt="" /></a>
Reply With Quote
  #6  
Old 01-02-2011, 04:42 PM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #7  
Old 01-02-2011, 04:44 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AlexisMedia View Post
How do I connect the button part? Through the link code like twitter badges or something just minus the script?

Thanks!
I believe he means how to use the variables Lynne, so AlexisMedia let's say the new user profile filed you create is hmm Field 12 then a link would resemble this:

Code:
<vb:if condition="$post['field12']"><a href="YOUR URL">{vb:raw post.field2}</a></vb:if>
As you can see you can wrap it in a conditional that way let's say your adding in a link to something.. if they don't have info in field 12 then it won't show .

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>
Or similar however how your going to associate their forum account with their offsite account would be the primary question here imo!

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!
Reply With Quote
  #8  
Old 01-02-2011, 07:00 PM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what does this part do?
Code:
{vb:raw post.field2}
And your displaying the link included. But shouldn't it be this in the template:

Code:
<vb:if condition="$post['field6']"></vb:if>
and this in the single text line profile field 6?

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>
Although this isn't workin...
Reply With Quote
  #9  
Old 01-02-2011, 07:05 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #10  
Old 01-02-2011, 07:31 PM
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
And user profile field 6 made with a single text line option and named "Profile Button":
Code:
http://mysite.com/profile-whatever.php
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04387 seconds
  • Memory Usage 2,265KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete