You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 50 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - A more Complete Search [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
gsicard
Sergeant
Sergeant


Joined: Feb 08, 2003
Posts: 105

Location: Virginia, USA

PostPosted: Sun Jun 08, 2003 9:07 am Reply with quoteBack to top

Let's say I search my site for Julius... and get this result.

... more

Didn't find what you're looking for?

Search "Julius" on:


Web Links (0 Search Results)
Encyclopedia (0 Search Results)
Google
Google Groups

How would I go about adding other options to this more searchs.. for instance..

Web Links
Encyclopedia
Gallery
Forum
News
Comments
Topics

I think the search should search the entire site and someone has probably already tweaked it like that..

Any ideas.

Gary
Find all posts by gsicardView user's profileSend private messageSend e-mailMSN Messenger
oaklid
Corporal
Corporal


Joined: May 30, 2003
Posts: 56


PostPosted: Mon Jun 09, 2003 3:27 am Reply with quoteBack to top

YOu could go in and edit the code for the Search module (modules/Search/index.php) to add more modules.

Down near the bottom of the file there are several $mod bits. Look for

Code:
       if (is_active("Downloads")) {
            $dcnt = sql_num_rows(sql_query("select * from ".$prefix."_downloads
_downloads WHERE title LIKE '%$query%' OR description LIKE '%$query%'", $dbi),
$dbi);
            $mod1 = "<li> <a href=\"modules.php?name=Downloads&d_op=search&
amp;query=$query\">"._DOWNLOADS."</a> ($dcnt "._SEARCHRESULTS.")";
        }


What this says is if this site has an active download module, run the query and show the number of results and put the number of results, along with a link to the download module, in a variable called $mod1.

A few lines down the page, the $mod variables are output on the page (just above the Google stuff)

Right now there are three $mod in the file: Downloads, Web Links and Encyclopedia. But other modules are searchable and you should be able to tweak the code to include them as new $mod.

However you can't just substitute one module name for another, as each one seems to implement searching a little differently. Which means you'll have to dig around in teh code of each one to figure out how to format the query string.

Me? I'm not patient enough to do that. I've just bunged on some links to the search pages for the modules, ala

Code:
You can also:<br><a href="modules.php?name=Journal&file=search&disp=showsearch">
Search Journals</a><br>
<a href="modules.php?name=Forums&file=search">
Search Forums</a>


This method doesn't pass the query along, which is lazy and unkind to the users, but I have a deadline for launch and maybe I'll go fix it later. Maybe...

_________________
Kristen
http://www.mediatinker.com/
Find all posts by oaklidView user's profileSend private message
gsicard
Sergeant
Sergeant


Joined: Feb 08, 2003
Posts: 105

Location: Virginia, USA

PostPosted: Mon Jun 09, 2003 6:57 am Reply with quoteBack to top

Kristin,
I just spent some time surfing your site! That is so cool! Thanks for the tip on the search code!

All the best.

Gary

_________________
Gary
Find all posts by gsicardView user's profileSend private messageSend e-mailMSN Messenger
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.170 Seconds - 197 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::