Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 04-10-2009, 02:02 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Postbit Background Help

Good Afternoon everyone,
First of all I would like to thank you all for taking the time to check out my thread, I was hoping some of the coding experts may be able to help me with what I am trying to do.

I am trying to get my users to have a background in their postbit... I have found this modification on this website:
https://vborg.vbsupport.ru/showthread.php?t=203850

And although that is on the way to what I am after it's not completly there - that uses Usergroups to designate the background - however what I have on my website is a custom profile field where they select their favorite sporting team (I run a sports website) and I would like the background to be selected by using that profile field.

For example: [Field"7"] is Favorite Sporting Club:
And has a list of 20 that they can choose from, if they select one of their 20 I would like a background to appear like on this forum - the top poster on that page has it, I think they use the mod above and move people into usergroups with the same permissions etc, as not everyone has the background however I would like mine to be set up to use the Field where they select their team.

Is anyone able to help me? Any and all help would be greatfully appreciated.
Reply With Quote
  #2  
Old 04-10-2009, 08:08 AM
^SuiCyde^ ^SuiCyde^ is offline
 
Join Date: Dec 2003
Location: Colorado Springs/CincyO
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i would also be interested in postbit backgrounds determined by field rather than usergroup id
Reply With Quote
  #3  
Old 04-11-2009, 05:25 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me know if this works:

PHP Code:
<if condition="is_member_of($post, #)">
<
td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[fieldx]">
<else />
<td class="
alt2" width="175" style="border$stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top0pxborder-bottom0px"></if> 
Replaced the "#" towards the top with the field ID number.

Note: This was used in parallel with the template mod - https://vborg.vbsupport.ru/showthread.php?t=203850
Reply With Quote
  #4  
Old 04-12-2009, 05:16 AM
^SuiCyde^ ^SuiCyde^ is offline
 
Join Date: Dec 2003
Location: Colorado Springs/CincyO
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks a lot i will definitely be testing soon
Reply With Quote
  #5  
Old 04-12-2009, 10:35 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's looking promising I will let you know in a couple of minutes

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

Ok I have installed it and it is looking great - my last question if you could help is I do not see in that code where it actually works off what they select in their favorite sport.

I set it up on my test vb, which doesn't have the option of fav. team - but it does have a selection box just like the fav. teams drop down I have on registrations.

Code:
<if condition="is_member_of($post, #)">
Only works if I select 6 (meaning administrator) on my development site - is this where we are meant to assign option 1, option 2 etc?

I am sorry to be a pain I am just excited as I finally have a background I just can not for the life of me find where they automatically get a background depending on what their selection in field7 is - and also having trouble implementing more than 1 option when i add a second it stuffs up the tables between the actual postbit and where the actual post is.

Really sorry to be a pain if you can help set it all up so it works i would be more than willing to make a donation to you through paypal to show my gratitude
Reply With Quote
  #6  
Old 04-12-2009, 12:34 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello merk,

Ok, after looking into the situation this is what I have found.

You are including the correct profile field, but you want it to display on the selection they chose WITHIN the fieldx. I do not want to be the deliverer of bad news, but I do not know how to code this.

I will do some research on how to pull information from your pulldown menu, but there are no promises on this. Possibly Dismounted or Lynne could provide more information on how you can do this if I cannot.

Thank you for your patience and understanding. I will update shortly with my findings.
ETA - 2 hours.

// Edit //

I was not able to find a solution. Hopefully someone else could lend a helping hand.
My apologies.
Reply With Quote
  #7  
Old 04-12-2009, 09:50 PM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your replies - i may have to bite the bullet on this one and just create usergroups for all of my options and move them into the usergroups when i see new people have selected options.
Reply With Quote
  #8  
Old 04-13-2009, 03:59 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To my knowledge that would not be a resolution either. Since you want it to show specific to the team they have selected.

Correct?
Reply With Quote
  #9  
Old 04-13-2009, 09:56 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

walking in circles I think...
Reply With Quote
  #10  
Old 05-23-2009, 02:54 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This was taken right off of that site:

Quote:
There will be no custome ones. If you want that pic you can use it as a avatar.

The reasons why is because there is a lot of work involved. Each logo made I had to create a whole new usergroup for the forum and post the different codes for each picture.

We will have the 16 club pictures and the Rep ones only.
At least you know how he pulled it off. I wish I knew someway of coding this for you, but my knowledge is limited.

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

If there was a way for you to allow users to assign their own usergroups, you would have a much easier time...
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:21 PM.


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.04589 seconds
  • Memory Usage 2,251KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete