Version: 1.00, by Delphiprogrammi
Developer Last Online: Aug 2015
Version: 3.5.4
Rating:
Released: 03-29-2006
Last Update: 03-29-2006
Installs: 47
Uses Plugins Template Edits
No support by the author.
hi people,
I see people who are heavenly modifying there boards to get this done.This is actually not needed.Photopost includes a files that does this automatically
1)install the plugin
2)tempate modification
template FORUMHOME find this code
HTML Code:
<!-- /main --><br /><br />
replace with
HTML Code:
<!-- /main --><br />
$photopostfeature
<br />
remember to modify the path to inc_features.php(this is a PhotoPost file) if your photopost installation is different from mine
that's all
enjoy
all done no more modifications to the original vb files needed
possible problems
Question:After installation i get an error message like
Quote:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /photopost/inc_features.php on line xx
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /photopost/inc_features.php on line xx
Answer:This Could be because you did not set a value for the $ppdbprefix (database table prefix) Photopost uses.Open your config-int.php and set the correct value for the $ppdbprefix variable
You can also set this in your Photopost Administration panel under "edit integration" (PhotoPost Database Table Prefixes) field
question i don't know what my path should be can you help me ?
PHP Code:
<?php phpinfo(INFO_VARIABLES); ?>
and look at the value of $_SERVER['PATH_TRANSLATED']; this is the serverpath to the file you are currently vieuwing within your webbrowser when you are done remove this file from your server (security )
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
userinfo['usergroupid']; if ( $vbulletin->userinfo['membergroupids'] != "" ) $mygroups .= ",".$vbulletin->userinfo['membergroupids']; } $grouparr = explode( ",", $mygroups ); $resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories"); $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; } } } 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,p.height,p.width,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 "latest": $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.width,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,p.height,p.width,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()"; } $result = mysql_query($query); $counted = 0; $countcol = 0; $featured = ""; while (list($pid,$puser,$puserid,$pcat,$photo,$height,$width,$catname,$cphotos,$cposts) = mysql_fetch_row($result)) { if ( $ViewPerm[$pcat] == 1 ) continue; if ( pp_is_image($photo) ) { $temp_user = $puserid; if ( $height > $width ) $mthumb = ""; else $mthumb = ""; // One box for each feature $featured .= << $mthumb
by {$puser}
? ? ?
$catname
$cphotos photos
$cposts comments
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; $countcol = 0; } } @mysql_free_result($result); // First part is for the featured photos // $photopostfeature not holds the Featured Photos box and $photopostcats (set below) holds the // gallery list $photopostfeature = << Featured Photos
$featured
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"); ?>
i did everything and that is what happends.. i found in my skins i dun have
Code:
<!-- /main -->
<br />
<br />
i do have this
Code:
<!-- main -->
$forumbits
<!-- /main -->
<!-- what's going on box -->
that is the closest i canfind but i get errors
I keep getting the same output at the top of the forum.
I know this will display latest or most viewed, but I'm using it with Photopost Pro Classifieds and was wondering could I use it twice and say call the latest ads in one block and the latest trade ads in another block ?
As you can see here I'm just including the latest ads - Clicky
Never mind, it does work in 3.6. Well, sort of. It's not *technically* showing a picture though, it's showing everything except instead of an image, it's showing a black box where the thumbnail should be...any idea why??
O.K., figured it out. For everybody having the same problem: Go to your PP Admin-Center -> Administration -> Edit Integration -> URL to your PhotoPost DATA directory -> add trailing slash at the end ("data/").