Application of categories to content in various modules  Bottom

Go to page [-1] 1 - 2:

  • Hi!
    Currently Erik Spaan is working on the contenttype plugin for the News module at http://code.zikula.org/news.
    You can checkout the development version (SVN co https://code.zikula.org/svn/news/trunk)
    and copy the contenttypes folder and pntemplates/contentypes.

    Haven't worked in the Pages module content plugin yet.
    Too much things to do before that, but have to see an Erik's answer about the improved content plugin and stories block.
    icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Thanks for quick reply. I checked News SVN, but there are no plugin file. I suppose it should be pncontenttypesapi/newsrticles.php but theres no folder like this. I found templates, lang files and Ajax edition js file, and that's all... icon_frown
    Is it something wrong with that plugin, or just an oversight?
    I looked into templates and it seems very promising...

    And with the pages module - I'll try to find another solution. Probably i'll use the content module, but I wished to have crpTags for News and Pages module, and possibility to arrage most of layout tasks through Content module instead of using blocks etc.
    One cannot have all icon_smile Thanks anyway, but if you'll find the missing plugin for News it would be very usefull not only for me I hope.



    edited by: obywatel, Sep 28, 2008 - 12:34 PM
  • your wish is my command icon_wink
    I have updated the storiesext block to version 2.3 (http://code.zikula.org/storiesext) and finally got the multicategorization with multiple properties working. (You learn a lot on the categorization insides icon_smile ).

    And I have also updated the Content newsarticles plugin based on this new storiesext version. So also multi categorization and some minor new features and updates to make it more usable.
    Check out http://code.zikula.org/news under downloads for the Content plugin.


    A plugin for Pages. What would you like to display in Content from Pages? A list of pages items of the content of a Page? It would be helpful to specify some of your wishes.
    There is already a Content plugin for module output (not sure if it is released or only in SVN). It could be that it is already enough for your Pages ideas.



    edited by: espaan, Sep 30, 2008 - 10:09 AM

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Wow, that rulez icon_smile It has much more that I thought I needed... But now I have new possibilities - it means more sleepless hours then I supposed icon_smile
    Your blocks are the best ABC for "coders" like me - i mean CaP+SaL coders... It means "Copy and Paste then Save and Look" what happes icon_smile

    I have inside your code everything that may help me to understand PN API. Great.
    I've made once kind of "ekstended" stories block (see www.obywatel.org.pl - blocks on the left), and I now need something like this also for pages. Writing blocks is for me easier then Content plugins, because I don't have yet many plugins to "CaP" icon_wink So I made a block for pages that chooses from categories, displayes title and then truncates a content.

    I can't write in PHP but I'm familiar with Smarty, so I took News-stories block, made CaP+SaL and some changes, and just finished template with [$content|truncate:200:"...":false].
    So the result is categorized block for pages with titles, links and truncated content. Every variable (like 200) is hardcoded in template.

    It would be very useful to have similiary plugin for Content. Of course without hardcoded variables - but with variables taken from adminmenu.

    What's for?
    I need news for "normal" news, and pages for longer publicistic texts. It would be best if both of them has the same tag system (cprTags) and as I wrote above, arranging homepage through Content "drag and drop" is much easy for redactors then using blocks

    Thanks a lot for your work.
    Grat Job icon_smile

  • Yeah, the extended stories block has a lot of options, but I like to be able to choose what to show in the news list (and not only by editing templates and hard coding stuff icon_smile ).
    Mateo took an earlier version of storiesext and made the 1st version of the Content plugin. I made it consistent with the latest storiesext in several steps.

    For the Pages module I more or less see what you mean. You would like to show the Pages of a category, but then "truncated" to a certain length. Keep in mind that truncating real content is not se easy, since there can be all kinds of HTML markup (and even images) in there. You dont want to truncate in the middle of that.
    An option to choose between string truncating and clipping of a div to a certain height (and/or width) might be the solution. I'm checking out the options.

    And of course I use CaPSaL a lot icon_smile For the categorization stuff I had to dig a little deeper, but then you still can use code from other modules. And there are some nice examples of the interactive javascript stuff to make the admin section cleaner.

    BTW I put a new download of the Content plugin. There was a minor display error when no extra info was selected.



    edited by: espaan, Sep 30, 2008 - 03:51 PM

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • espaan

    eep in mind that truncating real content is not se easy, since there can be all kinds of HTML markup (and even images) in there. You dont want to truncate in the middle of that.
    An option to choose between string truncating and clipping of a div to a certain height (and/or width) might be the solution. I'm checking out the options.

    And what about "|strip_tags" before truncate ? I'll test this method with strip tags on "my" pages block. I have to test the second categorisation, I don't understand yet what is that for?
    Generally there are not many informations about categories, and how to use it. I see - it's revolutionary change to PN 7.6, but still don't get how to use it. Content module + plugins + categorisation, made that I said goodbye to my big love - Pagesetter icon_smile And I bide for Pagemaster instead...
  • Hi,
    strip tags will work, but then you will also loose all the HTML markup you have given to your NewsArticle/PagesPage/etc. I have found a Smarty plugin (there is not much out there, so luckily I found something icon_smile ) for truncating a string and keeping the HTML tags in there. It finds the tags and when the string is clipped in the middle of a part that is within for example strong the closing /strong will be pasted on the end to make it work.
    I made a zikula modifier plugin and put it for testing in my News install.

    Been testing it out and it seems to work nicely. Nested tags also work etc. For example
    Part of an (Dutch icon_wink ) article string:

    Code

    Zikula 1.0.0 <strong>geïnstalleerd <em>op</em> deze website</strong>. Zikula is

    truncating with $text|truncatehtml:35:"..." gives

    Code

    Zikula 1.0.0 <strong>geïnstalleerd <em>op</em> deze</strong> ...


    Check out the code in the SVN here. I've uploaded the plugin to the Cozi news project.
    Give it a try. I have tested a little bit, but I guess some more testing might be necessary.

    I will use it for storiesext and the Content newsarticles plugin as well. It solves the truncating and messing up HTML tag stuff.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • I've added a Wiki page to the knowledge base about truncating strings here

    --
    campertoday.nl, Module development, Dutch Zikula Community

Go to page [-1] 1 - 2:

This list is based on users active over the last 60 minutes.