
MikeB
Staff
/ Moderator

Jun 29, 2006, 5:03 PM
Post #37 of 50
(57560 views)
Shortcut
|
|
Re: [cclinton] Random Listings Script
[In reply to]
|
Can't Post
|
|
Hi, Thanks for the post! Setting up Listings Manager's search.cgi script to use PHP includes isn't something that you'll actually be able to set up unless you use a PHP Wrap. This is because you're generally not able to include dynamic content (such as PHP) on dynamically generated pages (like Listings Manager's search.cgi). That said, you may want to have a look at this forum post that outlines how you can use a PHP Wrap to use PHP code on your search_query.html template file: http://www.interactivetools.com/forum/gforum.cgi?post=41619#41619 Also, if you think it will help to use JavaScript to display the links for a listing then you could use something like this:
<script> if($listing_num_je$ <= 9) { document.write('<a href="$listing_url$/l000$listing_num$.php">$lfield1$</a>'); } else if($listing_num_je$ <= 99) { document.write('<a href="$listing_url$/l00$listing_num$.php">$lfield1$</a>'); } else if($listing_num_je$ <= 999) { document.write('<a href="$listing_url$/l0$listing_num$.php">$lfield1$</a>'); } else if($listing_num_je$ <= 9999) { document.write('<a href="$listing_url$/l$listing_num$.php">$lfield1$</a>'); } </script> This JavaScript checks to see how what the listing number is and then determines how it should be output. I hope one of these solutions will work for you and if you have any other questions or comments, just let me know! Cheers, Mike Briggs - Product Specialist support@interactivetools.com [hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url] Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]
|