PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-04-08 16:45:22

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Elektra Search Tag 1.0.0

Code:

##
##
##        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.
##
##

Download here

Offline

 

#2 2007-04-08 16:59:18

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Search Tag 1.0.0

Look at this:
http://www.punres.net/files/projects/pr_369/rid_636/ss_search_tag_1.gif

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:

Code:

/* 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 17:01:39)

Offline

 

#3 2007-04-14 17:26:09

nifty-stuff.com
Member
Registered: 2006-12-09
Posts: 59
Website

Re: Elektra Search Tag 1.0.0

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

 

#4 2007-04-16 09:39:00

artoodetoo
Member
Registered: 2006-11-07
Posts: 90
Website

Re: Elektra Search Tag 1.0.0

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 smile

And finally, it is clear and simple syntax to generate such links: [search]Sometext[/search]

Last edited by artoodetoo (2007-04-16 09:56:32)

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.