vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - vB Google Adsense for Search plus Integration (https://vborg.vbsupport.ru/showthread.php?t=155199)

davidw 08-29-2007 10:33 PM

Quote:

Originally Posted by WarLion (Post 1328306)
also in vB Google Search (Adsense) option on Your Forum's Path i only put the name of the php n this case searchresults.php cuz you are already in your domine if you put all the adress the resul migth bee
http://yoursite.com/forum/searchresu...://wwwyoursite......,
and also in the searchresults.php on the line 8 i change the path and thats all i need now is working now thankts for you mod is soo cool

i know this is almost equal to the one from davidw i dont know what i did the only this s woring now dot ask i don?t know what i did

and also i add class to button and textfield you can change it to fit your sikin

sorry for my english mexican here

Glad that it is working for you. The reason I have the forum path to show the full from http:// to ... .php is because of
Code:

<form method="get" action="{$vboptions['google_forum_path']}" target="_top">
However, this is mainly aimed at those who have their searchresults.php located in a different directory other than the root location. Otherwise searchresults.php or ./searchresults.php should work just fine. Don't forget to click install :)

AquilaEagle 08-30-2007 06:14 PM

Mine is working now, thanks to david for his help -my GALT number had a character missing at the end :)

djbaxter 08-30-2007 07:18 PM

Quote:

Originally Posted by AquilaEagle (Post 1327526)
I'm still getting a blank results page with v1.2 - completely uninstalled and re-installed. edited the searchresults.php file, and it is in /forum/

Same problem here. I've tried both versions - same issue. Double checked the GALT and pub codes. Both look OK.

davidw 08-30-2007 10:56 PM

What do you have for your GALT and what do you have for "Your Forum's Path" in the AdminCP?

The example I use, which a lot of people have, is this:
Code:

GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11

djbaxter 08-30-2007 11:11 PM

GALT:

Code:

GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:E6E6E6;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:45;LW:100;S:http://forum.psychlinks.ca;LP:1;FORID:1
Path:

Code:

http://forum.mydomain.com/searchresults.php

davidw 08-30-2007 11:14 PM

Change your galt to what I have (previous post) and test that.

Also try it with these forum paths
Code:

.searchresults.php
Code:

./searchresults.php
and your original.

djbaxter 08-30-2007 11:15 PM

OK. I don't know exactly why but it is a GALT problem. I took mine from the code Google gave me. I just substituted your string instead and if I use yours, it works.

Is the GALT string unique to a specific publisher? Or can I use yours as a generic string?

davidw 08-30-2007 11:20 PM

Mine is generic. You can play with the hex codes and see the different outcomes, but the one I supply is generic for multiple use. The one that google supplies a lot of times is specifically for one specific purpose (notice it has your domain in the GALT) and not meant to be altered cosmetically (breaks it).

djbaxter 08-31-2007 12:12 AM

Thanks, David. Working fine now. :)

forte 08-31-2007 11:13 PM

Is it possible to have a different cof code for each skin? Since it doesnt blend well with my other skin.

WarLion 08-31-2007 11:28 PM

is any posible way to integrate to vbadvance workk like a charm in the forum but in my index is not show any idea?

davidw 08-31-2007 11:50 PM

Quote:

Originally Posted by WarLion (Post 1329813)
is any posible way to integrate to vbadvance workk like a charm in the forum but in my index is not show any idea?

I'm looking into a navigation bar solution for that myself, however, in the meantime, I have this (at vbadvanced) that works nicely for users (it's also what I've used since I wrote it)... http://www.vbadvanced.com/forum/showthread.php?p=82852

davidw 09-01-2007 12:00 AM

Quote:

Originally Posted by forte (Post 1329801)
Is it possible to have a different cof code for each skin? Since it doesnt blend well with my other skin.

Yes, it is entirely possible. I'm not sure if it is probable though.

What you'd have to do is go into each template (for each child style or alternate style)

Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => google Templates => google_navadsearch =>
Find:
Code:

{$vboptions['google_cof']}
Replace with:
Code:

Your new code
You'll also want to do this for google_siteadsearch as well.

This should work. I am not 100% because I've not tested it, but in theory it makes sense.

toucan42 09-01-2007 01:19 AM

I am confused by your instructions as to template edits. I have uploaded the xml and I am looking at the navbar template - what exactly do I need to add/change in my templates?

Quote:

Changelog
LEGACY VERSION - Applies to vb_google_legacy_1_2.zip only
- Very similar to Version 1.2 except instead of using a hook this will work for previous 3.6 versions (should work with any 3.6 version).
-- -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Navigation / Breadcrumb Templates => navbar => find
Code:

$vbphrase[advanced_search]</a></td>
</tr>

Add, under $google_navadsearch
-- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch
This is just confusing to me. Sorry =/

toucan42 09-01-2007 01:30 AM

OK I added $google_siteadsearch under $navbar in the search_forums template and now I get the integration into the advanced search page.

The results page, however, throws the following error:
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/talkwhat/public_html/searchresults.php on line 8

Also it is not showing in the dropdown on the navbar though I added "$google_navadsearch"

toucan42 09-01-2007 01:56 AM

OOPS - I fixed the line 8 issue - still can't figure out how to get this integrated into the dropdown, though. Anyone?

davidw 09-01-2007 03:45 AM

By default you shouldn't have to change anything in the templates. The only thing you should have to edit is in the admincp options. What version of vb do you have? If you are using the legacy version and you have follow the instructions and you are showing the searchresults.php page correctly (without results) when you go to http://www.. ..com/searchresults.php but it is not showing up at all in the drop-down then there is a very good chance that another hack is interfering with this one. This is possible.

I will be back on Monday.

WarLion 09-01-2007 04:16 AM

Quote:

Originally Posted by davidw (Post 1329845)
I'm looking into a navigation bar solution for that myself, however, in the meantime, I have this (at vbadvanced) that works nicely for users (it's also what I've used since I wrote it)... http://www.vbadvanced.com/forum/showthread.php?p=82852

thanks dvidw i will try

forte 09-01-2007 04:19 AM

Quote:

Originally Posted by davidw (Post 1329853)
Yes, it is entirely possible. I'm not sure if it is probable though.

What you'd have to do is go into each template (for each child style or alternate style)

Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => google Templates => google_navadsearch =>
Find:
Code:

{$vboptions['google_cof']}
Replace with:
Code:

Your new code
You'll also want to do this for google_siteadsearch as well.

This should work. I am not 100% because I've not tested it, but in theory it makes sense.

It works. Thanks a lot!:D

iogames 09-07-2007 01:23 AM

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/iogamesc/public_html/searchresults.php on line 8

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/iogamesc/public_html/searchresults.php on line 19

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iogamesc/public_html/searchresults.php on line 19

:(

djbaxter 09-07-2007 05:09 AM

Quote:

Originally Posted by iogames (Post 1334001)
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/iogamesc/public_html/searchresults.php on line 8

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/iogamesc/public_html/searchresults.php on line 19

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iogamesc/public_html/searchresults.php on line 19

iogames, I suspect you need to correct the file path in file searchresults.php

From your errors above, it seems that line 8 reads

Code:

chdir('/home/iogamesc/public_html/');
However, your forum is at a subdomain:

Code:

http://chat.iogames.com/
My guess is you need to edit line 8 in searchresults.php to read as follows:

Code:

chdir('/home/iogamesc/public_html/chat/');
Try that. If it doesn't work, email me.

davidw 09-09-2007 11:19 AM

iogames, any news?

djbaxter 09-09-2007 01:05 PM

Quote:

Originally Posted by davidw (Post 1335363)
iogames, any news?

Yes. We continued the discussion via PM and email. The fix I suggested worked, although he also seems to have a conflict with another plugin he's using - vBMailer, I believe. He was going to get on to vBMAiler support to try to fix that.

davidw 09-09-2007 06:48 PM

I am going to be working on a newer version that, if successful, lets you have full and complete control on the CSS of the outcome.

If anyone has any requests or ideas of what they'd like to see in future releases, let me know - this mod has much potential :)

JayT123 09-11-2007 11:03 AM

Anyway to change the frame height? I have tons of white space after the results. I tried adding an FrameHeight var but that doesn't work.

davidw 09-11-2007 10:14 PM

Unfortunately, no - I have tried this myself and have found that adding a height value will not work. There are other scripts out there that do not work like this that do have an adjustable height, but I do not know why Google has disallowed it here. However, keep in mind, as soon as I find a way to allow different heights or if there is a change from Google, I will let everyone know.

JayT123 09-11-2007 10:25 PM

What about adding a css for the iframe? Won't that override it?

davidw 09-11-2007 10:48 PM

That's something I've played with, but haven't had any luck.

Theoretically, and its only a theory, an iframe within an iframe would work, but wouldn't necessarily be visually pleasing (its possible), but its a stab.

mdcdeve 09-29-2007 04:31 AM

Hiya, i'm having some problems with 1.2. It works fine from the search.php page but when i use it from the drop down box in the navbar it always says "Please specify some words or valid user names to search on. There were no matches for those that you specified."

davidw 09-29-2007 04:02 PM

That's really weird considering google has nothing to do with the site's search system. Do you have a demo link I can view this on? Also, please don't forget to click install.

mdcdeve 09-29-2007 09:38 PM

Quote:

Originally Posted by davidw (Post 1349673)
That's really weird considering google has nothing to do with the site's search system. Do you have a demo link I can view this on? Also, please don't forget to click install.

Heya, thanks for replying. Heres a link you can check it out at.

user:mod
pass:mod

http://www.mdcdeve.com/forums/
http://www.mdcdeve.com/forums/search.php

davidw 09-30-2007 12:24 AM

Ok, that's really weird - which version of 1.2 are you using? search or legacy? if legacy, can you post a snippet where you've added the code?

dfe 09-30-2007 03:28 PM

I am running 3.6.8., also having a prob with the searchresults file, when trying to search I get the error below.

The file searchresults.php and global.php is in the same directory, both in /forum on the domain.

Quote:

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/domain.co.za/httpdocs/searchresults.php on line 16

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:') in /var/www/vhosts/domain.co.za/httpdocs/searchresults.php on line 16

davidw 09-30-2007 06:26 PM

Did you edit the searchresults.php file and mark the location in your admincp options?

mdcdeve 09-30-2007 10:01 PM

Quote:

Originally Posted by davidw (Post 1349921)
Ok, that's really weird - which version of 1.2 are you using? search or legacy? if legacy, can you post a snippet where you've added the code?


Hiya, i'm using the legacy version. Here's where i placed the code.

Navbar
Code:

<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
                        </td>
                </tr>
                <tr>
                        <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>
<!-- Post Thanks Hack -->
$template_hook[navbar_search_menu]
<!-- / Post Thanks Hack -->
$google_navadsearch
</table>
</form>
</div>
<!-- / header quick search form -->
</if>

<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

search_forums
Code:

<title>$vboptions[bbtitle] - <if condition="$show['searchthread']">$vbphrase[search_thread]<else />$vbphrase[search_forums]</if></title>
</head>
<body>
$header
$navbar
$google_siteadsearch
<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>


dfe 10-01-2007 03:45 AM

Quote:

Originally Posted by davidw (Post 1350340)
Did you edit the searchresults.php file and mark the location in your admincp options?


Hi I think I am missing you somewhere.

I have entered the 3 values in AdminCP for PUB, COF and Frame width.
I placed a copy of the searchresults.php in the same directory as the forum (/forum on my domain), but I noticed now that it was looking for it in root.

I now edited the search results page to change the path for the global.php file to ./forum/global.php but still getting the same error.

You mention "mark the location in AdminCP", how do you mean? Where must this be marked?

SemperFideles 10-01-2007 11:06 AM

I'm sorry but I am extremely confused. The installation instructions for this are very hard to follow and there are a lot of files.

Assuming I want to install version 1.2 on a 3.6.8 site:

1. Which file(s) should I download?
2. Should I generate my own cof information from Adsense?
3. After I've installed and configured the 1.2 site, are there any templates I should modify or is that for the legacy version?

davidw 10-01-2007 11:24 AM

Quote:

Originally Posted by dfe (Post 1350598)
Hi I think I am missing you somewhere.

I have entered the 3 values in AdminCP for PUB, COF and Frame width.
I placed a copy of the searchresults.php in the same directory as the forum (/forum on my domain), but I noticed now that it was looking for it in root.

I now edited the search results page to change the path for the global.php file to ./forum/global.php but still getting the same error.

You mention "mark the location in AdminCP", how do you mean? Where must this be marked?

What version are you using? If you are running 1.2 then the last spot has a URL path to your searchresults.php file - this is for your template (for no template edits). If you are not running 1.2, you may want to download vb_google_search_1_2.zip (3rd option) and install that one. This will allow you to fully use it on forums that are outside of root areas (have /forum or /forums)



Quote:

Originally Posted by SemperFideles (Post 1350711)
I'm sorry but I am extremely confused. The installation instructions for this are very hard to follow and there are a lot of files.

Assuming I want to install version 1.2 on a 3.6.8 site:

1. Which file(s) should I download?
2. Should I generate my own cof information from Adsense?
3. After I've installed and configured the 1.2 site, are there any templates I should modify or is that for the legacy version?

1. If you are running 3.6.8, then you want vb_google_search_1_2.zip (3rd option) - the other is for older versions that do not have the hook locations.
2. You can try generating your own cof information but some have success, other have not. If yours does not work, use what I have supplied, that will work - and you should still be able to play with the hex colors to change it to your desire.
3. The templates to modify are only for the legacy version.

roady89 10-16-2007 03:29 PM

Which version should I install on 3.6.7? I tried 2 different versions. One I got a blank page and the other I got an error 406 page.

roady89 10-16-2007 07:30 PM

I got it to work. The GALT code google is generating does not have two "1" at the end of the code like yours does. Its ony producing one "1" and not two "1"'s. I placed an addition 1 on the end and it works. You can see it here if you wanna check it out. Custom Golf Carts

Thanks for the great MOD. Clicked installed.
3.6.7


All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01615 seconds
  • Memory Usage 1,851KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (15)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete