Gossamer Forum
Quote Reply
Search results templete
Hi



Can search results templete pass an off site include file though SSI?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Search results templete In reply to
Nope...SSI = Server Side includes

What you could do though is add additional params into the search query string that could allow people to custom the search results page.

Example:

&logo=http://www.someotherdomain.com/image/logo.gif

Then in your search result template, you could put:

<%if logo%>
<img src="<%logo%>">
<%ifnot logo%>
<img stc="<%defaultlogo%>">
<%endif%>
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Search results templete In reply to
Hi

Thanks

Yup.. I already have that and was thinking of moving it step further..

Any other ways to allow user to pass their own header and footer?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Search results templete In reply to
Have them upload header and footer files to your server and reference them via a user header and footer folder. To track this, you could create two columns called "header" and "footer" (ENUM, Yes/No) in the USER table. When the user uploads either header and or footer file, then those columns are updated to Yes.

OR you could create two BLOB type columns called header and footer and then have the users upload directly to these columns. Then simply do a check for these columns, by adding an additional query into the search script that would check the USERS table via an additional param in the search query string, like UserID.

Example:

http://www.something.com/cgibin/search.cgi?query=something&UserID=1233

The query would look like the following:

Quote:


my $userid = $IN->param('UserID');

SELECT Users.Header, Users.Footer
FROM Users U
WHERE (U.UserID = $userid)


Of course, these are just raw pieces of what you'd have to add into a plugin.

Good luck!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Search results templete In reply to
Thanks Stealth

I have had this implanted as well but could never figure out how to pass the header and footer to search.html.

In the search code I have

<INPUT type="hidden" name="" value="<%Userid%>">

where userID is a new field in the users table

Then then how to pass the Header and footer which are in the User information to the search results, and how to make it recognize the username and the corresponding header and footer?

Can that be done through

<%if Userid%>

<%user_header%>

<%endif%>

or similar without going through altering search.cgi?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Search results templete In reply to
You'd have to provide a "hook" to search the USERS table, then you can simply use the HEADER and FOOTER column names as references in your search results template file.

Best of luck!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Search results templete In reply to
Thanks

Can that hook be a global or does it have to be a modification to search.pm?



When this is done I think it will be very useful for a lot of users, and it is very easy to implant i think..

Just could not figure out how to pass the User_header and user_footer to the search-results page..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory