ource Advocate

Jan 09, 2004 - 05:42 PM
Submit News :: FAQ :: Advanced Search :: Reviews 
Search   
Main Menu
· Home
· Downloads

QuickNotes
·  Job Task(s)
· additional security
· apache notes
· apache php w/pdf
· backuping up using tar
· check size of shares
· Cisco logging
· cisco redirect to squid proxy
· cisco troubleshooting notes
· commands using ssh/rsync
· Corp. E-mail sig
· Create favico
· create rpm notes
· customized bashrc
· CVS notes
· db of MAC address
· Eclipse as a phpeditor
· example sync script rh401
· Exchange recovery notes
· find examples
· find music files on fileserver
· fwbuilder script
· Install Keystone Helpdesk
· Jabber Notes
· linux perf tuning
· mkisofs examples
· mod_mp3 notes
· moving away from Exchange
· mp32wav
· mp3proc script
· mysql backup script 1
· mysql backup script 2
· Mysql Presentation
· MySQL replication
· named setup notes
· nbtscan notes
· Network Documentation
· nmap to mysql
· perl MySQL::DBI
· php compile option
· Piranha httpd.conf with ssl
· Piranha lvs.cf
· posix ACLs
· regular expressions
· RH kickstart example
· rsync --daemon
· samba notes
· secure cisco router
· sldap.conf notes
· squid config
· ssh trick 1
· stunnel and mysql
· sync file example rh401
· tar backup script
· tcpdump notes
· User Diskusage report
· using fping
· using mod_rewrite
· using mrtg
· Using ucd-snmp-utils
· various commands
· vsftpd cfg 1
· Webdav setup
· winnt stuff
· wipe drive

pccs-linux.com #>
 Username
 Password
 Remember me


Don't have an account yet? You can create one. As a registered user you have some advantages like a theme manager, comments configuration and posting comments with your name.

Postnuke NewsModule pagination
Posted by: cthorn on Aug 11, 2003 - 08:45 PM
PCCS-Linux.COM Giving the responsibility of finding a pagination solution since I recommend using Postnuke.

I looked at:

Postnuke's API and found that if I used pnHTML() I could use $output->Pager()
ADODB Pager functions - unusable for pn (my 2 cents)
Envolution - found printlink()

I decided to modify the printlink() from Envolution because it allowed me to modify the least amount of code.
As a result of extracting, modifing and renaming printlink(). I had pagination support for the News module.

minor changes to file: index.php are required to make this work.

change
$articles = getArticles($whereclause, $storyorder, $storynum);

to this
$articles = getArticles($whereclause, $storyorder, $storynum, $startnum);


add this before the getArticles function

$startnum=$_GET['startrow'];
if(!$startnum) {
$startnum = 0;
}

what it should look like...

$startnum=$_GET['startrow'];
if(!$startnum) {
$startnum = 0;
}

$articles = getArticles($whereclause, $storyorder, $storynum, $startnum);

Using the function in your theme file.

We're using AutoThemes so I modifed the custom modules news template
adding something like this...

include_once('modules/News/pnnewspager.php');
if($_GET['file'] == "article") {
// don't display when viewing a article
}
else {
pn_newspager();
}

Download
 
Related links
· More about PCCS-Linux.COM
· News by cthorn


Most read story in PCCS-Linux.COM:
PHP Projects @ PCCS-Linux.COM done by cthorn


Postnuke NewsModule pagination | Login/Create an account | 0 Comments
Threshold
Comments are owned by the poster. We aren't responsible for their content.
Report Bugs :: Tasks :: Developers 

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me
This web site was made with PostNuke, a web portal system written in PHP. PostNuke is Free Software released under the GNU/GPL license.
You can syndicate our news using the file backend.php
PCCS-Linux.COM ::ource Advocate Articles catalogue
2000 2002