PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > General Forums > General Discussion

General Discussion General use discussion forum for PhotoPost products.

Reply
 
Thread Tools Rate Thread Display Modes
Old April 22nd, 2006, 07:42 PM   #1
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
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?
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 10:00 AM   #2
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
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.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 23rd, 2006, 10:56 AM   #3
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
chuck, thanks for the heads up.

It partialy works. It shows the block with a title of "Featured Ads" but no pictures or content.
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 11:03 AM   #4
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
Remove this line in the file

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 23rd, 2006, 11:15 AM   #5
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
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 01:49 PM.
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 06:59 PM   #6
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
You sure you are looking in our inc_ads.php file. That line explicitly does exist at line 110 of that file.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 23rd, 2006, 07:04 PM   #7
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
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%
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 07:25 PM   #8
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
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.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 23rd, 2006, 07:28 PM   #9
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
I just downloaded this the other day. would you like to log in?
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 07:33 PM   #10
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
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
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 23rd, 2006, 07:38 PM   #11
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
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
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 07:42 PM   #12
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
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
jtorral is offline   Reply With Quote
Old April 23rd, 2006, 07:42 PM   #13
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
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/announcement.php?f=64
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 24th, 2006, 02:01 AM   #14
Frank Woolf
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
Frank Woolf is offline   Reply With Quote
Old April 24th, 2006, 05:26 AM   #15
Frank Woolf
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 06:52 AM.
Frank Woolf is offline   Reply With Quote
Old April 24th, 2006, 08:21 AM   #16
Chuck S
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 75,255
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
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 24th, 2006, 09:30 PM   #17
Frank Woolf
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
Frank Woolf is offline   Reply With Quote
Old April 24th, 2006, 09:49 PM   #18
jtorral
Member
Verified Customer
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 142
comment out this line of code.

if ( $ViewPerm[$pcat] == 1 ) continue;
jtorral is offline   Reply With Quote
Old April 24th, 2006, 10:47 PM   #19
Frank Woolf
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 10:55 PM.
Frank Woolf is offline   Reply With Quote
Old April 24th, 2006, 11:36 PM   #20
Frank Woolf
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
Frank Woolf is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
PhotoPost Classifieds Question MSJA Before You Buy 4 March 2nd, 2006 07:14 AM
Classifieds Question vitoreis Before You Buy 3 January 5th, 2006 06:37 AM
PP Classifieds question sross Before You Buy 1 July 21st, 2005 12:15 PM
Classifieds question CaddisNJF Before You Buy 1 March 12th, 2005 12:59 PM
PP Classifieds question thomas1 Before You Buy 3 August 3rd, 2004 08:59 PM


All times are GMT -5. The time now is 04:16 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.