PDA

View Full Version : Postbit Background Help


merk_aus
04-10-2009, 02:02 AM
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 (http://forums.rleague.com/showthread.php?t=35133) - 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.

^SuiCyde^
04-10-2009, 08:08 AM
i would also be interested in postbit backgrounds determined by field rather than usergroup id

Mr-Moo
04-11-2009, 05:25 PM
Let me know if this works:


<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-top: 0px; border-bottom: 0px"></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

^SuiCyde^
04-12-2009, 05:16 AM
thanks a lot i will definitely be testing soon

merk_aus
04-12-2009, 10:35 AM
It's looking promising I will let you know in a couple of minutes

--------------- Added 1239538128 at 1239538128 ---------------

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.

<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

Mr-Moo
04-12-2009, 12:34 PM
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.

merk_aus
04-12-2009, 09:50 PM
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.

Mr-Moo
04-13-2009, 03:59 PM
To my knowledge that would not be a resolution either. Since you want it to show specific to the team they have selected.

Correct?

iogames
04-13-2009, 09:56 PM
walking in circles I think...

Fastbird
05-23-2009, 02:54 PM
This was taken right off of that site:

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 1243094136 at 1243094136 ---------------

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