HelpHelpSearchSearchMembersMembersCalendarCalendar
Welcome, Guest. Please login or register.

Login with username, password and session length
December 01, 2008, 12:03:42 PM
Please use the support forum for support issues instead of sending me pm's. Thanks.
I will not reply to support issues via pm.
« previous next »
Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read June 03, 2008, 07:54:06 AM #0
scorn

Links in new window

I have Musicinica installed, got a coulpe of my own links in the top bar but i want one of them to open in a new window ( its my chatroom).  Im assuming it will be like the html tag target="_blank" but dont know where to put it, any ideas.
« Last Edit: June 05, 2008, 12:15:19 PM by m3talc0re »
Offline  
Read June 03, 2008, 12:25:48 PM #1
Violat3r

Re: Links in new window

Alright well, your correct in assuming you will need to use the html "_blank" reference to tell it to open in a new window. Its pretty straightforward in where to place it; just find the code for the chat button and find the link tags (the <a href=""></a> stuff) and place the target code in there. Heres and example for the "Home" button in Musiconica to open in a new window:

Find the home button code:

Code:
// Show the [home] button.
echo '
<td class="mainnav"><a href="', $scripturl, '">' , $txt[103] , '</a></td>';

And then add target="_blank" to the anchor tag. I usually prefer to have the target attribute directly AFTER the url, but it doesnt really matter where you put it. After you add the code, it should look like this:
Code:
// Show the [home] button.
echo '
<td class="mainnav"><a href="', $scripturl, '" target="_blank">' , $txt[103] , '</a></td>';

Good Luck! =D



Offline  
Read June 06, 2008, 08:42:27 AM #2
scorn

Re: Links in new window

Cheers man, figured it out, didnt think it would so obvious, thanks anyway mate.
Offline  
Pages: [1]   Go Up
Jump to:  

Theme by Webtechnica.net
MySQL PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC XHTML 1.0 CSS