Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2011, 05:09 AM
WDS WDS is offline
 
Join Date: May 2011
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with Anchor in Vb 4.1.X

I want to put this anchor system http://www.ps3trophies.com/forums/tr...-trophies.html on my forum: www.play4trophies.com

I used this BBCode: https://www.vbulletin.com/forum/show...s-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/show...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:
HTML Code:
<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:
HTML Code:
<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/show...s-using-vbcode
I also want to look here: http://www.ps3trophies.com/forums/tr...-trophies.html if I missed something.


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

Original: https://www.vbulletin.com/forum/show...2#post2248482?

I Need help.
Reply With Quote
  #2  
Old 12-31-2011, 05:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you read the second page in the thread? This solution works just fine - https://www.vbulletin.com/forum/show...=1#post1976671

(May have to change single quotes for double quotes and vice versa.)
Reply With Quote
  #3  
Old 12-31-2011, 07:39 PM
WDS WDS is offline
 
Join Date: May 2011
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Did you read the second page in the thread? This solution works just fine - https://www.vbulletin.com/forum/show...=1#post1976671

(May have to change single quotes for double quotes and vice versa.)
O_O of irongamer
HTML Code:
<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?
Reply With Quote
  #4  
Old 12-31-2011, 08:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said, switch the single and double quotes for that statement:

HTML Code:
<a href="#" onclick='document.location.hash=""; document.location.hash="{option}"; return false;' >{param}</a>
Reply With Quote
  #5  
Old 01-01-2012, 07:07 PM
WDS WDS is offline
 
Join Date: May 2011
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 07-18-2012, 10:28 AM
warlord0 warlord0 is offline
 
Join Date: Apr 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 07-27-2012, 11:54 PM
sub_ubi sub_ubi is offline
 
Join Date: Dec 2004
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fix for VB 4 is here in the original thread https://vborg.vbsupport.ru/showpost....14&postcount=3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04962 seconds
  • Memory Usage 2,223KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete