View Full Version : inc_ads.php on line 132
December 29th, 2006, 08:39 PM
I have just upgraded to classifieds 2.6.
inc_ads.php was working fine on my forums page, but since the upgrade I am getting an error:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/teambuic/public_html/classifieds/inc_ads.php on line 132
Which is this line:
while (list($pid,$puser,$puserid,$pcat,$ptitle,$product,$views) = mysql_fetch_row($result))
I am running the inc-ads included with the 2.6 script.
You can see the error here:
December 29th, 2006, 09:45 PM
well some more info like are you using separate databases or have you input the correct info in edit integration in admin? specifically the table prefix of classifieds
Yep just double checked you did not put your table prefix in edit integration settings
December 30th, 2006, 10:35 AM
I guess I uploaded over the original! Thanks
It got rid of the error, but I am still not displaying ads.
December 30th, 2006, 10:51 AM
well make sure whatever your doing you have edited things correctly cause when I look at your page your not ndoing things directly like the instructions your using some sidebar so make sure you do any mods to the instructions your doing like you modded the others
December 30th, 2006, 12:01 PM
I found instructions for using inc_ads in vb3 and followed them through, it looks to be in order. It was working before the upgrade, so I thought there may have been a change in the database that the inc_ads used for vb3 wasn't covering.
The sidebar is just a table placed in the Forum Display template of vb3, then
are listed as above.
December 30th, 2006, 03:28 PM
$classifiedsfeature is correct. Did you uncomment and fill out the database variables? Did you ensure your plugin is active and the forumhome template is edited to include the variable
December 31st, 2006, 12:09 AM
I am using the vb3 database, so I didn't think I am supposed to uncomment the database variables.
I didn't understand this had become a "plug in" in this version.
The Forum Home does have them:
<!-- END ADDED LINES -->
December 31st, 2006, 07:08 AM
Have you tried uncomenting the lines? All the variables entered correctly under edit integration?
December 31st, 2006, 10:29 AM
I have been using the vb3 database, I did uncomment the lines and received the error:
Could not select photopost database
I think it is useing the inc_ads.php because it is loading the title bar, etc. on the forums page:
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<table cellpadding="6" cellspacing="1" border="0" width="100%">
<td class="tcat" colspan="1" align="center">
<a style="float:right" href="#top" onclick="return toggle_collapse('featurepal3');"><img id="collapseimg_featurepal3" src="http://www.teambuick.com/forums/images/buttons/collapse_tcat.gif" alt="" border="0" /></a>
<tbody id="collapseobj_featurepal3" style="">
It just seems to be missing the information from the database.
The variables appear to be correct to me. They must have been correct before the upgrade, and that was one of the files that was not overwritten.
I am not using the vb3 integration for headers, enhanced features or WYSIWYG.
I don't suppose the filename fix in the adm_misc.php could have affected this?
December 31st, 2006, 12:31 PM
Not that I know of but not sure what you mean by fix filenames in adm-misc.php
If you uncomment the link and mysql select database lines you need to fill out the proper database and mysql user info.
December 31st, 2006, 01:11 PM
The lines are now uncommented and filled out, there does not seem to be any change in what is happening.
// If you have placed PhotoPost Classifieds into a seperate database, you will need to
// uncomment these lines to connect to the PhotoPost Classifieds database. It is suggested
// that you install PP into the same database as vB for better performance.
// If you use the same userid/password to access both databases, you don't need to
// uncomment the mysql_connect - this is only if you require different ids to access
// the PhotoPost Classifieds database.
$link = mysql_connect ("localhost", "mysite_root", "Password here") or die('I cannot connect to the database.');
mysql_select_db ("mysite_forums")or die("Could not select photopost database");
December 31st, 2006, 08:21 PM
Have you also filled out the edit integration settings in classifieds admin with the proper info table prefix etc? Your server logs give any indications of any errors?
January 12th, 2007, 04:20 AM
I had a similar experience. I upgraded from 2.5 to 2.6 and inc_ads stopped working. I have a customized version on another page that was still working because it was not replaced by the upgrade.
I just replaced the 2.6 version of inc_ads.php with the old version from 2.5 and everything seems to be working fine.
January 12th, 2007, 09:26 AM
As noted you probally had to uncomment the $link and mysql_select lines with database info. Also your correct classifieds table prefix must exist in edit integration settings in admin
January 13th, 2007, 01:34 AM
You were right Chuck (as always).
I did need to uncomment the $link and mysql_select lines and add the MySQL info.
I now need to get rid of the thumbnail frames as before but have posted in the same thread as before for this.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.