Author: Cedric Haindl
Email: [EMAIL PROTECTED]
Message:
Hi,

I would like to customize the result page a little and have a different listing for a 
pdf or doc file, than I have for an html-file.

So I added the following line to search.php:

        if ((ereg("^ftp://";, $url)) && 
                    ($templates['ftpres'][0] != '')) {
                        print_template('ftpres');
                } elseif ((ereg("^https?://", $url)) && 
                    ($templates['httpres'][0] != '')) {
                        print_template('httpres');

// next two lines are new
                } elseif ($contype == 'application/pdf') {
                     print_template('pdfres');


                } else {
                        print_template('res');
                }

Then I added this to search.htm

<!--pdfres-->
<DL><DT>
<b>$DN.</b> <a href="$DU" TARGET="_blank"><b>$DT</b></a> <img 
src="/images/icon_pdf.gif" width="16" height="16"> [<b>$DR</b>]<DD>
<UL>
<li><A HREF="$DU" TARGET="_blank">$DU</A> ($DC) $DM, $DS bytes
$CL
</UL>
</DL>
<!--/pdfres-->

So I thought I am pretty smart although it's already three o'clock in the morning. But 
much to my dismay it did not work. When I used the same scripting with ftpres instead 
of pdfres it worked, but it seems, that I cannot add my own template snippets.

Is there a way to do that?

Thank you for your kind help.

Kind regards
C�dric

Reply: <http://www.mnogosearch.org/board/message.php?id=2597>

___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]

Reply via email to