 | |  | | | General Discussion General use discussion forum for PhotoPost products. |
April 22nd, 2006, 08:42 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
| Integrating classifieds question
I run a forum with vbportal for a front end. www.rangefinderforum.com
i would like to be able to show recent ads in the forum or on the front page. I could create a block for recent ads but how would I show them? Any ideas?
|
| |
April 23rd, 2006, 11:00 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Our classifieds software has an inc_ads.php file. You could setup a center block in vbportal and include the file and echo the variable $classifiedsfeature to show the block.
|
| |
April 23rd, 2006, 11:56 AM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
chuck, thanks for the heads up.
It partialy works. It shows the block with a title of "Featured Ads" but no pictures or content.
|
| |
April 23rd, 2006, 12:03 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Remove this line in the file Code: Content visible to verified customers only.
|
| |
April 23rd, 2006, 12:15 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
does not exist anywhere. i just did a
grep -i "Content visible" *.php
and nothing.
I also did from pp root
find . -depth -exec grep -i "content visible" /dev/null {} \;
Last edited by jtorral; April 23rd, 2006 at 02:49 PM.
|
| |
April 23rd, 2006, 07:59 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
You sure you are looking in our inc_ads.php file. That line explicitly does exist at line 110 of that file.
|
| |
April 23rd, 2006, 08:04 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
below is line 110 and then some. look at the last line. its my vi info while (list($pid,$puser,$puserid,$pcat,$ptitle,$product,$views) = mysql_fetch_row($result)) {
if ( $ViewPerm[$pcat] == 1 ) continue;
if ( cl_is_image($product) ) {
$temp_user = $puserid;
$productlen = strlen($product);
$theext = cl_get_ext($product);
$product_name = str_replace( $theext, "", $product );
$thumbtag = "{$cldata_dir}{$pcat}/thumbs/{$product}";
$image_stats = getimagesize( $thumbtag );
$width = $image_stats[0];
$height = $image_stats[1];
if ( $height > $width )
@ "inc_ads.php" 200 lines --55%-- 110,1 56% |
| |
April 23rd, 2006, 08:25 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Line 110 of our supported file in the download of classifieds is the line meantioned however the line I am telling you to remove is right there in your file although possibly line 113 of your file. You see it above remove the line. Code: Content visible to verified customers only.
|
| |
April 23rd, 2006, 08:28 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
I just downloaded this the other day. would you like to log in?
|
| |
April 23rd, 2006, 08:33 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Line 110 is the line I have posted in this thread. Just remove the line if you want to run this block in vbportal. The block works as supported on the vbulletin forumhome as coded. To use in vbportal though you need to remove the viewperm line
|
| |
April 23rd, 2006, 08:38 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
chuck. I have just unzipped the zipfile again. looking at inc_ads.php there is no line that says.
Content visible to verified customers only.
Are you sure you dont want to look. you dont need to fix anything, just see for yourself.
JT
|
| |
April 23rd, 2006, 08:42 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
here is the entire content of inc_ads.php straight from the zip file. Code: Content visible to verified customers only.
PLEASE DO NOT POST OUR CODE TO THE OPEN PUBLIC -- I have wrapped it in a code tag for you
|
| |
April 23rd, 2006, 08:42 PM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Your not seeing the code I am posting because your not a verified customer hense your not looking for the correct line in the file since you can not see what I am posting. Read this thread to verify yourself http://www.photopost.com/forum/before-you-buy/announcements.html |
| |
April 24th, 2006, 03:01 AM
|
#14 (permalink)
| | Member Verified Customer
Join Date: May 2004
Posts: 118
|
Hi Chuck,
I have been trying to get this working for a while. I am using vbPortal and have deleted the line as per your instructions.
I used the following code in the vbPortal module:
echo require "../classifieds/inc_ads.php";
When I preview I get these errors:
Content
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/asia/public_html/classifieds/inc_ads.php on line 56
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/asia/public_html/classifieds/inc_ads.php on line 108
1
|
| |
April 24th, 2006, 06:26 AM
|
#15 (permalink)
| | Member Verified Customer
Join Date: May 2004
Posts: 118
|
Tried lots of variations including this one:
@include('/home/asia/public_html/classifieds/inc_ads.php');
print $classifiedfeature;
This does not return errors but dose not show anything on the page either.
If I remove the @ I get errors.
I just discovered that adding an s to make it $classifiedsfeature makes the module header show up on the page but there is no content
Last edited by Frank Woolf; April 24th, 2006 at 07:52 AM.
|
| |
April 24th, 2006, 09:21 AM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
If you get mysql errors your issue is this as noted in the instructions for applying the inc_ads.php hack. Quote:
If you have PhotoPost and vB in different databases, you'll need to scroll to the script and uncomment the mysql_select_db() command (on line 26) and insert your Classifieds database name and uncomment the mysql_select_db on line 310 and add your vB3 database in quotes. If your username password is different to connect to the databases then you will need to uncomment the $link statement and fill in the proper variables for the host username and password to access the photopost database | |
| |
April 24th, 2006, 10:30 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: May 2004
Posts: 118
|
Sorry I should have mentioned that vbPortal, vBulletin and PPClassifieds are all using the same database with vbp_ vp_ and pp_ prefixes.
My test page (link below) shows all is working together including skins but I can't get the ads from PPClassifieds to show (at the bottom of the page). http://www.asia-classifieds.com/modu...ndex&name=test |
| |
April 24th, 2006, 10:49 PM
|
#18 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: Portland, Oregon
Posts: 116
|
comment out this line of code.
if ( $ViewPerm[$pcat] == 1 ) continue;
|
| |
April 24th, 2006, 11:47 PM
|
#19 (permalink)
| | Member Verified Customer
Join Date: May 2004
Posts: 118
|
Thanks but I already took out the line as per Chuck's advice earlier in this thread.
I looked at your site and was going to ask how you did it but removing the line of code did not solve the problem for me.
Last edited by Frank Woolf; April 24th, 2006 at 11:55 PM.
|
| |
April 25th, 2006, 12:36 AM
|
#20 (permalink)
| | Member Verified Customer
Join Date: May 2004
Posts: 118
|
It might help to see what the errors are if I take out the @
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/asia/public_html/classifieds/inc_ads.php on line 56
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/asia/public_html/classifieds/inc_ads.php on line 108
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 07:13 AM. | |