eregi_replace giving errors
aro747 |
|
---|---|
Hi All, My site has a lot of custom plugins, etc. and unfortunately I can't get a hold of my developer. Because of all this custom code, I'm still running Seditio V121. I had my host turn on PDO for another site, and since all are on the same host, I'm getting lots of these errors: Deprecated: Function eregi_replace() is deprecated in All are on system/function.php, common.php. So, I know I have to replace eregi_replace with preg_replace, but exactly how, I'm not sure. Can you help please? I'm trying to replace the following lines:
foreach($bbcodes as $bbcode => $bbcodehtml) { $text = eregi_replace($bbcode,$bbcodehtml,$text); } if ($cfg['parser_vid'])and foreach($bbcodes as $bbcode => $bbcodehtml) { $text = eregi_replace($bbcode,$bbcodehtml,$text); } return(substr($text,1)); }and function sed_build_email($email, $hide=0) { global $L; if ($hide) { $result = $L['Hidden']; } elseif (!empty($email) && eregi('@', $email)) { $email = sed_cc($email); $result = "<a href=\"mailto:".$email."\">".$email."</a>"; } return($result); }and function sed_build_url($text, $maxlen=64) { global $cfg; if (!empty($text)) { if (!eregi('http://', $text)) { $text='http://'. $text; } $text = sed_cc($text); $text = "<a href=\"".$text."\">".sed_cutstring($text, $maxlen)."</a>"; } return($text); }and if ($rsedition>0 && $cfg['authmode']>0) { if (strlen($rseditiop)!=32 || eregi("'",$rseditiop) || eregi("\"",$rseditiop)) { sed_diefatal('Wrong value for the password.'); }and if ($rsedition>0 && $cfg['authmode']>0) { if (strlen($rseditiop)!=32 || eregi("'",$rseditiop) || eregi("\"",$rseditiop)) { sed_diefatal('Wrong value for the password.'); }and 'ELQ_COMM_TEXT' => $row3['com_date'] ? sed_cc(sed_cutstring(eregi_replace('\[([^\[]*)\]', '', $row3['com_text']), 200)) : '',If someone could guide me on what to replace the "eregi" with, that would be great. Thanks in advance for your help. -aro
|
Trustmaster |
|
---|---|
You should update at least to V126, it has this fixed. May the Source be with you!
|
aro747 |
|
---|---|
Thanks, where can I get that from? |
pieter |
|
---|---|
This is V126 http://www.boxca.com/ddk8m8h46e3c/seditio-build126.rar.html
But you need to go to 125 first I guess: See doc: 121 to 125/126 Added 20 minutes later: In Cotonti Genoa 0.0.6 you can also find the script. Maybe upgrade directly to Cotonti. See http://www.cotonti.com/docs/start/updating#ch_update latest part: Upgrading from Seditio ... can we help you ...
|
|
Отредактировано: pieter (12.08.2011 06:07, 13 лет назад) |
aro747 |
|
---|---|
Thank you. |