Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Split thread title into searchable keyword components Details »»
Split thread title into searchable keyword components
Version: 1.00, by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-03-2004 Last Update: Never Installs: 10
 
No support by the author.

[Split thread title into searchable keyword components]

Information
  • [high]vBulletin Version:[/high] 3.0.x

  • [high]Author:[/high] Dean Clatworthy

  • [high]Copyright:[/high] You may use this modification at your own risk. I cannot and will not be held responsible for any damage you may cause to your forums during installation or thereafter. You may not distribute this modification in whole or parts and anyone found doing so faces risk of prosecution. All my modifications are released at vBulletin.org and anyone found releasing them elsewhere also faces risk of prosecution. You may not translate this modification without my prior permission.

  • [high]Donations:[/high] I release my modifications for free. If you wish to donate please contact me and I will give you my details. All donations are graciously appreciated.

What does this modification do?
[size=1]This modification will allow you to split your thread title into the navbar into searchable components. You have three searchable options at the moment but it can easily be modified. These searchable sites are:
  • Your forums search engine (default)
  • Dictionary.com
  • Google

Installation

1/

In showthread.php find:

PHP Code:
$navbits[''] = $thread['title']; 
ABOVE it place:
PHP Code:
// #############################################################################
// START: split thread title into keyword search components
$sites = array(
    
=> '<a href="' $vboptions['bburl'] . '/search.php?q=%1s">%2s</a>',
    
=> '<a href="http://www.google.com/search?q=%1s">%2s</a>',
    
=> '<a href="http://dictionary.reference.com/search?q=%1s">%2s</a>',
);

// selete the number from above of the site you want to search
$chooseoption 1;

// get rid of all stupid characters (sacrifice so we don't break the query string
$ttitle preg_replace("/[^a-z0-9\-_\'\s]/i"''$thread['title']);

// split thread title by any number of commas or space characters
$ttitle preg_split("/[\s,]+/"$ttitle);

// loop through all words replacing the delimeter with the word
if(is_array($ttitle))
{
    foreach(
$ttitle AS $tword)
    {
        
$twords[] = sprintf($sites["$chooseoption"], $tword$tword);
    }

    
// get back into a readable title
    
$thread['title'] = implode(' '$twords);
}
// END: split thread title into keyword search components
// ############################################################################# 
Please Click Install!
If you installed this modifcation please click the install button. It'll help you keep up to date with future releases and important bugfixes, security updates.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-05-2004, 05:33 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1/ Try this

Find:
PHP Code:
 $thread['title'] = implode(' '$twords) . '<span class="smallfont"><-- search on keyword</span>'
Replace with:

PHP Code:
 $thread['title'] = implode(' '$twords) . '<span style="font-size: 9px; font-family: font-family: Verdana, Arial, Helvetica, sans-serif;"><-- search on keyword</span>'
2/ Sure send me a PM and i'll give you my info
Reply With Quote
  #23  
Old 12-05-2004, 06:34 PM
owner owner is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works nice ... but gotta understand how 2 use the google and yahoo in it. Awsome using this last post as well. Btw does it affect the site on google search ranks bec of this ? ... POssible to Put google search adsense into this? .... Thankyou
Reply With Quote
  #24  
Old 12-05-2004, 07:13 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry owner, I didn't quite understand what you were saying in your last post
Reply With Quote
  #25  
Old 12-07-2004, 10:09 AM
owner owner is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok hmmm u must be knowing of www.google.com/adsense i have an account over there and iam placing their ads. Now they also have a feature of google search 2 be placed on the site. I wanted 2 know if that code is possible 2 be placed into this ? ... hmm i guess ill post the code .. here it is
Quote:
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com/custom" target="_top">
<table>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search"></input>
<input type="hidden" name="client" value="pub-23232323(Each user has its own id code, so i guess this will be changed depending on the user,so u might wanna add this in ure description)"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH :center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000F F;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input>
</table>
</form>
</center>
<!-- Search Google -->
Reply With Quote
  #26  
Old 12-07-2004, 05:28 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's possible as I think you can spoof the headers as if you were posting a form with a redirection script, however I don't know if google allows you to do this? Might want to ask them?
Reply With Quote
  #27  
Old 12-07-2004, 07:05 PM
owner owner is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm true, i should ask them... but how about making up the code and presenting it 2 google and asking them if its ok 2 run it. cause they have spiders and they can catch on anything they dont like ... so ill ask them regarding the code you make and then publish it ? .. that k ?
Reply With Quote
  #28  
Old 12-07-2004, 07:45 PM
Torqued Torqued is offline
 
Join Date: Oct 2004
Location: Houston, TX
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Torqued
What would it take so that you could get a dropdown on each word with different search options for each word? It would be kinda neat to be able to search on the board *or* on Google
Dean, any comments on this idea?
Reply With Quote
  #29  
Old 12-07-2004, 08:05 PM
owner owner is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Torqued
Dean, any comments on this idea?
-- I would personally love this idea ... Its nice ..
Reply With Quote
  #30  
Old 12-09-2004, 02:12 PM
morrow's Avatar
morrow morrow is offline
 
Join Date: Mar 2002
Location: NJ
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welp, looks like it could be a nice hack. I've installed it but have no idea what I just installed. hahahaha... Is there something visual here, or is it just behind the scenes stuff like:

google search... site http://www.njflyfishing.com "trout"

something like that?
Reply With Quote
  #31  
Old 12-09-2004, 02:20 PM
morrow's Avatar
morrow morrow is offline
 
Join Date: Mar 2002
Location: NJ
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, scratch that last question. I figured it out. What I would like to know is this. When you click on a search word, how does google or yahoo or whatever, get factored into the search. When I click on a word, the only things returned are items that are right from my site.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07406 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete