Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
Google search from profile keyword in postbit Details »»
Google search from profile keyword in postbit
Version: 1.00, by NetRover NetRover is offline
Developer Last Online: Dec 2018 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.2 Rating:
Released: 07-20-2008 Last Update: Never Installs: 4
Template Edits
Re-useable Code Translations  
No support by the author.

First step is to get the profile field you want search results for:-

To do use this log into you admin CP. Go to User Profile Fields | User Profile Manager and make note of the field name ie: field1

Second Step is to get your google search box code:-
Login to your adsense and generate the usual google search box with your adsense ads how you want them. If you already have adsense for search box I would generate a new one so you can track results separetly for this postbit mod. Copy the google search code.

Third Step
You need the url of your search results. All I did was create a new page in my html editor and pasted the code between the body tags and preview the page throught my browser. Peform a search with any keyword at this stage as you will replace this with your profile field. Copy the search url from the browser.

eg:
Code:
http://www.yourdomain.co.uk/my-search-results?cx=partner-pub-your-id-number-will-be-here=FORID%3A10&ie=ISO-8859-1&q=yourkeyword&sa=Search#1123
Note:- The url I have shown is for my domain because I am having the results showing in my own web site. If you create your adsense code the normal way it will be google as the domain name.

Fourth Step
Replace yourkeyword in the url with
Code:
$post[the field number you made note of earlier]
as like field 1 below.
Code:
http://www.yourdomain.co.uk/my-search-results?cx=partner-pub-your-id-number-will-be-here=FORID%3A10&ie=ISO-8859-1&q=$post[field1]&sa=Search#1123

Fith Step
Place your final url with the field number as in step 4 into the code below replacing and including *** until ***

Code:
<div><if condition="$post['field1']">Search: <a href="***http://www.yourdomain.co.uk/my-search-results?cx=partner-pub-your-id-number-will-be-here=FORID%3A10&ie=ISO-8859-1&q=$post[field1]&sa=Search#1123***">Google $post[field1] Info</a></if></div>
and your final task:-

In your admin cp go to Styles and Templates | Style Manager and select edit templates from your used style.

Open up Postbit templates and edit postbit

Look for
Code:
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
and just place your completed code from step five below.

Searching two words:-

You could also combine two words from the profile fields with eg:-

Code:
$post[field1]+$post[field2]
in the url

Show Your Support

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

Comments
  #2  
Old 07-28-2008, 09:15 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does this do and for what purpose?
Reply With Quote
  #3  
Old 07-29-2008, 11:29 PM
dreads dreads is offline
 
Join Date: Feb 2007
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

simple, it would help bring up your $$$ if u have a strong site.

I personally would redo it so that it would tag search it
Reply With Quote
  #4  
Old 07-30-2008, 02:48 PM
NetRover NetRover is offline
 
Join Date: Jul 2004
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
What does this do and for what purpose?
Hi there, it has helped increase my site revenue. If your users have useful profile fields then you have a great resource of paid adsense searches.

Depends if your users have some good profile fields that would make useful google searches.
Reply With Quote
  #5  
Old 07-30-2008, 02:49 PM
NetRover NetRover is offline
 
Join Date: Jul 2004
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dreads View Post
simple, it would help bring up your $$$ if u have a strong site.

I personally would redo it so that it would tag search it
I have not really used tags on my site and I don't think my members do yet.

Maybe something I should explore.
Reply With Quote
  #6  
Old 07-30-2008, 07:54 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be tweaked so that a user can enter a search/keyword into their profile, which is then auto added to their postbit.

Or is this already done, didnt seem to be.. by what I have read thus far...

Perhaps I missed the ghist of it.
Reply With Quote
  #7  
Old 11-07-2015, 06:17 PM
webnsn webnsn is offline
 
Join Date: Oct 2009
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please tell me how it works?
For guests also work?
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 02:35 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.04283 seconds
  • Memory Usage 2,260KB
  • Queries Executed 22 (?)
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
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete