PM Popup Box: Modify to open in new window...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Zhuge Kongming
Registered User
Posts: 37
Joined: Sat Jun 15, 2002 2:55 pm
Location: United States
Contact:

PM Popup Box: Modify to open in new window...

Post by Zhuge Kongming »

Hi all, I have had multiple requests to modify the Private Message notification popup box to open the inbox in a new window (as opposed to the main window) by default. I think it is a good change myself, so I am working on it now.

I am looking in privmsgs_popup.tpl right now and I am not finding what I want. It includes the simple {L_MESSAGE} where the “Click Here to visit your Inbox” would be, and the header includes the JavaScript:

Code: Select all

function jump_to_inbox()
{
	opener.document.location.href = "{U_PRIVATEMSGS}";
	window.close();
}
When the PHP has done its job and the viewer gets the popup {L_MESSAGE} changes to:

Code: Select all

Click <a href="privmsg.php?folder=inbox" onClick="jump_to_inbox();return false;" target="_new">Here</a> to visit your Inbox
I would like to edit that output, or edit the JavaScript to cause the target to be an all new window. What do you suggest I edit for this (JavaScript or HTML) and in what file?

I am awesome with HTML and CSS, but Not exactly a JavaScript/PHP master.

Thank you in advance, and I hope this is the right forum.
User avatar
Mav
Former Team Member
Posts: 2261
Joined: Wed May 15, 2002 9:19 am
Location: England
Contact:

Post by Mav »

find this line in privmsg.php

Code: Select all

$l_new_message .= '<br /><br />' . sprintf($lang['Click_view_privmsg'], '<a href="' . append_sid("privmsg.".$phpEx."?folder=inbox") . '" onClick="jump_to_inbox();return false;" target="_new">', '</a>');
Zhuge Kongming
Registered User
Posts: 37
Joined: Sat Jun 15, 2002 2:55 pm
Location: United States
Contact:

Post by Zhuge Kongming »

Mav wrote: find this line in privmsg.php

Code: Select all

$l_new_message .= '<br /><br />' . sprintf($lang['Click_view_privmsg'], '<a href="' . append_sid("privmsg.".$phpEx."?folder=inbox") . '" onClick="jump_to_inbox();return false;" target="_new">', '</a>');

Thank you, kind sir.
Shado
Registered User
Posts: 20
Joined: Sat Aug 10, 2002 9:07 pm

Post by Shado »

Finally! I have found this, I just don't understand it. A few of the users at my board have asked about this. Instead of it opening in the main window, open in a new window or the pop-up window itself.

Can somebody help me, please?
Locked

Return to “2.0.x Support Forum”