target="_blank"

Pentru întrebări legate de facilităţile forumului phpBB 3.0.x, acest loc este cel mai potrivit.
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
Închis
Einstein
Utilizator înregistrat
Mesaje: 28
Membru din: 08-Iul-2006, 04:57:30

target="_blank"

Mesaj 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
Avatar utilizator
Poseidon
Utilizator înregistrat
Mesaje: 926
Membru din: 02-Iun-2007, 15:58:19
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Only phpBB.ro !
Contact:

Mesaj de Poseidon »

Da, este posibil. Din fisierul bbcode.php.
|Robert|
Utilizator înregistrat
Mesaje: 78
Membru din: 04-Apr-2006, 21:19:27

Mesaj 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
|Robert|
Utilizator înregistrat
Mesaje: 78
Membru din: 04-Apr-2006, 21:19:27

Mesaj 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.....
Avatar utilizator
Poseidon
Utilizator înregistrat
Mesaje: 926
Membru din: 02-Iun-2007, 15:58:19
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Only phpBB.ro !
Contact:

Mesaj 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 )
|Robert|
Utilizator înregistrat
Mesaje: 78
Membru din: 04-Apr-2006, 21:19:27

Mesaj de |Robert| »

nu le pot inlocui fisierele ca sunt cu alte mod-uri...
Avatar utilizator
Poseidon
Utilizator înregistrat
Mesaje: 926
Membru din: 02-Iun-2007, 15:58:19
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Only phpBB.ro !
Contact:

Mesaj de Poseidon »

In acest caz, te rog da-mi fisierele MOD-ate, si reiau procesul.
robilix
Utilizator înregistrat
Mesaje: 39
Membru din: 22-Apr-2003, 22:46:04
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Cluj Napoca, Romania
Contact:

Mesaj 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.
Închis

Înapoi la “3.0.x Cum pot să...?”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator