Vote button in new window

Hello everybody.

My users find it very annoying when they click the vote button that their own page is then left.
What can I do so that when the vote button is clicked, the user's page is not left, but my page appears in a new window?
target _blank would be clear to me, but where exactly do I have to go with it?

greeting
Andreas
 

Mark

Administrator
Staff member
no problem, edit the follwing templates

link_code_type_stats.html
link_code_type_static.html
link_code_type_link.html
link_code_type_extra.html

be sure to copy them to child folder so they are not overwritten every upgrade (skins/default/child/)

And add target="_blank" to the link attributes
 
Last edited:
Hello Mark.

Thank you. One would think that it should work that way.
The Lincode is now displayed on the buttons like this.
But unfortunately that doesn't work.
Button exchange on another page, still opens in the same window.

I also changed it in: /link_code_type_rank.html.

Is there still a place somewhere where something has to be changed?

So now I've changed it in all five templates.
Example of: link_code_type_stats.html
Code:
{$lng->link_code_stats_button} <a href="{$list_url}/{$verbose_link}"><img src="{$list_url}/button.php?u={$button_username}&buttontype=stats" alt="{$text_link_button_alt}" target="_blank" /></a>
<br />
<textarea readonly="readonly" name="code" rows="6" style="width: 90%;" onclick="this.focus(); this.select();">&lt;a href="{$list_url}/{$verbose_link}">&lt;img src="{$list_url}/button.php?u={$button_username}&buttontype=stats" alt="{$text_link_button_alt}" target="_blank" />&lt;/a></textarea>
<hr />
 
I think I found the bug myself.
The correct position for target_blank was different.
Code:
{$lng->link_code_stats_button} <a href="{$list_url}/{$verbose_link}" target="_blank"><img src="{$list_url}/button.php?u={$button_username}&buttontype=stats" alt="{$text_link_button_alt}" /></a>
<br />
<textarea readonly="readonly" name="code" rows="6" style="width: 90%;" onclick="this.focus(); this.select();">&lt;a href="{$list_url}/{$verbose_link} "target="_blank">&lt;img src="{$list_url}/button.php?u={$button_username}&buttontype=stats" alt="{$text_link_button_alt}" />&lt;/a></textarea>
<hr />
So changed in the other four files, so there are five files in total, then it works.

Should the code be correct right?
It works anyway.
 

Basti

Administrator
Staff member
a href="{$list_url}/{$verbose_link} "target="_blank
In your actual textarea code, make sure there is no space after the {$verbose_link}
Browsers should strip that, but you never know how every browser reacts and maybe encode that to a space, leading to a 404
 
That was an important clue. Thank you.
I actually had the space twice in each of the five templates.
I have now removed the spaces.

Thanks Basti :)

It now looks like this:
Code:
{$verbose_link}"target="_blank">
 
Top