Planet with eZ

Author Message

Guillaume Kulakowski

Tuesday 04 March 2008 11:02:31 am

hi,

I would like to make a planet with eZ but I have a problem : during the RSS importation, the article body (HTML) is parsed to be put in the datatype XML block and seems to suffer a strip_tag().
Is there any solution or do i have to overide the rssimport.php ?

Thx

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Björn Dieding@xrow.de

Tuesday 04 March 2008 12:10:19 pm

just as a note:

a similar project exists

http://www.planetezpublish.org/

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Heath

Tuesday 04 March 2008 2:03:23 pm

Hello Guillaume,

I would recommend the text based datatype instead of the xml block datatype in order to avoid the problems you describe.

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/datatypes/text_block

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Guillaume Kulakowski

Tuesday 04 March 2008 4:03:57 pm

@Björn > It's not a planet about eZ :-). It's a planet with the eZ CMS :-). I would like replace the actual script use in http://planet.fedora-fr.org

@Heath > You advice me to stock my HTML code in text block ?

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Heath

Tuesday 04 March 2008 10:38:05 pm

Fantastic Idea Guillaume!

> You advice me to stock my HTML code in text block ?

I do. Because the text block datatype allows for the storage of html code without validation errors.

I myself have used the text block datatype to store html within a content object in the way I describe.

This is a simpler alternative to developing a way to store html within an xml block datatype.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Guillaume Kulakowski

Wednesday 05 March 2008 1:44:33 am

Another question : some feed use multiple "category" tag for manage tagcloud :

<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.llaumgui.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Le blog de LLaumgui</title>
  <link>http://www.llaumgui.com/</link>
  <description>Blog de LLaumgui alias Guillaume Kulakowski. Analyste programmeur de profession et Geek par passion. Ambassadeur du projet Fedora et utilisateur de Linux et autres solutions libres.</description>
  <language>fr</language>
  <pubDate>Tue, 04 Mar 2008 19:45:29 +01:00</pubDate>
  <copyright>Creative Commons (by-nc-nd 2.5)</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  <item>
    <title>CentOS-fr le point</title>
    <link>http://www.llaumgui.com/post/CentOS-fr-le-point</link>
    <guid isPermaLink="false">urn:md5:7eff56af00b1b3042998cd43d276b8a1</guid>
    <pubDate>Mon, 03 Mar 2008 10:23:00 +01:00</pubDate>
    <dc:creator>LLaumgui</dc:creator>
        <category>Linux</category>
        <category>CentOS</category>
        <category>CentOS-fr</category>    
        <description>...</description>   
          <comments>http://www.llaumgui.com/post/CentOS-fr-le-point#comment-form</comments>
      <wfw:comment>http://www.llaumgui.com/post/CentOS-fr-le-point#comment-form</wfw:comment>
      <wfw:commentRss>http://www.llaumgui.com/feed/rss2/comments/399</wfw:commentRss>
      </item>
</channel>
</rss>

I use the datatype keyword for the category information but rssimport.php store only the first category's tag...

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Xavier Dutoit

Wednesday 05 March 2008 3:14:34 am

Hi,

I agree with Heath, the ez parser won't make it. What I did instead is to import in an xml field, but embed into a <literal class="html"> and use xmlwash to avoid any XSS.

X+

http://www.sydesy.com

Guillaume Kulakowski

Tuesday 10 June 2008 4:27:19 am

Thank for your help.
I have finished my planet with eZ : http://planet.fedora-fr.org

For importation, I use a cronjob based on rss_import.php. This cronjob :
- take feed url in user’s profile
- store feed description in text bloc
- use tidy for cleanup the content before store in DB.

http://trac.llaumgui.com/browser/ez_publish/myutils/trunk/cronjobs/planet.php

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.