473,574 Members | 2,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Smarty and pager plugin

Hello,
can someone show use example use smarty pager plugin? {pager
rowcount=$LISTD ATA.rowcount limit=$LISTDATA .limit txt_first=$L_MO RE
class_num="fl" class_numon="fl " class_text="fl" }

I'm fighing with it for 5 hours, and still don't have any results :(

Slawek,Poland

Jul 17 '05 #1
1 7177
On Mon, 05 Jan 2004 21:23:44 +0100, S³awomir Marcinkowski wrote:
Hello,
can someone show use example use smarty pager plugin? {pager
rowcount=$LISTD ATA.rowcount limit=$LISTDATA .limit txt_first=$L_MO RE
class_num="fl" class_numon="fl " class_text="fl" }

I'm fighing with it for 5 hours, and still don't have any results :(

Slawek,Poland

Never tried the pager plugin but have just written one myself that has a
heap of configurable options (not all required.. and simple to use). It's
a "first version hack" but appears to work as intended. I posted it
publically on the Smarty forum at:
<http://www.phpinsider. com/smarty-forum/viewtopic.php?t =1604>
Run-down of options for the params as per the comment and 2 quick examples:

* Param Options:
* --------------
* str page_file | Used for /foo.php?pg=1 style URIs
* int page | Current page: ?pg=1
* int max_items | Max items to display per page
* int total_items | Total number of items for displaying
* [str prev_image] | Optional path to image for 'Previous'
* [str next_image] | Optional path to image for 'Next'
* | Both of the above paths are relative to
* | the DOCUMENT_ROOT
* [str google_friendly] | Default: no (yes|no) Use 'foo.php/1'
* | rather than 'foo.php?pg=1'
* | (your code needs to use the correct
* | format itself to use this option.
* | ie: $_SERVER['PATH_INFO'])
* [str use_query_strin g] | Default: yes (yes|no) Whether or not
* | to use the query '/1' or '?pg=1' style
* | URIs or not. This option overrides
* | page_file if defined as "no"
* [str prev_page] | If not using the query_string method, you
* | can specify 'page2.php' for example
* [str next_page] | Likewise for prev_page, the next page can
* | also be defined.
*
*
* Example:
* --------
* {pagination page_file="/gallery.php" page=$page_num max_items=6 total_items=$to tal_items prev_image="/graphics/prev.png" next_image="/graphics/next.png" google_friendly ="yes"}
*
* {pagination page=$page_num max_items=6 total_items=$to tal_items
use_query_strin g="no" prev_page="/page1.php" next_page="/page3.php"}
Hope this is of some use to someone =)

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
Programming, Web design, development & hosting.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15464
by: Brian | last post by:
Hello, I am trying to work out how to have smarty use a string's contents as the display-> template.. ie: $smarty->display($buffer); obviously $buffer isn't a filename, but a smarty template inside a string variable. Take this example:
1
2301
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem is I cannot figure out how to pass value between smarty and PHP. Going from php to smarty I've tried this: {php} $smarty = new Smarty;...
1
2297
by: Jim Red | last post by:
Hello I have a Smarty(.php.net) Question. I want to create a Navigation with a Smarty Template. How can I display an Array recursively? Do I have to write a Plugin?
2
2600
by: M | last post by:
Hi Folks, I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS v6 The following PHP File: <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
0
1576
by: Matt | last post by:
geez, i've done this a million times, you'd think i could get it right. uploading to production server for a new site, and part of the head.inc that starts everything up looks like this: echo SMARTY_DIR."Smarty.class.php<br>"; require_once(SMARTY_DIR."Smarty.class.php"); if (substr(phpversion(),0,1) == "4") { $smarty = new Smarty;
1
496
by: M D | last post by:
Is there any framework or plugin for smarty which can be used with Ajax? M
2
3723
by: Man-wai Chang | last post by:
I meant something like: {section name=j start=0 loop=10 step=1} {php} $xx={$smarty.section.j.index}; echo $xx; {/php} {/section} -- iTech Consulting Services Limited Expert of ePOS solutions Website: http://www.itech.com.hk (IE only)
1
2681
by: teddysnips | last post by:
NEWBIE ALERT!!! Using CMSMadeSimple When I try to browse my index.php page I get the following errors (this is just a sample - there are another 7 in the same format. string(102) "Smarty error: : unknown tag - 'title' (core.load_plugins.php, line 123)" string(111) "Smarty error: : unknown tag -
6
3089
by: K. | last post by:
Hello! I have a problem with using php on smarty web page I would like to use a php code from this web page: http://www.money.pl/webmaster/# i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>
0
7710
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8040
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8092
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6437
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5610
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5296
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1051
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.