PDA

View Full Version : Help with Anchor in Vb 4.1.X


WDS
12-31-2011, 05:09 AM
I want to put this anchor system http://www.ps3trophies.com/forums/trophy-checklists/20-compalicious-list-trophies.html on my forum: www.play4trophies.com (http://www.play4trophies.com)

I used this BBCode: https://www.vbulletin.com/forum/showthread.php/224630-Anchors-in-posts-using-vbcode
Apparently not work on vB 4.1.x as it is vB 3.8.

Then I read all this topic: https://www.vbulletin.com/forum/showthread.php/342561-A-working-anchor-BB-Code
But I found no other solution than that used by rossco_2005 But it only works with the first click, and does not return to work with any other.

But it can work, I leave the link above ps3trophies clearly see that it works to perfection.

I know that I make this system work on my site, thanks.

W.Montilla.

-------------------------------------------------------------------

When I call to replace HTML javaScript:
<a href="javascript: window.location.hash = '{option}';>{param}</a>
If you have an index with 10 anchors only works the first to whom you give it. the other times that you give will not work unless you refresh the page.

Here is a topic where you can see now that I have to replace is this:<a href="#{option}">{param}</a> But if I give you sends me to the front page of the web.
There's a link where you can see in my forum: http://www.play4trophies.com/threads/152-Anchor
I followed this tutorial: https://www.vbulletin.com/forum/showthread.php/224630-Anchors-in-posts-using-vbcode
I also want to look here: http://www.ps3trophies.com/forums/trophy-checklists/20-compalicious-list-trophies.html if I missed something.


Thank you very much Lynne, I hope you can help me at heart :D

Original: https://www.vbulletin.com/forum/showthread.php/393685-Help-with-Anchor-in-Vb-4-1-X?p=2248482#post2248482?

I Need help.

Lynne
12-31-2011, 05:04 PM
Did you read the second page in the thread? This solution works just fine - https://www.vbulletin.com/forum/showthread.php/342561-A-working-anchor-BB-Code?p=1976671&viewfull=1#post1976671

(May have to change single quotes for double quotes and vice versa.)

WDS
12-31-2011, 07:39 PM
Did you read the second page in the thread? This solution works just fine - https://www.vbulletin.com/forum/showthread.php/342561-A-working-anchor-BB-Code?p=1976671&viewfull=1#post1976671

(May have to change single quotes for double quotes and vice versa.)

O_O of irongamer <a href="#" onclick="document.location.hash=''; document.location.hash='{option}'; return false;">{param}</a> It works. exactly that I put in the HTML but I put a message before validating it, I run a single irrigation Option placing a one quote?

Lynne
12-31-2011, 08:08 PM
As I said, switch the single and double quotes for that statement:

<a href="#" onclick='document.location.hash=""; document.location.hash="{option}"; return false;' >{param}</a>

WDS
01-01-2012, 07:07 PM
Yeah, I work well, again thanks a million without your help Lynne d elas many things I want to do on my forum would be impossible.

warlord0
07-18-2012, 10:28 AM
Trying to do this exact thing... but I'm concerned that the above code is wide open for a Javascript injection. What's to stop someone dropping in a something more sneaky inside the {option}? It needs some kind of sanitation or you'll be spawning off all kinds of things.

Anyone done anything safer?

sub_ubi
07-27-2012, 11:54 PM
Fix for VB 4 is here in the original thread https://vborg.vbsupport.ru/showpost.php?p=2352014&postcount=3