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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2009, 03:12 PM
GraphiX2004 GraphiX2004 is offline
 
Join Date: Mar 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do i do this so simple thing user title.

in vbulletin you can set users/usergroups with a user title image.
i want the usergroup title image to be a href click able so when a user
clicks on the user title image it takes them to a page dedicated to that user group.

i don't need it to do some wacky coded usergroup page i will design the page

i just want the likes of this to be click able.

User Title <img src=/forum/images/team_icons/recruit.gif>

i've tried <a href="www.gamesite.com/current-recruits.html"><img src=/forum/images/team_icons/recruit.gif></a>

but just converts back to <img src=/forum/images/team_icons/recruit.gif> when you save it.

i know this is going to be a template edit somewhere but i wouldn't know where to
look or which template set to edit.

can someone help me? please

Example:
Reply With Quote
  #2  
Old 05-07-2009, 03:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably a template edit in the postbit (or postbit_legacy). You'd want to change this line:
[HTML<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>[/HTML]
Reply With Quote
  #3  
Old 05-07-2009, 03:45 PM
GraphiX2004 GraphiX2004 is offline
 
Join Date: Mar 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey lynne but what would i use as the code to replace it with?
the html for it would be <A href="mygamesite.com/group/recruit.php"><img src=/forum/images/team_icons/recruit.gif></a>

but how would i add that to the php $variable dont forget its not just 1 usergroup
it's going to be like 5-6, i just need to be-able to make each user title group image clickable
to link to different webpages with the <a href tag.
Reply With Quote
  #4  
Old 05-07-2009, 04:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should probably write a plugin to define the link ($ranklink), and then go:
HTML Code:
<if condition="$post['rank']"><div class="smallfont"><a href="$ranklink">$post[rank]</a></div></if>
Reply With Quote
  #5  
Old 05-07-2009, 05:07 PM
GraphiX2004 GraphiX2004 is offline
 
Join Date: Mar 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks the the direction lynne but i'm not that advance to write a plugin.
i'd love if someone did make a plugin for this but i wont hold my breath

that code would work also i could just hard code the url to the page
when anyone click any image it would take em to the same page then split
that page up myself with html with the rank images but this is just messy.

how would i define the different ranks in $ranklink

say i had

http://www.mygamesite.com/group/recruit.php
http://www.mygamesite.com/group/admin.php
http://www.mygamesite.com/group/vip.php
http://www.mygamesite.com/group/banned.php

As the web pages how would i set or define these in $ranklink?
where would i find all the variable settings what page or template section.

guessing its the same place $post[rank] is defined?

--------------- Added [DATE]1241720966[/DATE] at [TIME]1241720966[/TIME] ---------------

Lynne it is an update until i get it working but now the image has a border around it, i know the border=0 tag in the image but how do i add this, i need to know which file contains
the variable $post[usertitle]

it's not rank im after changing it's user title i thought it was rank but
when i tried your code it did nothing so tried the same on user title that worked.
but now i have a border around my linkable image and adding border=0 doesnt work.

where can i find where it's defining or declairing the $post[usertitle] variable?
Reply With Quote
  #6  
Old 05-07-2009, 05:35 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you're gonna have to just play with it on your test site. Perhaps use the postbit_display_start hook location and do a switch based on the rankid. The rankids are displayed at the top of the Rank Edit page.
Reply With Quote
  #7  
Old 05-07-2009, 05:43 PM
GraphiX2004 GraphiX2004 is offline
 
Join Date: Mar 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok lynne once again thanks for being the only one bothered to reply.

i'm just going to make it simple just need your expert help for my other method.
just going to have the following.

PHP Code:
<if condition="$post[usertitle]"><div class="smallfont"><a href="www.mygamesite.com/listofgroups.php">$post[usertitle]</a></div></if> 
Problem is i have a border around the image i want it removed.
i dont know which file is the one that holds the $post[usertitle] Variable.

tell me how to remove the border in the above EXACT PHP code
or tell me where i can find the .php file that holds all the $post[] variables to edit. ty
Reply With Quote
  #8  
Old 05-07-2009, 05:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To remove a border in an image, in the image tag you need to set border="0":
HTML Code:
<img src="yourimage.jpg" style="border-style: none" alt="yourimage" />
Reply With Quote
  #9  
Old 05-07-2009, 06:07 PM
GraphiX2004 GraphiX2004 is offline
 
Join Date: Mar 2009
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but that image is stored in the variable $post[usertitle]
what i'm asking is where can i find the source of this usertitle? where is the variable.
there is no way to set a border lynne from inside the adminCP on the actual usertitle
there is no way to set a border to 0

<a href="www.mygamesite.com/listofgroups.php">$post[usertitle]</a></div></if>

so do you see my problem the $post[usetitle] is the image putting border=0 at the side
of the $post[usertitle] just adds the words border=0

i need to be-able to find where its' setting $post[usertitle] in the config.

for example

usertitle = <img src="yourimage.jpg" style="border-style: none" alt="yourimage" />

That is what i'm looking for ... the file that contains the setting up of usertitle
Reply With Quote
  #10  
Old 05-07-2009, 07:16 PM
Cryo Cryo is offline
 
Join Date: Dec 2003
Location: Buffalo, NY
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here, I wrote a quick product for you (attached) to make your life far easier. This will also allow it to easily move across forum upgrades without relying on template edits. Install it as you would any normal plugin. Once you have it installed go to your Admin CP then click on Plugins & Products then Plugin Manager.

If the "Title Group" plugin is not active, make it active. Open it for editing...

Code:
	// Admin Usergroup
	case 6:
		$tg_imageURL = "http://urltoimage.com/image.gif";
		$tg_linkURL = "http://linktopage.com/page.php";
	break;
Copy and paste that for every usergroup you want to have a custom image. Replace the "6" with the ID of the usergroup and the image/link URLs with your information.

If you have any questions post here... I wrote this quick and tested it and it worked, but I may have missed something. ;p
Attached Files
File Type: xml product-titlegroups.xml (1.1 KB, 5 views)
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 04:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04217 seconds
  • Memory Usage 2,280KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete