PDA

View Full Version : Mini Mods - Search permalink


Lea Verou
09-13-2008, 10:00 PM
This plugin will let you use a variable $permalink in the search_results template, which holds a "permalink" to the search results. The permalink could then be shared with friends or bookmarked for later reference to the search results.

I didn't include the template modification for the reasons below:

I don't want to be restrictive.
I don't need it personally (as my templates are too modified, so there's no way its the same template modification for you as it is for me) so I would need to do it just for you. No time for that, sorry.Installation: Import the plugin (its not a product, its a plugin) and modify the search_results template to your liking. Then you can share the template modification you did with others, and if I like it, I'll put it in the first post too. :)

FAQ

I don't get what this mod does, help!
You don't need it then. If something inside you tells you that you may need it, go googlesearch what a permalink is and don't waste my time please. :)

Screenshots?
Obviously, since the template modification will be different per board, there is no reason to put up one. Get over the screenshot addiction. There is only php code included here, so if you would like a screenshot of that, just ask. Its the only screenshot I can provide. :P

Is $permalink a clickable URL that I can insert in search_results?
No, its just the url. To make it clickable, you have to put it as the href in an <a> tag. Suggestion: put it in the title as well, so they know what it is, like:

<a href="$permalink" title="$permalink">Permalink</a>


I found a case where the permalink displayed is not correct, what do I do?
Report it in this thread, and be sure to include the exact search criteria, otherwise I won't be able to debug.

yahoooh
09-14-2008, 11:49 PM
demo plz

Lea Verou
09-15-2008, 05:29 AM
There is a demo at my site, although I don't think it will help much, as its in greek and quite a lot modified.
Refer to the FAQ.

AndrewRich
09-19-2008, 09:07 PM
Installed! Added a phrase "permalink_description" ("Permanent link to this search") and this code to search_results template:
<a href="$permalink" title="$vbphrase[permalink_description]">#</a>
</td>
</tr>
<if condition="$displayCommon">

We're still deciding on the anchor text but we're using "#" as a placeholder for now.

TsirhCitna
09-20-2008, 03:30 PM
There is a demo at my site, although I don't think it will help much, as its in greek and quite a lot modified.
Refer to the FAQ.
I know what a permalink is and I have no idea what this mod does.

Lea Verou
09-20-2008, 04:11 PM
Usually, when you perform a search, you are redirected to a url with the form search.php?searchid=12435235 which can't be shared or stored.

This mod produces a URL that can be reused, as it contains the search criteria in the URL, so if no search is stored, it performs the search again.

peterle1
02-18-2009, 10:11 PM
Very nice mod. Thanks for that one!

AndrewRich
07-07-2011, 01:01 AM
Any update for 4.x on this mod? Thanks.