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 > PhotoPost Support > PhotoPost Classifieds Support > Classifieds Installation & Upgrades

Classifieds Installation & Upgrades If you're having install or upgrade problems, post here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old December 25th, 2004, 01:35 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Jan 2002
Location: Albany, Oregon
Posts: 207
Ads on my vbPortal page?

Hi all,

Does anyone know if I can get ads to appear on a vbPortal page? I like the thumbincluder idea for Photopost and it appears to work great for me with Photopost. Is there something like this for Photopost-Classifieds?

-- Mike
gholsie is offline   Reply With Quote
Old December 25th, 2004, 05:20 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,680
Make a php block of code to pull the ads

Base the code off the Photopost inc_features.php file as I would refrain from using thumbincluder it is so way outdated.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old December 27th, 2004, 12:22 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Jan 2002
Location: Albany, Oregon
Posts: 207
Omega, can you help a bit? Here's the inc_features.php I am using below. Should I tell it to require config-inc.php instead?

Quote:
<?
//////////////////////////// COPYRIGHT NOTICE //////////////////////////////
// This script is part of PhotoPost PHP, a software application by //
// All Enthusiast, Inc. Use of any kind of part or all of this //
// script or modification of this script requires a license from All //
// Enthusiast, Inc. Use or modification of this script without a license //
// constitutes Software Piracy and will result in legal action from All //
// Enthusiast, Inc. All rights reserved. //
// http://www.photopost.com legal@photopost.com //
// Contributing Developer: Michael Pierce (mpdev.com) //
// //
// PhotoPost Copyright 2004, All Enthusiast, Inc. //
////////////////////////////////////////////////////////////////////////////

require "config-int.php";

// If you have placed PhotoPost into a seperate database, you will need to
// uncomment these lines to connect to the PhotoPost 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 database.
//
//$link = mysql_connect ("localhost", "dbuserid", "dbuserpassword") or die('I cannot connect to the database.');
//mysql_select_db ("pp_database")or die("Could not select photopost database");

// Number of photos to display
$num_display = 7;

// Number of columns (1 for vertical)
$columns = 1;

// which type of images do you want to show (random, most_view, latest)
$q_switch = "random";

// == END CONFIGURATION ==
////////////////////////////////////////////////////////////////////////////

if ( !isset($ViewPerm) ) {
$mygroups = $bbuserinfo['usergroupid'];
if ( $bbuserinfo['membergroupids'] != "" ) $mygroups .= ",".$bbuserinfo['membergroupids'];
$grouparr = explode( ",", $mygroups );

$query = "SELECT id,ugnoview FROM {$pp_db_prefix}categories";
$resultb = mysql_query($query);

$ViewPerm = array();
while ( list( $catugid, $ugnoview ) = mysql_fetch_row($resultb) ) {
$noview=0; $ViewPerm[$catugid] = 1;

$allnoview = explode( ",", $ugnoview );
foreach ($allnoview as $key) {
if (in_array($key, $grouparr) ) {
$noview=1;
}
}

if ( $noview == 0 ) {
$ViewPerm[$catugid]=0;
}
}
mysql_free_result( $resultb );
}

function pp_get_ext( $filename ) {
return substr($filename, strrpos($filename,"."));
}

function pp_is_image( $filename ) {
$retval = 0;

$mediatypes = array( ".jpg", ".gif", ".png", ".bmp" );
$ext = pp_get_ext( $filename );

if ( in_array(strtolower($ext), $mediatypes) )
$retval = 1;

return( $retval );
}

//
// Featured Photos Code
// Follow down to End Feature Photos Code
//

switch ($q_switch) {
case "most_view":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY views DESC";
break;

case "lastest":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY date DESC";
break;

default:
$query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,c.catname,c.photos,c.posts
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat
WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0
ORDER BY RAND()";
break;
}
$result = mysql_query($query);

$counted = 0; $countcol = 0; $featured = "";

while (list($pid,$puser,$puserid,$pcat,$photo,$catname,$cphotos,$cposts) = mysql_fetch_row($result)) {

if ( $ViewPerm[$pcat] == 1 ) continue;

if ( pp_is_image($photo) ) {
$photolen = strlen($photo);
$theext = pp_get_ext($photo);
$photo_name = str_replace( $theext, "", $photo );

$temp_user = $puserid;

$thumbtag = "{$full_path}$pcat/$puserid{$photo}";
$mthumb = "<img border=\"0\" src=\"{$data_dir}{$pcat}/$puserid{$photo_name}-thumb{$theext}\" alt=\"\" />";

// One box for each feature
$featured .= <<<PPPRINT
<td align="center" bgcolor="#FFFFFF" width="100%">
<table cellpadding="0" cellspacing="0" width="167">
<tr height="14"><td colspan="3"><img height="14" width="167" src="{$url_path}/images/photostackTop.gif" border="0"></td></tr>
<tr>
<td width="16"><img height="101" src="{$url_path}/images/photostackLeft.gif" width="16" border="0"></td>
<td width="135" bgcolor="#000000" align="center" valign="middle"><a href="{$url_path}/showphoto.php?photo=$pid">$mthumb</a></td>
<td width="16" align="right"><img height="101" src="{$url_path}/images/photostackRight.gif" width="16" border="0"></td>
</tr>
<tr height="14"><td colspan="3"><img height="14" width="167" src="{$url_path}/images/photostackBottom.gif" border="0" /></td></tr>
</table>
<font size="1" face="verdana,arial">by {$puser}<br /><a href="{$url_path}/showgallery.php?cat={$pcat}">$catname</a></font>
</td>
PPPRINT;
$counted++;
$countcol++;
}

// If we've reached our limit, quit
if ( $counted == $num_display ) break;

// If we need to end the column, do so.
if ( $countcol == $columns ) {
$featured .= <<<PPPRINT
</tr>
<tr>
PPPRINT;
$countcol = 0;
}
}
@mysql_free_result($result);

// Add on the ending tag
$featured .= "</tr>";

// First part is for the featured photos
// $photopostfeature not holds the Featured Photos box and $photopostcats (set below) holds the
// gallery list

$photopostfeature = <<<PPPRINT
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
<thead>
<tr>
<td class="tcat" colspan="1" align="center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('featurepal');"><img id="collapseimg_featurepal" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_featurepal].gif" alt="" border="0" /></a>
Featured Photos
</td>
</tr>
</thead>
<tbody id="collapseobj_featurepal" style="$vbcollapse[collapseobj_featurepal]">
$featured
</tbody>
</table>
</td>
</tr>
</table>
<br />

PPPRINT;

//
// End Featured Photos Code
//

// If you use PhotoPost in a seperate database from vB, you'll need to reselect the vB database!
//mysql_select_db ("vb_database");

?>
gholsie is offline   Reply With Quote
Old December 27th, 2004, 08:40 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,680
You should be able to do it like this

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 online now   Reply With Quote
Old January 8th, 2005, 02:31 PM   #5 (permalink)
Member
Verified Customer
 
Join Date: Jan 2002
Location: Albany, Oregon
Posts: 207
That didn't work. I'd like to put a small side block on my main vbPortal page showing the latest classified ads (no pictures). Anyone done this?
gholsie is offline   Reply With Quote
Old February 12th, 2005, 10:49 PM   #6 (permalink)
Member
Verified Customer
 
Join Date: Jul 2003
Posts: 93
anyone?
cnczone is offline   Reply With Quote
Old February 13th, 2005, 10:00 AM   #7 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,680
Coding Modifications can be asked on Photopostdev.com

I posted over there a mod to show ads on the VB main index.

Basically the same goes true for VBPortal.

You might need to uncomment the link and select database lines to grab the info

Basically you need to make a php block with all the proper info.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old January 12th, 2007, 07:10 PM   #8 (permalink)
Member
Verified Customer
 
Join Date: Jan 2002
Location: Albany, Oregon
Posts: 207
Hi Chuck, it looks like photopostdev.com is gone. Can you help us create one of these?
gholsie is offline   Reply With Quote
Old January 12th, 2007, 07:23 PM   #9 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,680
This is a very old thread. The Classifieds has an inc_ads.php file like Photopost has where you can set up featured ads.

http://www.photopost.com/forum/showp...32&postcount=1

You should be able to see the include needed but basically you create a php block in phpportals and echo the results. You should post in the mod forum on this type of thing.

Sorry but the very essense of my job work load dealing with support does not allow me free time to play with mods.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PhotoPost Classifieds... Random or Most Recent ads on Front Page of Vbulletin? Chris@TSE Classifieds How do I...? 31 November 8th, 2005 07:02 PM
Add the catagory name to the "Latest Ads" page? rs25.com Photopost Pro How Do I...? 0 October 17th, 2005 05:22 PM
Recent Ads on vBportal sideblock??? jdebuck Classifieds Installation & Upgrades 3 September 14th, 2005 09:11 AM
Feature requests: Payment for renewing ads - List of close to expiring ads - & more criscokid Classifieds Suggestions 1 August 4th, 2005 07:17 AM
Display recent ads on non-vB/PP page katman Classifieds Installation & Upgrades 1 January 13th, 2005 07:53 AM


All times are GMT -5. The time now is 08:02 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0