vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Integration with vBulletin - vB Google Adsense for Search plus Integration (https://vborg.vbsupport.ru/showthread.php?t=180277)

nirvana43 06-01-2008 02:37 PM

Quote:

Originally Posted by davidw (Post 1537804)
Did you edit searchresults.php as in Step 1: Edit chdir('/path/to/your/forums/'); in searchresults.php That would give this error if it was not edited or if the path was incorrect.

yes i did edited searchresults.php
my searchresults.php reads as follows :

Code:

<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'searchresults');
chdir('/home/public_html/searchresults.php');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// pre-cache templates used by all actions
$globaltemplates = array(
        'google_navadsearch',
                'google_siteadsearch',
                'google_searchresults'
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// ######################## START MAIN SCRIPT ############################
$navbits = array();
$navbits[$parent] = 'Search Results';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('google_searchresults') . '");');
?>

My forum is located at http://www.projectsplanet.com
please tell me what should i write in searchresults.php ????
kindly help :(

Regards

davidw 06-01-2008 03:21 PM

For example, somewhat edited, here is mine:
chdir('/home/xxxxxxx/christianboards/forums/');
This is my /path/to/my/forums/ since searchresults.php is located at forums/searchresults.php
You will never use a file in a path (a path is a directory). In your case, try taking out searchresults.php from your path.

chdir('/home/public_html/');

It has to be the full path to your searchresults.php, but don't include the file itself. Hope that helps :)

nirvana43 06-02-2008 03:00 AM

Quote:

Originally Posted by davidw (Post 1537897)
For example, somewhat edited, here is mine:
chdir('/home/xxxxxxx/christianboards/forums/');
This is my /path/to/my/forums/ since searchresults.php is located at forums/searchresults.php
You will never use a file in a path (a path is a directory). In your case, try taking out searchresults.php from your path.

chdir('/home/public_html/');

It has to be the full path to your searchresults.php, but don't include the file itself. Hope that helps :)

Still same problem persist bro... :(
i tried these :

chdir('/home/projects/public_html/');

chdir('/home/public_html/');

btw in your case u've written chdir('/home/xxxxxxx/christianboards/forums/');

what to write at xxxxxxx please can tell me in my case what do i write??
my forum is located in main public_html directory
please have a look here www.projectsplanet.com
please tell me what do i write after /home/
:confused:


also when i try to search it gives me server not found error...

davidw 06-02-2008 11:13 AM

Each website is going to be different. If you have vbadvanced, there is a tool in the Extras (do not upload) folder called forumpath.php that you can upload to your forums directory that will tell you your exact forum path. If you use that tool, remove it after you use it. The path in the chdir must begin and end with a slash "/".

Also, for my site I edited it in at least two places, but just wanted to show that as an example.

ahayat 06-02-2008 12:41 PM

Quote:

Originally Posted by nirvana43 (Post 1538332)
Still same problem persist bro... :(
i tried these :

chdir('/home/projects/public_html/');

chdir('/home/public_html/');

btw in your case u've written chdir('/home/xxxxxxx/christianboards/forums/');

what to write at xxxxxxx please can tell me in my case what do i write??
my forum is located in main public_html directory
please have a look here www.projectsplanet.com
please tell me what do i write after /home/
:confused:


also when i try to search it gives me server not found error...

Bro when u get an error u must see the link above ?? PM me that link then i will reply you how to fix it.

in other words u must have seen the error like that chdir("/home/ur_root_name_/public_html")

ur_root_name = here u should see root name when u get error just put it there.

@david
Thanks alot mate , My Problem has been fixed.

nirvana43 06-03-2008 04:06 AM

Quote:

Originally Posted by ahayat (Post 1538703)
Bro when u get an error u must see the link above ?? PM me that link then i will reply you how to fix it.

in other words u must have seen the error like that chdir("/home/ur_root_name_/public_html")

ur_root_name = here u should see root name when u get error just put it there.

@david
Thanks alot mate , My Problem has been fixed.

yeah!! mine 2!!! its working lika charm now!!!
u rox david!!:D
thanks again!!
here is test : http://www.projectsplanet.com/search...sa=Search#1270

davidw 06-03-2008 10:48 AM

It shows to be working for me :)

ahayat 06-03-2008 02:14 PM

One question please.

Can i place it on Forumhome somewhere ? it would be good if users can see it on the page instead going to search list?
I thought i should ask you before trying anywhere :D

Cheers

davidw 06-03-2008 02:36 PM

Feel free to modify it to your forums needs. I won't be able to support it being modified for displaying results on the forumhome, but you are welcome to put it there. As for the search box itself, you can add that easily by using $google_siteadsearch and modifying that slightly.

MadK 06-08-2008 02:48 AM

Thank you davidw! It works great!
http://www.mafia-mp.com


All times are GMT. The time now is 04:10 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.01320 seconds
  • Memory Usage 1,746KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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