Pagina 1 din 1

target="_blank"

Scris: 26-Ian-2008, 12:13:15
de Einstein
As dori sa modific (dar nu prea am gazit unde anume) ca atunci cand bag un www in "www" sau www sa il ia de fiecare data cu _blank, nu _self. Imi puteti sugera care fisier trebuie modificat pentru asa ceva?

Multumesc

Scris: 26-Ian-2008, 15:00:46
de Poseidon
Da, este posibil. Din fisierul bbcode.php.

Scris: 08-Feb-2008, 23:40:58
de |Robert|
Poseidon, poti fi mai explicit te rog?

am mai pus aceasta intrebare si eu cu ceva timp in urma aici: viewtopic.php?t=10854

Multumesc

Scris: 08-Feb-2008, 23:42:27
de |Robert|
huh ce chestie interesanta cand dai klick pe link deschide intr-o noua pagina.... asta vrem si noi doar ca si acel forum de tip linck sa se deschida tot intr-o pagina noua.....

Scris: 09-Feb-2008, 01:00:19
de Poseidon
Poftim, incearca sa inlocuiesti fisierele din /includes, cu acestea.

Iar pe acesta, il pui in styles/tema-ta/templates/ ( Inlocuiesti tema-ta cu numele temei tale )

Scris: 09-Feb-2008, 11:48:37
de |Robert|
nu le pot inlocui fisierele ca sunt cu alte mod-uri...

Scris: 09-Feb-2008, 14:28:58
de Poseidon
In acest caz, te rog da-mi fisierele MOD-ate, si reiau procesul.

Scris: 21-Feb-2008, 19:05:00
de robilix
Modifying auto-detected links

First of all, make auto-detected links (those that you didn't wrap with the url-BBCode) open new windows when getting clicked. Therefor open the includes/functions_content.php and look for following line (which should be around line 592):

Find:

Cod: Selectaţi tot

$html    = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
And replace it with following line:

Cod: Selectaţi tot

  if ($type == MAGIC_URL_EMAIL)
    {
        $html    = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";    
    }
    else 
    {
        $html    = "$whitespace<!-- $tag --><a$class href=\"$url\" onclick=\"window.open(this.href);return false;\">$text</a><!-- $tag -->$append";
    } 
Next open the bbcode.html of your style (if you're using prosilver, this would be the styles/prosilver/template/bbcode.html file) and look for following line:

Cod: Selectaţi tot

<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
Now replace it with this line:

Cod: Selectaţi tot

<!-- BEGIN url --><a href="{URL}" onclick="window.open(this.href);return false;" class="postlink">{DESCRIPTION}</a><!-- END url -->
Last but not least, you should also do the following change which will allow the created HTML output to be parsed again by phpBB: Open the includes/functions.php and replace this segment which you should find around line 2740...

Cod: Selectaţi tot

 case 'bbcode_htm':
         return array(
            '#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
            '#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
            '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
            '#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
            '#<!\-\- .*? \-\->#s',
            '#<.*?>#s',
         );
... with this one:

Cod: Selectaţi tot

 case 'bbcode_htm':
         return array(
            '#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
            '#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&|\?)sid=[0-9a-f]{32})?" onclick="window\.open\(this\.href\);return false;">.*?</a><!\-\- l \-\->#',
            '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)" onclick="window\.open\(this\.href\);return false;">.*?</a><!\-\- \1 \-\->#',
            '#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
            '#<!\-\- .*? \-\->#s',
            '#<.*?>#s',
         );
And since you've updated also a template file, don't forget to also purge your board's cache through the respective button on the frontpage of your board's admin panel.