Gossamer Forum
Home : Products : Links 2.0 : Customization :

Execute CGI into TEMPLATES

Quote Reply
Execute CGI into TEMPLATES
How can I execute a counter into search_results.html?? It don't work...
I tryed to rename this file to search_results.SHTML, and put <!--#exec cgi"/cgi-bin/counter/counter.cgi" --> but don't work...
Help me anyone please
Quote Reply
Re: Execute CGI into TEMPLATES In reply to
SHTML or not, you cannot execute SSI commands on CGI generated pages (add, modify, and search pages). Go to the resource center and use the WebAdverts FAQ as an example of how to execute another CGI program from CGI.
Quote Reply
Re: Execute CGI into TEMPLATES In reply to
I tryied it and did not work.... It just display the path of the counter in the template page.
There should be another way...

Thanx

Girus
Quote Reply
Re: Execute CGI into TEMPLATES In reply to
well it wouldn't do that if you used backticks instead of quotes, it should look like this
Code:
sub insertcounter
# -------------------------- INSERT COUNTER-------------------
$banner = `/your/full/path/to/your/counter.cgi`;
return $counter;

}

If you have a windows nt host, it should be

Code:
sub insertcounter
# -------------------------- INSERT COUNTER-------------------
$banner = `perl C:/your/full/path/to/your/counter.cgi`;
return $counter;

}

Then in the globals section in site_html_templates.pl, put counter=> \&insertcounter,

------------------
LookHard Search
lookhard.hypermart.net
Lavon Russell