Announcement

Collapse
No announcement yet.

What is wrong with this code????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is wrong with this code????

    Hello... Is the MULTIQUOTE button... Im using sprite CSS:

    1. An image in normal mode - CSS SPRITE
    2. An image when mouse is over the button - CSS SPRITE
    3. An image when button is clicked - A simple .gif

    MY CODE, something is wrong... I dont know where:

    PHP Code:
    <if condition="$show['multiquote_post']">
    <
    a href="$post[replylink]rel="nofollow" onclick="return false" class="multiquote spritebutton">
    <if 
    condition="$show['multiquote_selected']">
    <
    img src="$stylevar[imgdir_button]/multiquote_on.gif"</if>alt="$vbphrase[multi_quote_this_message]border="0" id="mq_$post[postid]/>
    </
    a>
    </if> 
    DEFAULT code:

    PHP 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> 
    Last edited by MaRµ; Wed 16 Sep '09, 2:03pm.

  • #2
    You can post on www.vbulletin.org for help with custom code. That button uses javascript to change the image upon clicking it.

    Comment


    • #3
      Hi Jack, I did but no one helpme so...

      I Hope this thread dont be a problem here.

      Well, I made other buttons works with CSS Sripte, but this one have this difference from the other... I saw it working in other forum... I dont know what to do

      Comment


      • #4
        Just a guess here, but are you not missing an <else />

        <if condition="$show['multiquote_post']">
        <
        a href="$post[replylink]" rel="nofollow" onclick="return false" class="multiquote spritebutton">
        <else />
        <if
        condition="$show['multiquote_selected']">
        <
        img src="$stylevar[imgdir_button]/multiquote_on.gif"</if>alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" />
        </
        a>
        </if>
        Na, forget it, just looked at the original code. Not sure what you've done there.

        Comment


        • #5
          Thanks MRGTB. I Try... but:

          Normal OK!
          Mouse Over OK!
          But when I click the button nothing happend.

          Comment


          • #6
            Try this, because looking at what you had done, you've only added a class at the end, but then messed the rest of the code up. See if this works anyway.

            <if condition="$show['multiquote_post']">
            <a href="$post[replylink]" rel="nofollow" onclick="return false" class="multiquote spritebutton">
            <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>

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X