Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 10-31-2013, 09:07 PM
jrw422dx jrw422dx is offline
 
Join Date: Jun 2011
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to open a link in same page/window

Is there a code that can be added when you insert a link on the page to keep it from opening in a new tab/window/page, but open that link in the same page?

Also is there a special code that will work to insert a media player that shows up on the page and when clicked will not take you to a new page/window/tab?

I have lyrics to songs in a thread with a link to the MP3 file but cant figure out how to put a player there that people can just click the play button. Obviously when you put in the link it opens a new tab making you have to toggle back to view the lyrics.

Jon
Reply With Quote
  #2  
Old 11-01-2013, 06:13 AM
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Location: New Zealand
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jrw422dx View Post
Is there a code that can be added when you insert a link on the page to keep it from opening in a new tab/window/page, but open that link in the same page?

Jon
target="_top"

http://www.w3schools.com/tags/att_a_target.asp
Reply With Quote
  #3  
Old 11-01-2013, 10:13 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think what he is looking for is, target="_self" not top.
Reply With Quote
  #4  
Old 11-01-2013, 10:27 AM
midnz's Avatar
midnz midnz is offline
 
Join Date: Jul 2010
Location: New Zealand
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've always used "top" after discovering that using "self" sometimes causes issues, like selecting a link within a sidebar opens the webpage within that sidebar rather than the full window/tab. Mind you, I haven't tested that since 3.6x.
Reply With Quote
  #5  
Old 11-01-2013, 10:34 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I don't believe that is a issue anymore, but thanks for your explanation on why you use it that way.
Reply With Quote
  #6  
Old 11-01-2013, 10:51 AM
jrw422dx jrw422dx is offline
 
Join Date: Jun 2011
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it safe to assume that I would need to have ALLOW HTML on for that to be able to work? I have tried adding it several different ways in the add a link box and no results. It just posts the whole code and I get a 404 error when I click it.
Reply With Quote
  #7  
Old 11-01-2013, 10:55 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where exactly is the link shown, and what is the code you are using to show it?
Reply With Quote
  #8  
Old 11-01-2013, 11:05 AM
jrw422dx jrw422dx is offline
 
Join Date: Jun 2011
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is what I am trying to make work.

<a href="http://www.online-ministries.org/audio/walt-mills-only-the-blood.mp3" target="_top">

Pasting that into the "LINK" box with TEXT highlighted produces nothing.

Would rather have a player one could just click on to listen but cant figure that either.

I am running 4.2.2 and ALLOWED HTML in that particular forum

And if you would like to look at the page and what I am trying to do, its here http://www.online-ministries.org/for...s-that-Inspire

As you will see with all the links I have there, all will open in a new tab which makes viewing the lyrics useless unless you switch back to the parent page
Reply With Quote
  #9  
Old 11-01-2013, 11:18 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TBH I don't even think opening the player in the same page will do what you want, you would need to have it open as a popup like when you go to post attachments. Maybe this mod can get what you want,
https://vborg.vbsupport.ru/showthrea...ighlight=popup

I would not allow HTML in the forums, that is generally a bad idea.
Reply With Quote
  #10  
Old 11-01-2013, 11:29 AM
jrw422dx jrw422dx is offline
 
Join Date: Jun 2011
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank You Chris I will give that a shot this evening..

Anyone else have an idea or know of another way?
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09643 seconds
  • Memory Usage 2,233KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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