vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Couldnt find a featured block / attempted making one / [not a coder] (https://vborg.vbsupport.ru/showthread.php?t=133481)

imported_infitech 12-08-2006 05:15 AM

Couldnt find a featured block / attempted making one / [not a coder]
 
1 Attachment(s)
I couldn't find a featured block for photopost pro 5.6.1 that worked the way i wanted it to, so what i did was attempt to make one. Im not a coder so this was the best i could do.


what i did was get rid of
$header
$navbar
in the forumhome

and edited the plugin with
Code:

include('./gallery/index_featured.php');
and used a file that i created out of the gallery index that i saved as index_featured.php
the code is as follows:
PHP Code:

<?php
//////////////////////////// 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 (http://www.mdpnet.com)         //
//                                                                        //
//            PhotoPost Copyright 2006, All Enthusiast, Inc.              //
////////////////////////////////////////////////////////////////////////////

if ( isset($argv[0]) && is_numeric($argv[0]) )
{
    
header("Location: {$Globals['maindir']}/showphoto.php?photo={$argv[0]}");
    exit;
}

require 
"pp-inc.php";

$PATH_INFO findenv("PATH_INFO");
if ( isset(
$PATH_INFO) && $Globals['spider'] == "yes" )
{
    
$test explode('/'substr($PATH_INFO,1));
    for( 
$i=0$i count($test); $i++ )
    {
        if( 
$i == )
        {
            
$_REQUEST[$test[$i]] = $test[$i+1];
        }
    }
}

if ( 
file_exists("{$Globals['maindir']}/install.php") || file_exists("{$Globals['maindir']}/upgrade.php") )
{
    
diewell"For security reasons, please remove the install.php and upgrade.php scripts from the PhotoPost directory before proceeding." );
}

typecast($_REQUEST, array('page' => INT'cat' => INT));
typecast($_COOKIE, array('ppcollapse' => STRING));

// Init variables
if ( empty($page) ) $page 1;

authenticate();

if ( 
$Globals['ppboards'] == "closed" && $User['adminedit'] != )
{
    
diewell$Globals['closedmsg'] );
}

$tablehead $Globals['pp_lang']['tablehead'];

if ( 
$cat )
{
    if (
$CatPerms['ugview'][$cat] == )
    {
        
diewell$Globals['pp_lang']['noview'] );
    }

    if ( 
trim($CatPerms['catpass'][$cat]) && $User['adminedit'] != )
    {
        if ( !isset(
$catp) ) $catp null;

        if ( 
$catp != $CatPerms['catpass'][$cat] )
        {
            
get_password$cat );
            exit;
        }
    }

    
$ctitleq ppmysql_query("SELECT id,theme,sortorder,frames,intro,introtitle,introcopy FROM {$Globals['pp_db_prefix']}categories WHERE id=$cat"$link);
    
$catinfo mysql_fetch_array($ctitleq);

    if ( !
preg_match("/([\<])([^\>]{1,})*([\>])/i"$catinfo['introtitle']) ) {
        
$catinfo['introtitle'] = preg_replace("/(\r\n|\r|\n)/i","<br />"$catinfo['introtitle']);
    }

    if ( !
preg_match("/([\<])([^\>]{1,})*([\>])/i"$catinfo['introcopy']) ) {
        
$catinfo['introcopy'] = preg_replace("/(\r\n|\r|\n)/i","<br />"$catinfo['introcopy']);
    }

    
// Nonstandard theme
    
if ( $catinfo['theme'] )
    {
        
$Globals['theme'] = $catinfo['theme'];
        if ( 
is_dir"{$Globals['PP_PATH']}/stylesheets/{$Globals['theme']}) )
        {
            
$Globals['idir'] = "{$Globals['maindir']}/stylesheets/{$Globals['theme']}";
        }
    }

    
// Non standard frames
    
if ( !empty($catinfo['frames']) )
    {
        unset( 
$Globals['thumbstd'] );
        include( 
"{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/{$catinfo['frames']}.tmpl" );
    }

    if ( 
$User['userid'] > && $Globals['displaynew'] == "yes" )
    {
        
ppmysql_query("REPLACE INTO {$Globals['pp_db_prefix']}laston VALUES($cat,{$User['userid']},$lasttimeon)"$link);
    }

    
$tablehead $CatPerms['catname'][$cat];
    
childsub($cat);
    
$childnav "<span class=\"{$Style['small']}\"><a href=\"{$Globals['maindir']}/\">{$Globals['pp_lang']['home']}</a> $childnav</span>";
    
$searchcat $cat;
}
else
{
    if ( 
$User['username'] && $User['username'] != "Unregistered" )
    {
        
$childnav "{$Globals['pp_lang']['welcomeuser']} {$User['username']}";
    }
    else
    {
        
$childnav "{$Globals['pp_lang']['welcome']} {$Globals['galleryname']}!";
    }
    
$searchcat "all";
}

topmenu();
printheader$cat$tablehead );


      

//
// Generate the page
//


if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "no" && $page == )
{
    
display_gallery("latest");
}

if ( 
$Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "yes" && $page == )
{
    
display_gallery("latest");
}


?>

This seemed to work well accept for the fact that none of my phrases are showing.



SCREENSHOTS ARE ATTACHED



My post at the Photopost pro "mods" forum:
Quote:

Originally Posted by sinjix;1181322 @photopost.com
Is there any way i can set them to regular thumbnails?

Quote:

Originally Posted by sinjix;1182876 @photopost.com
can u please instruct me as to how i would have my thumbnails show up as regular thumbnails without rounded edges?



All times are GMT. The time now is 07:36 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.01498 seconds
  • Memory Usage 1,778KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete