MyBB Community Forums

Full Version: Find & Replace template not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can any one please help me, why it is not replacing:

		$template_name	=	"calendar_addevent";

$old1			= 	'<tr> <td width="20%" class="trow1"><strong>{$lang->select_calendar}</strong></td> <td class="trow1"> <select name="calendar"> {$calendar_select} </select> </td> </tr>';

	$find_exp1		=	"#".preg_quote($old1)."#i";

	$new1			=	'<tr> <td valign="top" width="20%" class="trow1"><strong>{$lang->event_image}</strong></td>	<td class="trow1"> <input type="file" name="file"> </td> </tr> <tr>	<td width="20%" class="trow2"><strong>{$lang->event_type}</strong></td> <td class="trow2"> <input type="text" class="textbox" name="event_type" value="{$event_type}"/><br /> </td> </tr>';						
	
	find_replace_templatesets($template_name, $find_exp1, $new1);
Probably because the string you're searching for does not exist... (whitespace is important unless you make it unimportant by matching it with \s* or similar)
Can you please give me an example.