Log in

View Full Version : Help with Code


Mum
06-11-2008, 10:57 PM
I am trying to achieve something, that i know is possible, but i am unsure how to do it.

I have a special sponsors group. They are allowed to add a link/title and text to their sig. However, i dont' really want it using up their signature space, so i was trying to do this.

I added in user profile fields for link/title/text and now i'm trying to put this in the postbit - but i cna't get it working. Can someone help please?

<if condition="in_array($post[membergroupids],array(82))">
<div class="vBadvertisement">Signature Sponsor
<br /><a href="$post[field24]">$post[field25]</a>
<br />$post[field26]
</div>
</if>

Just to clarify - i want this ad to show to everyone on the site, but i only want it to show if the poster is in the sponsor group.

Boofo
06-11-2008, 11:32 PM
Didn't someone come up with a fix for this already?

Mum
06-12-2008, 03:05 AM
I am asking if there are any other ways of doing it.

The person who answered that other thread hasn't answered what it does, and i don't use code that i dont' understand to soms degree :)

Lynne
06-12-2008, 03:10 AM
What is the result of using your code? Are you sure that the variable "$post[membergroupids]" is available (try spitting it out in the postbit)?

Boofo
06-12-2008, 03:25 AM
I am asking if there are any other ways of doing it.

The person who answered that other thread hasn't answered what it does, and i don't use code that i dont' understand to soms degree :)

The person that answered you in that thread is more than qualified. The code is safe to use. It would have been better to stay in that thread instead of making a new one with the same question. ;)

The wrapping was for the conditional you were seeking, IIRC.;)

Mum
06-12-2008, 05:14 AM
This was a different thread in that i was wondering if there was a better way to do it, i wasn't trying to get the same thing done again, as in the last one i was trying to fix code i wrote, this one was more of a 'is there another way'

Boofo
06-12-2008, 05:21 AM
Have you tried that code to see if it works the way you want it to?