Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-07-09 20:04:49

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: soo_page_numbers: page counting and navigation widgets

Working good so far :)


~ Cameron

Offline

#14 2009-07-09 20:41:45

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_page_numbers: page counting and navigation widgets

I’ll make it official then: now at version 0.2.3. Thanks for the help in bug-stomping, Driz.


Code is topiary

Offline

#15 2009-07-16 15:38:50

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: soo_page_numbers: page counting and navigation widgets

Found a new bug. If you a view a page with no content so for example: domain.com/section/category/ and their are no articles in that category it will output Page 1, when it shouldn’t be saying Page 1 because their is only page anyways.


~ Cameron

Offline

#16 2009-07-16 16:02:26

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_page_numbers: page counting and navigation widgets

Ta driz: in both tags, replace this line:

if ( ! $showalways and $numPages == 1 ) return;

with this:

if ( ! $showalways and $numPages <= 1 ) return;

Seems to work; please test it and I’ll release a new version.


Code is topiary

Offline

#17 2009-07-16 16:52:43

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: soo_page_numbers: page counting and navigation widgets

works great


~ Cameron

Offline

#18 2009-07-16 17:10:16

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_page_numbers: page counting and navigation widgets

Great — v 0.2.4 released.


Code is topiary

Offline

#19 2009-09-10 08:03:22

kostas45
Member
From: Greece
Registered: 2007-11-08
Posts: 61

Re: soo_page_numbers: page counting and navigation widgets

Jeff, can we have some usage examples of your plugin please?

Thanks,
Kostas

Offline

#20 2009-09-10 09:00:48

txpnisti
Member
Registered: 2009-02-25
Posts: 23

Re: soo_page_numbers: page counting and navigation widgets

Great plugin, just one question: should this paginate search results also? If I add this to my custom search results landing page, numbers are linking very randomly if I can see. They lead even to a different section. Perhaps something with my setup, but I just wanted to be sure.

Offline

#21 2009-09-10 11:25:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: soo_page_numbers: page counting and navigation widgets

txpnisti: Yes, the plugin should work with search results. Please describe your custom search page, and the kind of URLs the plugin is giving you.

Kostas: Let me work on that. Any particular usage you are interested in?

All: Pardon me if I am slow to respond this week; I have only intermittent online access.


Code is topiary

Offline

#22 2009-09-10 13:05:47

txpnisti
Member
Registered: 2009-02-25
Posts: 23

Re: soo_page_numbers: page counting and navigation widgets

jsoo, thanks for the info. So it is something with my setup then. Let me try to explain:

In every page I have the search: form method=“get” action=“http://sub.domain.com/searchresults/”

And I have a section named “searchresults” for results. It works fine with built in pagination controls.

But when I add this widget there, if seeing right, pagination links are pointing to the section where you were when you hitted the search. (if you used search from the section “about”, search result pagenumbers points then to that section – with correct page number still attached)

So instead showing additional pages on custom search page, they are shown on previously visited section/its template.

Along the subdomain installation, I also have MLP installed. These both maybe could affect. But it still doesn’seem to mess with languages, just with sections.

Offline

#23 2009-09-10 13:25:32

kostas45
Member
From: Greece
Registered: 2007-11-08
Posts: 61

Re: soo_page_numbers: page counting and navigation widgets

jsoo wrote:

Kostas: Let me work on that. Any particular usage you are interested in?

I am using smd_query in a form to do fulltext search against keywords field.
I am trying to figure out if I can use your plugin to paginate resulting rows.

Thanks,
Kostas

Offline

#24 2009-09-10 14:11:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,476
Website GitHub

Re: soo_page_numbers: page counting and navigation widgets

kostas45 wrote:

I am using smd_query in a form … I am trying to figure out … paginate resulting rows.

As an aside, you can do it with smd_query (perhaps in tandem with this plugin) and supply smd_query with an offset to its LIMIT N,MAX. Use the URL vars to send the page number to each page, sanitize the value to make sure it’s numeric and then plug the relevant values into the query, where N is the page number * number of items you want to show per page.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB