Mar 23, 2013, 10:21 AM
Post #1 of 3
I am working on a YaBB 2.5.2 mod which is executable from any page of the forum because it is form driven and the form is within the HTML template code.
Perl script to open new window
The mod simply runs a sub-routine (subroutine #1) to roll a/some polyhedron die/dice and log the results. A hyperlink at the bottom of the HTML form used to pass variable data to the perl code bypasses the variables and redirects to the logged results (subroutine #2). If subroutine #1 is run passing variables and determining results, it then appends the results to an array of strings and calls subroutine #2 to display all of the logged results.
Now I have a little delimma. I have the following code at the end of subroutine #1:
After the form is executed, it redirects you to a log of results (subroutine #2). That works great, mind you... except I'm concerned that someone might be in the middle of doing something else and then get whisked away to the log results inadvertently. What I would like is to append the code in such a way that it uses the above code if you are already looking at the log of results ($scripturl?action=logrolldisplay), but if you are not, it opens up a separate window.
$yySetLocation = qq~$scripturl?action=logrolldisplay~;
Any idea how can I do this?