PDA

View Full Version : Another replacement within search.php



dbub
06-26-2007, 01:25 PM
Hi, i need some help.

I need another replacement within the search.php
For example:

<img src="image/<!--CSS-->/feat_text.gif" alt="" />

The search.php shall also replace <!--CSS--> with the string "standard".

Is the following part of the script the right place?
How can i implement the replacement i need?

//Open and print start of result page template
$template = file ($TemplateFilename);
$numtlines = count ($template); //Number of lines in the template
$template_line = 0;
while ($template_line < $numtlines)
{
if (!stristr($template[$template_line], "<!--ZOOMSEARCH-->")) {
print($template[$template_line]);
$template_line++;
}
else {
break;
}
}

Thank you very much

wrensoft
06-27-2007, 12:14 AM
I don't understand why this is required or be desirable. If you are always replacing "CSS" with "Standard", then why not just hard code "Standard" into the template?

In general we don't recommend people edit our scripts unless they are experts in the scripting language concerned, most people end up breaking the script rather than improving it.

Plus we stopped development on V4 of the software more than a year ago.