Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2007-12-16 17:13:27

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

Sorry I don’t know the chh_article_custom plugin, but I can tell you that the errors from your earlier post are due to the fact that listform is a deprecated tag.

Instead of this:

<txp:if_article_list>
<!-- section page: display the first two articles then paginate -->
<txp:article_custom  status="live" category="Latest-News" listform="news" limit="12" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Try this:

<txp:if_article_list>
<!-- section page: display the first two articles then paginate -->
<txp:chh_article_custom category=“Latest-News” form=“news” limit="2" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Offline

#92 2007-12-16 17:20:37

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Nope still no pagination ;(

Offline

#93 2007-12-16 17:30:32

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

I think chh_custom_ is not working properly with TXP 4.05 (assuming you have that). Have you considered re-arranging the way you organise your section articles in order to make the pagination work?

For example, place all news articles in the news section, then organise further by category. You have quite a lot of options that way.

Offline

#94 2007-12-16 17:32:58

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

I have done but I cant see h ow it will resolve the problem, how will i show all the news articles in the other sections?

/stem-news if articles are saved under the news section for example?

Offline

#95 2007-12-16 17:39:41

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

I am reading up on article_custom myself now too, and I just noticed that as it says here there is no way to paginate with the default TXP tags txp:older and txp:newer will not work.

What will work for you is to use a tag like this in your /stem-news section:

<txp:article_custom section="news" limit="100" form="your_form" />

That will pull out all of your article from the news section.

If article_custom supported comma separated sections, it would be better…

Offline

#96 2007-12-16 17:43:10

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Mmmm so no solution by the looks of things.

Seems strange as you would imagine this is a perfect example for a good way of having a kind of subsection to the main section, in this example the latest news articles.

Will keep on digging further to see if anyone else has ever done anything like this, if i succeed i will keep you posted.

A.

Offline

#97 2007-12-27 20:45:57

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_pagination

the_ghost wrote:

Is it possible to pass some middle page links? For example, we have 20 pages. And plugin should provide 1 2 3 … 18 19 20. I think some optional parametr like skipoffset=3 for example, or we can even make skipoffsetleft=5 and skipoffsetright=2 will return 1 2 3 4 5 … 19 20

Hmmm .. Not a bad idea. It’s doable, that’s for sure.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#98 2008-01-02 12:45:49

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] ob1_pagination

Henrik

I’ve been looking at the source and comparing the 2.5 ‘pagination’ version with the prior googlenav version and noticed that you are now using single quotes in your generated hrefs thus…

Previously Now
<a href="?pg=1" title="..." />...</a> <a href='?pg=1' title='...' />...</a>

Just wanted to ask if there is a particular reason for that? It’s the first time I’ve seen it done that way. I was under the impression that a double quote was needed in the XHTML spec but on looking I couldn’t find the spec for the delimiters on the href field even though every practical example they give uses double quotes.

Many thanks in advance,

Last edited by net-carver (2008-01-02 13:00:31)


Steve

Offline

#99 2008-01-02 23:03:05

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_pagination

net-carver wrote:

I was under the impression that a double quote was needed in the XHTML spec but on looking I couldn’t find the spec for the delimiters on the href field even though every practical example they give uses double quotes.

To my knowledge (that is not infinite I might add :) you can use both single and double quotes in XHTML, just aslong as you quote them at all.
It’s just easier using singlequotes when I use double in the PHP code since then I do not need to escape them. Meaning I win one character per quote and I think it’s also easier to read the code in this way.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#100 2008-01-03 06:05:39

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] ob1_pagination

Henrik

By putting your strings in double quotes you get the luxury — and speed penalty — of PHP’s in-string variable substitution. If you went with s concatenation-only line then you would get faster execution with no need to escape the quotes and still be able to keep with the more usual double quotes around the href (and title too).

For example (this is from line 86) : There’s a mix of in-string variable substitution and concatenation going on…

"<li class='$liclass'><a href='?pg=1$addToURL' title='".$firsttexttitle."'>".$firsttext."</a></li>".n;

Each of those variable-free “…” blocks toward the end still has to be parsed by PHP in case there are any variables to be substituted.

Wouldn’t…

'<li class="' .$liclass. '"><a href="?pg=1' .$addToURL. '" title="' .$firsttexttitle. '">' .$firsttext. '</a></li>'.n;

be faster, more consistent, more ‘usual’ and un-escaped.

It’s just a thought.

I may be barking up the wrong tree here but I think sticking with the more usual way might be better. On the other hand; if the output anchors validate and browsers honour them, single quotes sounds good too.

Argh, wish I could find a definitive statement on the valid delimiters for my own URL rewriting stuff.

Last edited by net-carver (2008-01-03 13:17:26)


Steve

Offline

#101 2008-01-05 15:42:50

FRIIIEEK
Member
From: Düsseldorf
Registered: 2007-03-23
Posts: 17

Re: [plugin] [ORPHAN] ob1_pagination

hi obeewan!

thanks for developing this great plugin for txp!
i have some questions about the attributes called moretabsdisplay and moretabstext.

my form looks like this:
<txp:ob1_pagination maximumtabs="5" outputlastfirst="0" outputnextprevious="0" liclass="navi" moretabsdisplay="1" moretabstext="before,after" />

the pagination works fine! but theres no hint, that there are more than five pages, so…

i tried different values for moretabstext like:

moretabstext="<,>"
moretabstext="before,<,after,>"

but nothing happens! :(

maybe i misunderstood the help-file… ?!
maybe it doesn’t work with messy-urls or something?
or maybe im just too stupid… sorry therefore! xD

Thanks for Help

FRIIIEEK

PS: The Help-File still contains an old ob1_googlenav-Example! ;)

Last edited by FRIIIEEK (2008-01-05 15:47:37)

Offline

#102 2008-01-08 21:01:24

FRIIIEEK
Member
From: Düsseldorf
Registered: 2007-03-23
Posts: 17

Re: [plugin] [ORPHAN] ob1_pagination

no idea anyone?

do u need more information about the problem or did i misunderstand the function of this attribute?
i would be glad about some help, because i dont have the php-skills to customize the plugin myself.

.greetz
FRIIIEEK

Offline

#103 2008-01-14 21:24:23

FRIIIEEK
Member
From: Düsseldorf
Registered: 2007-03-23
Posts: 17

Re: [plugin] [ORPHAN] ob1_pagination

hmm… problem still exists… :(

Offline

#104 2008-01-17 12:20:03

FRIIIEEK
Member
From: Düsseldorf
Registered: 2007-03-23
Posts: 17

Re: [plugin] [ORPHAN] ob1_pagination

i even tried to set moretabstext="5", moretabstext="0,5", moretabstext="1,3" or something… no result!

it seems that this attribute work properly… :(
it would be great if u can fix it!

Offline

#105 2008-01-17 21:39:45

plugmas.com
Member
Registered: 2007-09-05
Posts: 65

Re: [plugin] [ORPHAN] ob1_pagination

Oppss, unfortunately ob1_pagination do not work on textpattern 4.05. I install it recently and it makes me a warning like this “tag_error <txp:ob1_googlenav firsttext=“First” previoustext=“Previous” nexttext=“Next” lasttext=“Last” /> -> Textpattern Warning: unknown_tag: ob1_googlenav on line 972”

Offline

Board footer

Powered by FluxBB