| Server IP : 23.94.149.180 / Your IP : 216.73.216.147 Web Server : nginx/1.20.1 System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64 User : apache ( 48) PHP Version : 8.6.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /files/webmaint/dseals/www/withgrace/blogcms/admin/plugins/ |
Upload File : |
<?php
/**
* BLOG:CMS: PHP/MySQL Personal Content Management System
* http://blogcms.com/
* http://forum.blogcms.com/
*
* 2003-2004, (c) Radek HULAN
* http://hulan.cz/
*
* Portions of this software are based on Nucleus CMS
* http://nucleuscms.org/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
**/
class NP_BlogWithOffset extends NucleusPlugin {
function getName() { return 'BlogWithOffset'; }
function getAuthor() { return 'Radek HULAN'; }
function getURL() { return 'http://hulan.cz/blog/'; }
function getVersion() { return '0.1 BLOG:CMS'; }
function getDescription() { return 'Like the blog or otherblog skinvars, but accepts limit and/or offset in the query string'; }
function supportsFeature($feature) { if ($feature=='SqlTablePrefix') return 1; else return 0;}
function doSkinVar($skinType, $template, $amount = 10, $category = '' , $blogname = '') {
global $CONF, $blog, $blogid, $startpos, $manager, $catid;
if (!empty($category)) $catid=intval($category);
$limit=getVar('limit');
$offset=getVar('offset');
$data = explode( "/", serverVar( 'REQUEST_URI'));
for ( $i = 1;$i < count( $data);$i++) if ( $data[$i] == 'offset') $offset = intval( $data[$i + 1]);
if ($limit=='') list($limit) = sscanf($amount, '%d');
if ($offset=='') list($temp, $offset) = sscanf($amount, '%d(%d)');
if (!empty($blogname))
$blog =& $manager->getBlog(getBlogIDFromName($blogname));
else
$blog =& $manager->getBlog($blogid);
$skinid = $blog->getDefaultSkin();
$skin = new SKIN($skinid);
$handler = new ACTIONS($skinType);
$parser = new PARSER(SKIN::getAllowedActionsForType($skinType), $handler);
$parser->setProperty('IncludeMode',$skin->getIncludeMode());
$parser->setProperty('IncludePrefix',$skin->getIncludePrefix());
$handler->setSkin($skin);
$handler->parser =& $parser;
$handler->_setBlogCategory($blog,'');
$handler->_preBlogContent('blog',$blog);
$handler->amountfound = $blog->readLog($template, $limit, $offset, $startpos);
$handler->_postBlogContent('blog',$blog);
} // doSkinVar
} // class
?>