Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Highlight Hack Details »»
Google Highlight Hack
Version: 1.00, by Nutz Nutz is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 03-13-2006 Last Update: Never Installs: 21
 
No support by the author.

Google Highlight Hack

Description
This is a simple hack that highlights keywords searched for when the user uses Google, like the Google catch system. E.g. http://72.14.203.104/search?q=cache:...k&ct=clnk&cd=1

Details
  • 1 Product

Notes
This is adapted from Cal Henderson[http://code.iamcal.com] highlighter code to work with vBulletin
Once some one installs this on a Google searched board I will post an example of the hack at work.

History
1.0
Initial Version

Last Words
I hope you enjoy the hack!
And don't forget to click install please



Thanks,
Mat

Show Your Support

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

Comments
  #12  
Old 04-04-2006, 12:00 AM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't highlight the arabic words

try http://www.google.com/search?as_q=%D...s=&safe=images
Reply With Quote
  #13  
Old 04-05-2006, 10:38 PM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milad
It doesn't highlight the arabic words

try http://www.google.com/search?as_q=%D...s=&safe=images
Sorry can't help you there

Thanks,
Mat
Reply With Quote
  #14  
Old 04-06-2006, 02:37 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the plugin wont work globally.. anyone had success ?
Reply With Quote
  #15  
Old 04-25-2006, 06:56 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool find, Nutz.
There is no need to use hooks for this, it's more like a template mod.
Open google.js and add this line at the end of the file:
window.onload = init_google;

Then open your headinclude template and add this line:
<script type="text/javascript" src="clientscript/google.js"></script>

I never liked to use body onload= atributes...
Now, the onload function should load your code only after the hole page is fully loaded... and some of us find this bad.
If you want to complicate your life, you could simply create a script that will make sure it loads the javascript code, before the page is loaded.

For example:
Code:
function init_google()
{
	// Avoid statement ‘Element Ready’ to be displayed twice
	if (arguments.callee.done)
	{
		return;
	}
	arguments.callee.done = true;

	var pattern = /google\./i;
	if (pattern.exec(document.referrer) != null)
	{
		var url_parts = document.referrer.split('?');
		if (url_parts[1])
		{ 
			var url_args = url_parts[1].split('&');
			for(var i = 0; i < url_args.length; i++)
			{
				var keyval = url_args[i].split('=');
				if (keyval[0] == 'q')
				{
					go_google(decode_url(keyval[1]));
					return;
				}
			}
		}
	}
}

if (document.addEventListener)
{
	document.addEventListener('DOMContentLoaded', init_google, null);
}
else
{
	addLoadEvent(init_google);
}
window.onload = init_google;
This was done off my mind, not tested, so feel free to play with it.
Reply With Quote
Reply


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 08:43 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.03894 seconds
  • Memory Usage 2,253KB
  • Queries Executed 21 (?)
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
  • (1)bbcode_code
  • (1)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
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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