PDA

View Full Version : remove auto parse link


cassis2k
05-05-2009, 07:54 PM
Hello all,

I want create a product for remove auto parse link. I can remove $checked[parseurl] in the template with the following code :

$hide_string = '$checked[parseurl]';
$vbulletin->templatecache['newthread'] = str_replace( $hide_string, '', $vbulletin->templatecache['newthread']);

But i must modify many template :

$hide_string = '$checked[parseurl]';
$templates = array ('announcement_edit', 'calendar_edit', 'editpost', 'newpoll', 'newreply', 'newthread', 'picturecomment_editor', 'pm_newpm', 'socialgroups_editor', 'usernote_note', 'visitormessage_editor');

foreach ($templates as $template) {
$vbulletin->templatecache['.$template.'] = str_replace($hide_string, "", $vbulletin->templatecache['.$template.']);
}

my second code doesn't work. Someone sees it my error ?

Thank you in advance ;)

Dismounted
05-06-2009, 06:57 AM
foreach ($templates AS $template)
{
$vbulletin->templatecache["$template"] = str_replace($hide_string, '', $vbulletin->templatecache["$template"]);
}

cassis2k
05-06-2009, 07:15 AM
Hello Dismounted,

i havn't got any error but "Automatically parse links in text" is always checked.