[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtos-dev
Subject:    RE: [Pronet] Picking up the first 3 text paragraphs from the Body
From:       "Mihai Bocsaru" <info () pro-it-service ! com>
Date:       2016-03-17 23:36:21
Message-ID: 031701d180a5$d02f3950$708dabf0$ () pro-it-service ! com
[Download RAW message or body]

This is a multipart message in MIME format.


It would be fantastic to have the documentation include an example also with the \
first 2-3 text paragraphs (without or at least with formatting tags/html).

 

 

From: Charlie Gorichanaz [mailto:charlie@gorichanaz.com] 
Sent: Friday, March 18, 2016 1:33 AM
To: pronet@ml.sixapart.com
Subject: Re: [Pronet] Picking up the first 3 text paragraphs from the Body

 

You can accomplish this with a combination of:

https://movabletype.org/documentation/appendices/modifiers/regex-replace.html
and
https://movabletype.org/documentation/appendices/modifiers/remove-html.html

possibly need convert_breaks="0" depending on your content

 

On Thu, Mar 17, 2016 at 4:25 PM Mihai Bocsaru <info@pro-it-service.com> wrote:

Hello Guys,

 

How would you extract the first 3 text paragraphs from "Body"?

 

At the moment I'm doing this:

<mt:EntryBody words="120">

 

But the result is not satisfactory enough because it doesn't always end at the end of \
a text paragraph, or at least a sentence.

 

I would need the first 3 text paragraphs and then I would need them displayed without \
any HTML tags, not even the formatting ones (Ps, BRs, Hs).

 

Thanks,

Mihai

-- 
You received this message because you are subscribed to the Google Groups "pronet" \
group. To unsubscribe from this group and stop receiving emails from it, send an \
email to pronet+unsubscribe@ml.sixapart.com.

-- 
You received this message because you are subscribed to the Google Groups "pronet" \
group. To unsubscribe from this group and stop receiving emails from it, send an \
email to pronet+unsubscribe@ml.sixapart.com.

-- 
You received this message because you are subscribed to the Google Groups "pronet" \
group. To unsubscribe from this group and stop receiving emails from it, send an \
email to pronet+unsubscribe@ml.sixapart.com.


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=RO link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It would be \
fantastic to have the documentation include an example also with the first 2-3 text \
paragraphs (without or at least with formatting tags/html).<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><b><span lang=EN-US \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span \
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Charlie \
Gorichanaz [mailto:charlie@gorichanaz.com] <br><b>Sent:</b> Friday, March 18, 2016 \
1:33 AM<br><b>To:</b> pronet@ml.sixapart.com<br><b>Subject:</b> Re: [Pronet] Picking \
up the first 3 text paragraphs from the Body<o:p></o:p></span></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=MsoNormal \
style='margin-bottom:12.0pt'>You can accomplish this with a combination of:<br><br><a \
href="https://movabletype.org/documentation/appendices/modifiers/regex-replace.html">h \
ttps://movabletype.org/documentation/appendices/modifiers/regex-replace.html</a><br>and<br><a \
href="https://movabletype.org/documentation/appendices/modifiers/remove-html.html">htt \
ps://movabletype.org/documentation/appendices/modifiers/remove-html.html</a><o:p></o:p></p></div><p \
class=MsoNormal>possibly need convert_breaks=&quot;0&quot; depending on your \
content<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p \
class=MsoNormal>On Thu, Mar 17, 2016 at 4:25 PM Mihai Bocsaru &lt;<a \
href="mailto:info@pro-it-service.com">info@pro-it-service.com</a>&gt; \
wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC \
1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>Hello Guys,</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>How would \
you extract the first 3 text paragraphs from "Body"?</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>At the \
moment I'm doing this:</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&lt;mt:EntryBody words=&quot;120&quot;&gt;</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>But the \
result is not satisfactory enough because it doesn't always end at the end of a text \
paragraph, or at least a sentence.</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>I would \
need the first 3 text paragraphs and then I would need them displayed without any \
HTML tags, not even the formatting ones (Ps, BRs, Hs).</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>Thanks,</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-US>Mihai</span><o:p></o:p></p></div></div><p class=MsoNormal>-- <br>You \
received this message because you are subscribed to the Google Groups \
&quot;pronet&quot; group.<br>To unsubscribe from this group and stop receiving emails \
from it, send an email to <a href="mailto:pronet+unsubscribe@ml.sixapart.com" \
target="_blank">pronet+unsubscribe@ml.sixapart.com</a>.<o:p></o:p></p></blockquote></div><p \
class=MsoNormal>-- <br>You received this message because you are subscribed to the \
Google Groups &quot;pronet&quot; group.<br>To unsubscribe from this group and stop \
receiving emails from it, send an email to <a \
href="mailto:pronet+unsubscribe@ml.sixapart.com">pronet+unsubscribe@ml.sixapart.com</a>.<o:p></o:p></p></div></body></html>


<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups \
&quot;pronet&quot; group.<br /> To unsubscribe from this group and stop receiving \
emails from it, send an email to <a \
href="mailto:pronet+unsubscribe@ml.sixapart.com">pronet+unsubscribe@ml.sixapart.com</a>.<br \
/>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic