Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2005-06-23 20:44:30

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Hopefully I do not use any comment forms in my cases.
The plugin has worked fine for me on all revisions that I used and did not generate any errors.
Once more I realize what a usefull and time saving plugin this is, and I think that Etz has done a great job on that.
(It’s nice to have a little horizontal content architecture, something that I allways wanted and needed to keep the user klicking, so he may not fall asleep while scrolling)

with best regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#26 2005-06-23 20:48:51

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

i agree this is a fantastic plugin to have.

will be very useful on my zine site and i like that it makes it possible to do things like heavily illustrated articles without making the user download and scoll through all the images at once.

kudos. i’ll still use it even if i can’t only have comments appear on the very last page. ;-)

Offline

#27 2005-06-23 20:51:13

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

also another nice-to-have feature that was previously requested in here would be making a stated string of text become the link to the next page (as is done on sites like salon so as to provide a teaser for why the user should click to that next page).

what can i say.. i’m greedy. maybe i’ll see if i can code this change myself.

Last edited by arkham (2005-06-23 20:51:41)

Offline

#28 2005-06-23 23:02:30

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Sure you may. In fact I’d be glad to incorporate such changes into the plugin.

Offline

#29 2005-06-24 07:17:13

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

For the second issue I got something working but it’s not too pretty and I was having a weird reg exp error so I changed the page delimiter to no longer being in brackets (even with an escape backslash I was still getting the error on the backslash)…

Also in terms of speed it will be a little slower with all the reg expression functions.. but it works and I’ll post it up after I clean it up.

PHP’s not my first language but that wasn’t too bad.

Offline

#30 2005-06-25 03:11:41

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Hey… sorry had a busy day at work today.

Click the link to see the code with my changes…

http://www.ohword.com/etz_pgPlusTeaser.txt

Instead of just using [page], to use this feature just type within the article [page Your teaser text for the next page]
or [page Next, I discuss the rhumba], etc.

The modified plugin now use regular expression functions and knows that anything that looks like [page] with any amount of characters between the “[page” and the “]” indicates a page break and that whatever is between “page” and the closing bracket is to be added in a paragraph at the bottom of the page’s content.

The paragraph has an id of “teaserTxt” so unique css styling can easily be applied.

The functions that have different code as a result:

function etz_pg_break()
uses regular expression for the page break term so as to use the wildcard

function etz_pg_totalpages ()
uses preg_match_all instead of a regular string functions to count occurences of the reg expression in the article to find the number of pages

function etz_pg_ispaginated()
uses preg_match with the PREG_OFFSET_CAPTURE flag to do the same thing strpos used to do but for a regular expression

function etz_pg_body()
borrowed $linkstub = etz_pg_linkstub() line from navigation function to provide the link from the teaser line to the next page.
uses reg exp function to split article and to pull out text from [page…] for link

————————————————————————

Don’t hesitate to ask if there are any questions, suggestions, etc

Last edited by arkham (2005-06-25 03:12:47)

Offline

#31 2005-06-25 13:08:22

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Thank you. These additions are interesting, and I will put them in the next version of the plugin, including some modifications to handle UTF-8, better navigation, etc.

Offline

#32 2005-06-25 15:26:39

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

this sounds very good – would anyone also happen to know what needs to be done to add this as a quicktag? For multiple authors it would be useful to have a button to hit to enter a page break

Offline

#33 2005-06-25 23:09:42

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Having just re-read the 1st page of this thread I realize that some people wanted the page-specific text not just as a teaser to click to the next page but as an overall navigation option (a list of all page titles). The nav function can be easily modified to handle that by making use of the same code from etz_pg_body:

preg_match_all($pageSep, $thisarticle[‘body’], $matches);

$matches [ 1 ]0 would now have the 1st page title. $matches [ 1 ]1 the second and so on…

In this case you’d need to add another option to the tag etz_pg to control whether this type of page title navigation should be used

Last edited by arkham (2005-06-25 23:10:53)

Offline

#34 2005-08-12 10:30:13

mscwd
Member
Registered: 2005-06-28
Posts: 13

Re: [plugin] [ORPHAN] etz_pg for paginated articles

PROBLEM

After installing the plugin I get this error display at the top of the page:

Notice: Undefined variable: base_url in /home/ecoo01/public_html/txp/textpattern/lib/txplib_misc.php(429) : eval()’d code on line 127

Although the page links function, the content doesn’t display. I.e When you click “2”, page 2 loads but the text “This is page 2” doesn’t display.

This is how I have constructed the article:

This is a test of spreading one article over multiple pages. This is the first page.

[page]

This is the second page

[page]

This is the third page

[page]

This is the fourth page

[page]

This is the fifth page

My article form contains the neccessary tags.

Does anyone know whats wrong?

Thanks,

-mscwd

Last edited by mscwd (2005-08-12 10:35:09)

Offline

#35 2005-08-13 20:38:08

jiraiya
Member
Registered: 2005-05-15
Posts: 13

Re: [plugin] [ORPHAN] etz_pg for paginated articles

The reason you get that error message because your Production Status is set to Debugging. You need to change it to Live. You can set it at Site Admin-> Preferences. I am not sure why your pages are not showing. What version do you use? I am using RC5.

I am currently having some problems with it too. It could be that it is not compatible with RC5.

Offline

#36 2005-08-13 21:00:27

jiraiya
Member
Registered: 2005-05-15
Posts: 13

Re: [plugin] [ORPHAN] etz_pg for paginated articles

Ok, I got it to work. With two problems.

First, I do not use this plugin on pages that appear on the frontpage or it will not work.

Second for some reason <code><txp:etz_pg_body /></code> which is used to output the article page, adds an extra “/>” before the body of the article on all pages except the first one.

Last edited by jiraiya (2005-08-13 21:08:06)

Offline

Board footer

Powered by FluxBB