Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Phototopost features block on forumhome Details »»
Phototopost features block on forumhome
Version: 1.00, by Delphiprogrammi Delphiprogrammi is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

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.

Comments
  #62  
Old 04-25-2006, 07:28 AM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #63  
Old 04-25-2006, 10:48 AM
wrang wrang is offline
 
Join Date: Oct 2004
Location: Sweden
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But it dosent show the latest picture

Se my picture
In the forum
Attachment 46449

and from the gallery
Attachment 46450
Reply With Quote
  #64  
Old 04-25-2006, 12:02 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"
Reply With Quote
  #65  
Old 04-25-2006, 04:25 PM
wrang wrang is offline
 
Join Date: Oct 2004
Location: Sweden
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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";
Reply With Quote
  #66  
Old 04-30-2006, 05:15 PM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool no more index.php edits adter upgrades!
Reply With Quote
  #67  
Old 05-07-2006, 12:27 AM
cavyspirit cavyspirit is offline
 
Join Date: Jan 2004
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting:

Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70
Reply With Quote
  #68  
Old 05-07-2006, 12:15 PM
junaid junaid is offline
 
Join Date: Oct 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any body show code how to edit inc_features.php
Reply With Quote
  #69  
Old 05-07-2006, 02:10 PM
YOimYO YOimYO is offline
 
Join Date: Oct 2005
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #70  
Old 05-07-2006, 03:11 PM
cavyspirit cavyspirit is offline
 
Join Date: Jan 2004
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #71  
Old 07-27-2006, 07:24 PM
Dark s.s. Trunk's Avatar
Dark s.s. Trunk Dark s.s. Trunk is offline
 
Join Date: Apr 2004
Location: Good Guestion its dark
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


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


All times are GMT. The time now is 10:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05492 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete