The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Phototopost features block on forumhome Details »» | ||||||||||||||||||||||||||||
Phototopost features block on forumhome
Developer Last Online: Aug 2015
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 /> HTML Code:
<!-- /main --> <br /> $photopostfeature <br /> 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:
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:
Show Your Support
|
Comments |
#62
|
|||
|
|||
hi people,
Since so manny people have trouble setting there path ....here's what you can do about it.In your favorite editor create a new PHP source file with this code PHP Code:
change the path to the value it says you stimm may need to adjust it a little |
#63
|
|||
|
|||
But it dosent show the latest picture
Se my picture In the forum Attachment 46449 and from the gallery Attachment 46450 |
#64
|
|||
|
|||
Quote:
PHP Code:
|
#65
|
|||
|
|||
Its strange in the gallery it says latest but in the forum it is not the latest
In the inc-features.php I have // which type of images do you want to show (random, most_view, latest) $q_switch = "latest"; |
#66
|
|||
|
|||
Cool no more index.php edits adter upgrades!
|
#67
|
|||
|
|||
I'm getting:
Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70 |
#68
|
|||
|
|||
any body show code how to edit inc_features.php
|
#69
|
|||
|
|||
im getting this ...
Warning: Unknown(/var/www/html/TTCPhoto/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 322 Warning: (null)(): Failed opening '/var/www/html/TTCPhoto/inc_features.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /index.php(485) : eval()'d code on line 322 |
#70
|
|||
|
|||
Quote:
Now it works great. Thanks. |
#71
|
||||
|
||||
Code:
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"); ?>
Code:
<!-- /main --> <br /> <br /> Code:
<!-- main --> $forumbits <!-- /main --> <!-- what's going on box --> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|