Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2006-10-17 02:17:20

wordgasm
Member
Registered: 2006-05-17
Posts: 83
Website

Re: [plugin] [ORPHAN] ob1_pagination

does this work for individual articles? if so, can it navigate individual articles through pictures instead of texts? cos that’d be great for navigating through photoblogs.. using thumbnails as navigation I mean.. :)

Offline

#38 2007-01-16 14:01:30

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,002
Website GitHub Mastodon Twitter

Re: [plugin] [ORPHAN] ob1_pagination

There is a slight omission of unencoded ampersands on line 42 of the plugin resulting in non valid code. Easy to correct manually but it would be cool is the official version is ok too. It took me a lot of time to discover this as the ‘error’ it only appears when the plugin is used in search.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#39 2007-01-16 14:11:33

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: [plugin] [ORPHAN] ob1_pagination

@colak: there are a few more errors it the original plug-in (empty $_GETs and stuff like that). I have corrected most of the errors months back, fixed another one yesterday and just escaped all & properly. Updated plugin code.

Offline

#40 2007-01-21 21:48:18

RsQ
Member
Registered: 2006-12-13
Posts: 10

Re: [plugin] [ORPHAN] ob1_pagination

Hi all,

I integrated the plugin into my site today and everything seems to work fine (so thanks for the plugin, first!) – BUT:

on my site it’s possible to chose the number of entries to display per page by user (the LIMIT-value can be added via drop-down at the bottom of the page and stored then into a session variable, the page is reloaded using the new LIMIT value).

Unfortunately it seems that doesn’t fit to the ob1_googlenav logic. If I use my standard limit (10), everything works as it should (for testing reasons I have 21 entries, so currently there are 3 pages). After changing the limit to 25, there should be only one page left in the navigation – but there’re still three.

Any idea how to fix it? Maybe something with “session_start()” or resetting the values for every use of the plugin?!?

Asked in another way: where does ob1_googlenav get the number of articles per page? (if I knew this, there would possibly be a workaround)

Best regards,

Stefan

Last edited by RsQ (2007-01-21 21:54:32)

Offline

#41 2007-01-22 02:52:28

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: [plugin] [ORPHAN] ob1_pagination

RsQ wrote:

Asked in another way: where does ob1_googlenav get the number of articles per page? (if I knew this, there would possibly be a workaround)

Stefan, if you look at the top of the plugin, you should see something like this

if (is_array($thispage)) { extract($thispage); $currentTab = $pg; $numberOfTabs = $numPages; }else{ $currentTab = 1; $numberOfTabs = 1; }

You should be able to take if from here (it’s the global $thispage). Don’t forget functions such as dmp() (txp in-built) and die() when trying to figure things out. Enjoy ;).

Offline

#42 2007-01-22 21:52:30

RsQ
Member
Registered: 2006-12-13
Posts: 10

Re: [plugin] [ORPHAN] ob1_pagination

@gerhard: Thanks for your answer! Now I fixed it the following way:

I changed the line

$numberOfTabs = $numPages;

into

$numberOfTabs = ($thispage['total']/$_SESSION['anz']); /* ($_SESSION[‘anz’] is the number of entries per page) */

and added

if($numberOfTabs<1) { $numberOfTabs = 1; };

(because there was no number shown when all entries fit to one page)

Guess what: it works!

Stefan

Offline

#43 2007-01-22 22:35:39

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: [plugin] [ORPHAN] ob1_pagination

RsQ wrote:

$numberOfTabs = ($thispage['total']/$_SESSION['anz']); /* ($_SESSION[‘anz’] is the number of entries per page) */
and added
if($numberOfTabs<1) { $numberOfTabs = 1; };

Stefan, $numberOfTabs = ceil(($thispage['total']/$_SESSION['anz'])); alone should have done the trick ; ).

Offline

#44 2007-01-24 20:20:17

coopersita
Member
Registered: 2005-09-28
Posts: 68
Website

Re: [plugin] [ORPHAN] ob1_pagination

I don’t know what I’m doing wrong, but with the following code:

<txp:if_section name=“testimonials”>
<h2>Testimonials</h2>
<txp:if_article_list>
<txp:article_custom allowoverride=“0” limit=“1” listform=“bodyonly” pgonly=“0” section=“testimonials” status=“5” />
<txp:article listform=“titlebody” limit=“1” />
<txp:ob1_googlenav previoustext=“Prev” nexttext=“Next” />
<txp:else />
<txp:article allowoverride=“0” form=“titlebody” limit=“1” pgonly=“0” searchall=“0” searchsticky=“0” />
</txp:if_article_list>
</txp:if_section>

I get the navigation list, but the next page, and page 2 point to index.php?pg=2. Obviously that takes me nowhere…

Any ideas?

Offline

#45 2007-01-24 22:12:01

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] ob1_pagination

I may be wrong here but I think it is due to you using both an article_custom and an article tag on the page.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#46 2007-01-24 23:26:15

coopersita
Member
Registered: 2005-09-28
Posts: 68
Website

Re: [plugin] [ORPHAN] ob1_pagination

I made a new template and now I just have:

<txp:article listform=“titlebody” limit=“1” />
<txp:ob1_googlenav previoustext=“Prev” nexttext=“Next” />

Same results. It shows the link to the second page, but still just index.php?pg=2.

I’m using messy links, and the page is accessed as a section: mysite.com/index.php?s=mysection

Does googlenav only work for category or individual entry pages?

Offline

#47 2007-01-25 19:08:21

coopersita
Member
Registered: 2005-09-28
Posts: 68
Website

Re: [plugin] [ORPHAN] ob1_pagination

Well. I couldn’t find what was wrong, so I hacked the module and changed line 38:

$addToURL .= ($url_mode) ? “&s=$s” : “” ; to $addToURL .= “&s=$s” ;

What is $url_mode? Is that because I’m using messy mode?

Anyway, it seems to work now as I want… I’m sure this will cause problems under certain circumstances, but for now seems to work.

Offline

#48 2007-01-25 21:05:00

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] ob1_pagination

That seems odd. I use this plug-in on thebombsite for my weblog and theme sections without a problem. I do use a “clean” URL mode though so I wonder if it has a problem with “messy” URLs. Maybe something has changed in TXP that is causing the problem. The plug-in hasn’t been updated for some time now. Good to see your hack is working. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB