vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to open a link in same page/window (https://vborg.vbsupport.ru/showthread.php?t=304061)

jrw422dx 10-31-2013 09:07 PM

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

midnz 11-01-2013 06:13 AM

Quote:

Originally Posted by jrw422dx (Post 2457557)
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

ozzy47 11-01-2013 10:13 AM

I think what he is looking for is, target="_self" not top.

midnz 11-01-2013 10:27 AM

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.

ozzy47 11-01-2013 10:34 AM

Yeah I don't believe that is a issue anymore, but thanks for your explanation on why you use it that way. :)

jrw422dx 11-01-2013 10:51 AM

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.

ozzy47 11-01-2013 10:55 AM

Where exactly is the link shown, and what is the code you are using to show it?

jrw422dx 11-01-2013 11:05 AM

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

ozzy47 11-01-2013 11:18 AM

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.

jrw422dx 11-01-2013 11:29 AM

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

Anyone else have an idea or know of another way?


All times are GMT. The time now is 09:23 PM.

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.01012 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete