Parašė remuxs· 2015 Lap. 19 21:11:39
#1
pvz parasai i saukykla ka nor ir meta
PERŽIŪRĖTI FAILĄ INCLUDES/BBCODES/URL_BBCODE_INCLUDE.PHP
Detalės
Klaida: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead Eilutė: 22
Failas: includes/bbcodes/url_bbcode_include.php Puslapyje: /new150.php
Vartotojas-Lygis: 103 IP: 78.62.145.39
Data: November 19 2015 21:50:58 Statusas:
Į viršų
Išeities kodas (Eilutė: 12 - 25)
12 | modify it under the terms of this license which you
13 | can read by viewing the included agpl.txt or online
14 | at
www.gnu.org/licenses/agpl.html. Removal of this
15 | copyright header is strictly prohibited without
16 | written permission from the original author(s).
17 +--------------------------------------------------------*/
18 if (!defined("IN_FUSION")) { die("Access Denied"); }
19
20 //Url BBCode with auto triming long links
21 $text = preg_replace('#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)([\r\n]*)\[/url\]#sie', "'<a href=\'\\2\\3\'
target=\'_blank\' title=\'\\2\\3\'>'.trimlink('\\2\\3', 20).(strlen('\\2\\3')>30?substr('\\2\\3', strlen('\\2\\3')-10,
strlen('\\2\\3')):'').'</a>'", $text);
22
$text = preg_replace('#\[url\]([\r\n]*)([^\s\'\"]*?)([\r\n]*)\[/url\]#sie', "'<a href=\'http://\\2\' target=\'_blank\'
title=\'\\2\'>'.trimlink('\\2', 20).(strlen('\\2')>30?substr('\\2', strlen('\\2')-10, strlen('\\2')):'').'</a>'", $text);
23 $text = preg_replace('#\[url=([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'\2\3\'
target=\'_blank\' title=\'\2\3\'>\4</a>', $text);
24 $text = preg_replace('#\[url=([\r\n]*)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'http://\2\' target=\'_blank\' title=\'\2\'>\3</a>',
$text);
25
nesuprantu i kiti kodai meto klaidas tik ziurint kur ka rasai tai url code tai email code
Parašė Pakartoti slaptažodį· 2015 Lap. 20 03:11:39
#2
Jei anglų pamokų nepraleidinėji, gali suprasti jog kalbama apie 22 eilutėje kalbamą preg_replace funkciją. Ji yra pasenusi, pažeidžiama ir bendru atveju nebenaudojama, ją pakeitė
preg_replace_callback funkcija, kuri berods veikia kiek kitaip.
Pasidomėk.
Parašė remuxs· 2015 Lap. 21 13:11:23
#6
adminam tik
Tai kaip tas klaidas istaisyt ismokt
o tai jai imestau bbcode is
PHP-Fusion 9 BETA versijos?
Redagavo remuxs· 2015 Lap. 21 13:11:52
Parašė remuxs· 2015 Lap. 23 11:11:03
#10
labi dekui didelis romas51
pakeiciau sita koda kur daviai irok veikia
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: url_bbcode_include.php
| Author: Hien & Wooya
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (phpversion()>5.4) { // or whatever version had error popping up.
$text = preg_replace_callback(
"#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)([\r\n]*)\[/url\]#si",
function($m) {
require LOCALE.LOCALESET."bbcodes/url.php";
$this_url = $m['2'].$m['3'];
return "<a href='$this_url' target='_blank' title='$this_url'/>
".trimlink($this_url, 20). (strlen($this_url)>30 ? substr($this_url, strlen($this_url)-10, strlen($this_url)):'')."
</a>";
}, $text);
} else {
//Url BBCode with auto triming long links
$text = preg_replace('#\[url\]([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)([\r\n]*)\[/url\]#sie', "'<a href=\'\\2\\3\' target=\'_blank\' title=\'\\2\\3\'>'.trimlink('\\2\\3', 20).(strlen('\\2\\3')>30?substr('\\2\\3', strlen('\\2\\3')-10, strlen('\\2\\3')):'').'</a>'", $text);
}
$text = preg_replace('#\[url\]([\r\n]*)([^\s\'\"]*?)([\r\n]*)\[/url\]#si', "'<a href=\'http://\\2\' target=\'_blank\' title=\'\\2\'>'.trimlink('\\2', 20).(strlen('\\2')>30?substr('\\2', strlen('\\2')-10, strlen('\\2')):'').'</a>'", $text);
$text = preg_replace('#\[url=([\r\n]*)(http://|ftp://|https://|ftps://)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'\2\3\' target=\'_blank\' title=\'\2\3\'>\4</a>', $text);
$text = preg_replace('#\[url=([\r\n]*)([^\s\'\"]*?)\](.*?)([\r\n]*)\[/url\]#si', '<a href=\'http://\2\' target=\'_blank\' title=\'\2\'>\3</a>', $text);
?>
Redagavo remuxs· 2015 Lap. 23 21:11:14