View Full Version : Convert buttons to text - multiquote problem
Spinball
06-21-2011, 09:46 AM
Hello,
I don't think I will have a problem replacing buttons with links which are stuled to look like buttons, but I am struggling with the Multiquote button.
This threadhttps://vborg.vbsupport.ru/showthread.php?p=1604783#post1604783
offers an answer which doesn't work.
<a href="$post[replylink]" rel="nofollow" onclick="return false"><span style="color:<if condition="$show['multiquote_selected']">green<else />red</if>;" id="mq_$post[postid]">$vbphrase[multi_quote_this_message]"</span></a>
The javascript - wherever it is - doesn't want to work on the <span.
Any help appreciated.
Thanks
Spinball
06-24-2011, 07:02 AM
Ok I've examined the Javascript and established that it's the function which uses the img tag content which won't work on a span.
I'm surprised there isn't a resource on here which has already been created to help people wanting to do this.
Also somewhat disappointed (though not entirely surprised) at the lack of response to my thread.
BirdOPrey5
06-27-2011, 12:21 AM
I could respond but I wouldn't have anything of value to add- JavaScript isn't one of my strong points. ;)
Spinball
06-27-2011, 06:49 AM
I compromised and used buttons in the end.
Is there a decent forum out there where I could get a better response to this or is vBulletin dead?
BirdOPrey5
06-27-2011, 08:55 AM
I compromised and used buttons in the end.
Is there a decent forum out there where I could get a better response to this or is vBulletin dead?
vBulletin's not dead... The obvious answer is if you don't get a lot of responses what you're asking is either:
1) A lot harder to do than you think it is
and/or
2) No one else really thinks it's worth the effort
I'd say this is probably a combination of both- is it really that big a deal to change multi-quote to text? A small 4 color gif file will load just as fast even on a mobile browser and work just fine as is- probably look better too.
That combined with the fact good javascript programmers are much more rare on this site than good php programmers probably has a lot to do with it.
BirdOPrey5
06-27-2011, 09:37 AM
I got it working. :)
Guess I picked up more about javascript than I though.
Open your vbulletin_multi_quote.js file
find:
(D,"img")
replace with:
(D,"span")
find:
{A.src=A.src.replace(/\/multiquote_off\.([a-zA-Z0-9]+)$/,"/multiquote_on.$1")}
replace with:
{A.textContent = "MultiQuote On";A.style.color = "green";}
find:
{A.src=A.src.replace(/\/multiquote_on\.([a-zA-Z0-9]+)$/,"/multiquote_off.$1")}
replace with:
{A.textContent= "MultiQuote Off";A.style.color = "red";}
I used the replacement instead of what you put in your first post:
<a href="$post[replylink]" rel="nofollow" onclick="return false"><span style="color:red;" id="mq_$post[postid]">$vbphrase[multi_quote_this_message]</span></a>
Motasm
11-18-2013, 08:21 PM
thank you
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.