You are not logged in.
Thank you a lot. This seems to cover exactly what I want. Since I tried “beginning” and it worked, I didn’t try that way though (yet).
Thank you very much. It seems that this is the solution for my question. Since I only need this for articles with existing excerpts (in article-lists), I didn’t try it before.
Now I’m wondering what exactly is the difference between both plugins.
And Thank You Very Much all in this helpful forum :)
Last edited by saccade (2006-04-12 08:40:53)
There is a couple of differences, pfa_beginning does only charcter count,kgr_safe_excerpt does both word and char and is more customizable.
pfa_beginning though has a couple of if else clauses that can let it output just a permlink url title display (wrapped with div),if a certain char set count value is not met (It would then calculate the number of paragraphs, that in total do not exceed the value of char count value set ).
I therefore prefer kgr_safe_excerpt, which gives me more accurate results.(Allso prevents broken HTML)
It allso will use the article body, in case there is no excerpt.
I believe, you would use pfa_beginning, if you would like your paragraphs not to be truncated(Like for important information), but do not care about layout Issues otherwise, like for Teasers.
EDIT.:Consider above info as not accurate,I hadn’t realized that pfa_beginning has merged into Beginning,it’s kind of difficult to track so many plugins anyway,so the penny has dropped now for myself as well, thanks.
Last edited by marios (2006-04-12 18:26:24)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Having trouble with an up to now working solution,
I want to bring this back to discussion.
How can I place the “read-more”-permlink within the last test-paragraph of an existing exzerpt?
(without having to place it manually!)
Perhaps I did miss something and this is possible by txp-on-board-tools. But I didn’t find anything. Any tipps?
So far I see the following scenario:
In existing excerpts the end can have different code:
</p>(the normal case in txp 4.0.4)
</p>followed by two paragraphbreaks
</p>followed by two paragraphbreaks and a space
</p>, but I think there may be other scenarios too.
At the moment I’m using the plugin “beginning”. But I only use the function to place a permlink within existing exzerpts. Maybe it would be better if there was an extra small plugin doing this – or much better an attribute in txp_excerpt, placing permlinks.
The plugin “beginning” simply strips an amount of characters from the end and replaces a
</p>-Tag – this way running into problems.
So to place the read-more-permlink correctly we have to find out the right ending tag and placing the link just before.
This seems to be manageable by a simple code.
Does this post help you? It only requires that users put a txp tag in the excerpt.
Ah, thank you! For me it’s interesting and helping.
But my users barely read instructions (even my empathetic instructions – sigh) and follow the main steps writing an article, setting the right category …;
and I don’t want to bother them with too many additional tasks like typing/copying those tags.
And I think this is a task, the machine could and should do pretty easy.
What would help me (shame I didn’t learn php yet!):
The main question is: How can a php-code find and possibly eliminate the last
</p>-tag in a string? (for this seems to be set in excerpts in most cases)
And possibly stop, if there is another text apart from spaces and paragraphs? (for special scenarios)
Then it would be easy adding the permlink and provide a closing
</p>-Tag as the plugin “beginning” does it.
If you can be sure there won’t be any other html code in the excerpts except the
<p> tags, you could probably use etz_striptags.
I fear I can’t be sure, for sometimes there will be images.
And of course br-Tags.
Will this strip all tags or just the beginning and ending p-Tags?
If the last, that would be just the matching code for my problem.
I’m afraid it strips all tags. But you could make a plugin request, I’m not a coder myself, but I don’t think it’s very hard to do with php.
What I don’t really keep understanding, is, why you need the link inside the last p tags?
With the current tags und plugins, you can put the read more title text inside a custom field, and have it automaticlly appended as the last paragraph, after there already is generated by textile.
Then, as a fallback value, in case nothing was entered, it’ll be something like :
Read more of this …..
I couldn’t think of a regular expression, that would match the last paragraph of a document and then in php there are used different.
Last edited by marios (2006-11-13 23:21:49)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Let me describe why I want the link to be inside:
In my matters of content normally excerpts will be one or more paragraphs of text to give some view on the following and make it interesting to continue reading. This text mostly will be a truncated copy of the first sentences of the full body.
So the “read more” is semantically a part of the text and not a new paragraph.
Of course I could place it by CSS inline at the end of the text paragraph, but that seems to be not a good solution for me.
I have plain HTML without CSS in mind too. There it should look well ordered too:
So for accessibility (for example viewing without CSS on a mobile) I think it is better to have the plain “read more”-link inline at the end of the last paragraph of the excerpt.
It should look like this:
New image gallery
We’ve posted the images from last weekend. A bunch of fotographers didn’t stop working. There were taken more than 1000. You will find that … read more …
It should not look like this:
New image gallery
We’ve posted the images from last weekend. A bunch of fotographers didn’t stop working. There were taken more than 1000. You will find that …
read more …
In plain HTML a separated read-more-link also will be separated additionally by paragraph leading from the paragraph before (that doesn’t show here). Exactly that I don’t want.
The customfield solution also produces a separated paragraph.
But also I don’t want my users have to fiddle anything – it showed, that using a customfield is too complicated for them (sigh). It is not a problem of the title text.
It should work automatically.
Last edited by saccade (2006-11-14 06:19:29)