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.

eZ debug

Timing: Jan 18 2025 18:29:04
Script start
Timing: Jan 18 2025 18:29:04
Module start 'layout'
Timing: Jan 18 2025 18:29:04
Module start 'content'
Timing: Jan 18 2025 18:29:04
Module end 'content'
Timing: Jan 18 2025 18:29:04
Script end

Main resources:

Total runtime0.0189 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.9141152.6094
Module start 'layout' 0.00820.0034 741.523439.3984
Module start 'content' 0.01160.0052 780.9219105.3828
Module end 'content' 0.01680.0020 886.304746.3047
Script end 0.0189  932.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002814.8255140.0002
Check MTime0.00126.0979140.0001
Mysql Total
Database connection0.00094.983010.0009
Mysqli_queries0.004021.197130.0013
Looping result0.00000.094610.0000
Template Total0.00179.010.0017
Template load0.00095.024710.0009
Template processing0.00073.924910.0007
Override
Cache load0.00073.533910.0007
General
dbfile0.00021.277680.0000
String conversion0.00000.053040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs