PDA

View Full Version : Help with conditional


iow_bg
12-19-2009, 09:42 PM
I am customizing the multi quote button. When I load the page, there is not a multi quote button showing but when I click that same area to select the option, the correct button shows up. After a few attempts, I am to the point that I need to ask what I am doing wrong?

This is coding I am using....

<vb:if condition="$show['multiquote_post']">
<a class="multiquote" href="{vb:raw post.replylink}" rel="nofollow" onclick="return false;" id="mq_{vb:raw post.postid}">&nbsp;<img id="mq_image_{vb:raw post.postid}" src="{vb:stylevar imgdir_button}/multiquote-back<vb:if condition="$show['multiquote-selected']">on<vb:else />off</vb:if>_40b.png" alt="{vb:rawphrase multi_quote_this_message}"></a>
</vb:if>

Anybody have suggestions?

Thanks
Bill

Lynne
12-19-2009, 09:54 PM
I don't understand exactly what you mean. You realize the images are put there by css? So, perhaps you haven't touched the css for the button.

iow_bg
12-19-2009, 10:13 PM
Lynne,

Yes, I removed the CSS backgrounds and added the <img src=.... right after link code.

What I am trying to accomplish is basically the same coding that is in VB 3.8 but with out the tables.

This is the current 3.8.4 code...
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>

Lynne
12-19-2009, 10:20 PM
I am pretty sure the stuff dealing with the buttons is all javascript. Try a search in the javascript files to find where the image comes from and then modify the javascript files. (Sorry, I don't help on javascript issues as I'm NOT very good with it.)

derfelix
12-20-2009, 02:45 AM
I agree with lynne.. I suggest you download the uncompressed version (can be selected when downloading vbulletin). Then you can get a look at what the javascript does.
But be aware that using background images in css is much better.. because they get cached in a much better way and more search engine friendly because not there for them.
F.

iow_bg
12-20-2009, 01:31 PM
Thanks for the replies... I did revert them back to using the CSS.