Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2006-03-11 22:01:05
- apo
- Member
- From: Germany
- Registered: 2004-10-27
- Posts: 53
Re: [plugin] [ORPHAN] ob1_pagination
<notextile>is there a way to “move” the google nav so the current page is in the middle of the page numbers (if there are enough pages left)?
i think of something like
first newer 3 4 6 7 older last
instead of
first newer 1 2 3 4 older last
i think it can be confusing if there’s no visible marker that there are more pages left… like it is now it seems page 5 in this example was the last one.</notextile>
Last edited by apo (2006-03-11 22:01:31)
Offline
#32 2006-03-11 23:02:41
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Offline
Re: [plugin] [ORPHAN] ob1_pagination
Yep works with 4.0.3 r1238 so far. ;)
I’m not sure about “moving” things but couldn’t you style the “non-links” differently?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#34 2006-03-12 02:48:03
- apo
- Member
- From: Germany
- Registered: 2004-10-27
- Posts: 53
Re: [plugin] [ORPHAN] ob1_pagination
uhm… dont know what you mean. sure i can style the non-links differently. but what i mean is that its not obvious that there are more pages to browse if the active/highlighted link is at the left or right border of the listed page numbers.
Offline
Re: [plugin] [ORPHAN] ob1_pagination
Some corrections to get rid of the Undefined index error. Tested on TXP 4.0.3 (r1183).
Offline
#36 2006-09-26 20:54:55
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: [plugin] [ORPHAN] ob1_pagination
I’m having a problem using this plugin. The site is <a href=“http://www.kentuckygolfing.com”>Kentucky Golfing</a>
If you search for just any term really, say just type the letter “a” I’ve got it so it only shows two results so I could test the googlenav plugin and the google nav plugin shows on the first page of results but if you click on the second page of the results the google nave does not show…it should right?
Here is the code I’m using:
<code>
<txp:if_search>
<txp:chh_if_data>
<txp:article limit=“2”/>
<txp:ob1_googlenav firsttext=“First” previoustext=“Previous” nexttext=“Next” lasttext=“Last” />
<txp:else />
<p>Your search “<strong><txp:q /></strong>” returned no results.</p><br />
<p>Please try again.</p>
</txp:chh_if_data>
</txp:if_search>
</code>
Offline
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
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
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
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
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
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
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