Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2006-04-07 14:25:41

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

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

If you used Textile markup instead of HTML, you wouldn’t have this problem. If you insist on using HTML, rewrite the above as:

<code>
…and this is the end.
</code><br />

<code>
&lt;p&gt;[page]&lt;/p&gt;
</code><br />

<code>
&lt;strong&gt;Page 2&lt;/strong&gt;&lt;br /&gt;
This is where it starts…
</code><br />

However, I strongly recommend against this.

Last edited by Etz Haim (2006-04-07 14:28:35)

Offline

#86 2006-04-07 15:16:42

da_buddha
Member
From: Pittsburgh, PA
Registered: 2005-04-24
Posts: 14
Website

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

Ah… I disabled the <p> (manually edited code). Textile still works for everything, but it doesn’t add random <p>'s around anymore. What exactly is this doing? I mean, I could just look at the PHP myself but I thought I’d ask the creator. What are the <p>'s doing for the [page]? Or is that just a catch-all??

Last edited by da_buddha (2006-04-07 15:17:53)

Offline

#87 2006-05-16 22:35:40

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

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

I’ve noticed that plugin acts weird with articles written inside tiny_mce editor…words breaking, showing tag code etc…

Last edited by fuls (2006-05-16 22:37:31)

Offline

#88 2006-05-17 09:39:00

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

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

It’s probably a tinyMCE issue.

Offline

#89 2006-07-10 20:46:57

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

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

I’m sorry, but there’s no way to get rid of ?pg=n, at least for the moment.

Offline

#90 2006-08-05 03:30:51

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

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

Is it possible to assign titles to pages and have those show up as the prev/next links?

Also, a small request:

if_first and if_last conditionals would be a most welcome addition for more dynamic navigation.

Cheers

Offline

#91 2006-08-05 12:40:27

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

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

I just installed it and its pretty darn awesome. I just wish I could output page titles instead of numbers :(

THe cool part is I see you have added those conditionals .. nice!

The only thing keeping me from using this is the page title issue.. I just may take your plugin apart some and see if I can hack up a solution myself.

Last edited by Ace of Dubs (2006-08-05 12:49:46)

Offline

#92 2006-08-06 01:03:53

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

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

arkham wrote:

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

Been trying to hack this up for hours. If anyone can figure out how to do this, I’d be willing to contribute some funds for the cause

Offline

#93 2006-08-06 15:16:48

Freshmango
New Member
From: Braunschweig, Germany
Registered: 2004-06-14
Posts: 7
Website

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

Titles instead of numbers would be great. If anyone comes up with a solution I am very interested in it.


<a href=“http://dennisfrank.info” title=“Dennis Frank gestaltet – Portfolio” style=“display: block; background:#efefef; color: #545454; float: left; padding: .5em; border: 1px none #9f9f9f; text-decoration: none;”><span style=“border-bottom: 1px solid #9f9f9f;”>Dennis Frank portfolio</span></a>

Offline

#94 2006-08-06 18:20:21

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

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

I have made some progress on this.

Here is the relevant code the author uses to output his fancy title listing, which je calls “teaser”:

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

$teaser = $matches1[$pg-1];

This is what actually displays the title of the next page:

bc..
if (!empty($teaser)) return $pagecontent.’<p id=“teaserTxt”><a href=”’.$linkstub.($pg + 1).’”>’.$teaser.’</a></p>’; else return $pagecontent;

So I decided to define a new attribute with the others, and make it true instead of false, so that it is off by default and an entry of “1” will turn it on:

bc..
$titles = isset($titles) ? $titles : true;

Then I lift the code from the numerical list and call it titles as well

bc..
if (!($titles)) { for ($i = 1; $i <= $max; $i++) { $out[] = ‘<li class=“pgNum’;

if ($i $max) { $out[] = ' pgLast'; } if ($pg != $i) { if ($i 1) { $out[] = ‘”><a href=”’.$base_url.’”>’; } else {$out[] = ‘”><a href=”’.$linkstub.($i).’”>’; } } else { $out[] = ‘ pgCurrent”>’; }

$out[] = $i; if ($pg != $i) $out[] = ‘</a>’; $out[] = ‘ ‘; $out[] = ‘</li>’; }
}

I test it and see that its still outputting numbers, of course I haven’t set up my teaser yet.. so I track down the number output from above as follows:

bc..
$out[] = $i;

Awesome.. I have pinpointed my target, but I still have not figured out how to create the relationship between my attribute and the rest of the article titles.

I tried modding the above snippet:

bc..
$out[] = $teaser;

But that fails and I think my problem lies where I first started:

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

$teaser = $matches1[$pg-1];

I realize that I need to create a new variable instead of teaser. I just don’t understand how to link this properly to $matches in order to spit out the page titles instead of their numbers.

Any ideas?

Offline

#95 2006-08-07 18:18:42

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

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

Hello everyone. There’s version 0.8 of the plugin available offering at last the much requested feature: Subsection titles. In order to make use of this feature you have to:

  1. Download the latest version of the plugin, install it via the admin interface, and enable it. This requires full admin privileges.
  2. Name a custom field “etz_pg_subs”; case matters. You do this via the “Advanced preverences” in your admin interface.
  3. Go to a paginated article that’s been split in numbered sections, and click on “Advanced options”.
  4. In the “etz_pg_subs” custom field, for an article with, let’s say, 4 sections, write: “This is section one|This is section two|This is section tree|And last but not least, section four”. The names of the sections are separated with vertical bars. Note that the number of the vertical bars must be equal to the number of [page] separators in the body of the article.

A personal anouncement: I have a new job, and it’s very time-demanding. This will cause me to respond with some delay to bug reports and user requests. If you however appreciate what I’ve done so far, show it by buying me something from my Amazon wishlist.

Last edited by Etz Haim (2006-08-09 16:00:47)

Offline

Board footer

Powered by FluxBB