Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#106 2008-01-17 22:09:22

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

Re: [plugin] [ORPHAN] ob1_pagination

It works fine. Just change the ob1_googlenav to ob1_pagination and it works.

Offline

#107 2008-01-18 13:29:20

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

Re: [plugin] [ORPHAN] ob1_pagination

^^ Like jstubbs says:

The Help-File still contains an old ob1_googlenav-Example. Does anyone have a solution to my moretabsdisplay- and moretabstext-Problem? Does anyone use this attribute?

Offline

#108 2008-01-19 18:33:46

Rigel
Member
From: España
Registered: 2005-09-02
Posts: 99
Website

Re: [plugin] [ORPHAN] ob1_pagination

Hi, it is possible that pluin creates clean URLs (“/section/2” for page number 2)?. I have used with gbp_permanent_links
and it does not work.

Thanks.

Offline

Board footer

Powered by FluxBB