Your ultimate PunBB resource!
You are not logged in.
## ## ## Mod title: Elektra Search Tag ## ## Mod version: 1.0.0 ## Works on PunBB: 1.2.14 ## Release date: 2007-04-08 ## Author: artoodetoo <master@1wd.ru> ## ## Description: Each moderator knows how boring to force newbies to search on forum. ## Some nervous moderator can ban stupid user for his questions. ## This mod can adjust such conflict. Moderator or other user can ## compose helpful [search] phrase for newbie and place it on reply. ## ## For ex.: ## '[search]multibyte[/search]' will translated to ## '<a href="search.php&action=search&keywords=multibyte">multibyte</a>' ## and ## '[search=google]CSS example[/search]' will translated to ## '<a href="http://www.google.com/search?q=CSS+class">CSS example</a>' ## ## I've implement 3 search destinations in parser.php. ## There are "this forum", "punres" and "google". ## But you can easily add your case to parsing function. ## ## ## Affected files: include/parser.php ## ## Affects DB: No ## ## Notes: As always, if you find problems with this mod, ## please e-mail them to me so I could get them fixed as soon as possible. ## ## DISCLAIMER: Please note that "mods" are not officially supported by ## PunBB. Installation of this modification is done at your ## own risk. Backup your forum database and any and all ## applicable files before proceeding. ## ##
Offline
Look at this:
It is much more vivid then something like "http ://somesite.com/forums/search.php?action=search&keywords=File+and+Upload", isn't it?
I use this style for search link:
/* 3.3 Special cases of links */
A.search_tag {
PADDING-LEFT: 12px;
PADDING-RIGHT: 4px;
TEXT-DECORATION: none;
BORDER-STYLE: solid;
BORDER-WIDTH: 1px;
background-position : 0% 50%;
background-repeat : no-repeat;
background-image : url(../../img/search_tag.gif);
}
A.search_tag:hover {
background-image : url(../../img/search_tag_h.gif);
}Last edited by artoodetoo (2007-04-08 09:01:39)
Offline
Great idea! Very clever use of the parser. I remember when I first linked to a search term results page then when my search table was rebuilt all the links didn't work. This resolves that issue right?
Offline
Youe're right. Users often copy-n-paste redirected url, such as "search_id=737344565". It follow mistakes.
I use "search.php?action=search&keywords=Sometext" instead. It works forages ![]()
And finally, it is clear and simple syntax to generate such links: [search]Sometext[/search]
Last edited by artoodetoo (2007-04-16 01:56:32)
Offline