vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Phototopost features block on forumhome (https://vborg.vbsupport.ru/showthread.php?t=111699)

Delphiprogrammi 04-25-2006 07:28 AM

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:

phpinfo(INFO_VARIABLES); 

and look at the values of
  • $_SERVER['DOCUMENT_ROOT];
  • $_SERVER['SCRIPT_FILENAME'];
  • $_SERVER['PATH_TRANSLATED'] //complete serverpath to current file

change the path to the value it says you stimm may need to adjust it a little

wrang 04-25-2006 10:48 AM

But it dosent show the latest picture

Se my picture
In the forum
Attachment 46449

and from the gallery
Attachment 46450

Delphiprogrammi 04-25-2006 12:02 PM

Quote:

Originally Posted by wrang
But it dosent show the latest picture

Se my picture
In the forum
Attachment 46449

and from the gallery
Attachment 46450

inc-features.php

PHP Code:

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


wrang 04-25-2006 04:25 PM

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";

dutchbb 04-30-2006 05:15 PM

Cool no more index.php edits adter upgrades!

cavyspirit 05-07-2006 12:27 AM

I'm getting:

Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70

junaid 05-07-2006 12:15 PM

any body show code how to edit inc_features.php

YOimYO 05-07-2006 02:10 PM

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

cavyspirit 05-07-2006 03:11 PM

Quote:

Originally Posted by cavyspirit
I'm getting:

Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70

Fixed my problem. I had already tried to install manually. Just had to remove what I had done.

Now it works great. Thanks.

Dark s.s. Trunk 07-27-2006 07:24 PM

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"); ?>

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


All times are GMT. The time now is 05:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01332 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete