Fork me on GitHub

integrating a php progrma as a module  Bottom

Go to page 1 - 2 [+1]:

  • Hi

    I'm trying to figure out how to integrate existing PHP programs into zikula without having to change all the structure and function names.

    When I look into the "module developmet" documentation I only find how to develop a module for zikula from scratch following all the coding standars, writing all the pnwhatever files with their module_func_whatever() functions.

    I was able to integrate some of my programs into postnuke, just adding a simple layer about database connection, permission checking and so. And I see that some of these modules seem to work with zikula, but I guess that they are "allowed" as legacy modules and that legacy support could be terminated in the near future.

    Is it going to be necessary to develop everything specifically for zikula following all the zikula coding structure? If that is going to happen I would rather stop trying to upgrade to zikula (making a short history shot, I would rather develop my own CMS-like system around my programs than tying all my developments to a given CMS.

    Do you know of any manual explaining how to integrate a third party application into zikula?

    Thanks
  • Hi!
    Well, the always controversial statement is if it's better to build your own CMS system, and i came to a conclusion a long time ago: no. It's impossible to do in my own all the work that a lot of people has done on many years of work... again, from my point of view.

    But if you want to have your layer of your own code,
    you can include it in the module (/modules/MyModule/includes/mycode.php) and use the Zikula structure as an interface... but seems that you don't know the advantages of the Zikula Architecture, or need to share that PHP code with another app? to have API compliant code is one of the better things i can see to make it flexible and build powerfull apps.

    Last time i ported a Third Party app to Zikula (Relay - Ajax File Manager) i ended up re-coding it to be Zikula API compliand and the advantages and possibilities were endless.

    Anyways, as said, you can figure out an interface between the Zikula architecture and your code depending on your structure...

    Greetings

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Alternatively, for straight forward PHP code which simply creates output you can use the PostWrap module. It's kind of an iframe + javascript layer letting your code run inside a Zikula site.
    Greetings,
    Chris

    --
    an operating system must operate
    development is life
    my repo
  • I understand that your answers mean that:

    Yes, you HAVE TO follow all the zikula conventions. That's not optional. Is that true? That didn't happen with postnuke. It's a BIG change. For instance, things like "Module functions should return a mixed result, or boolean: they should never echo or print anything directly (to the screen)" are very strong constrains.

    I'm sorry to say that running my applications inside an iframe is not what I'm looking for. I could try, but that's a patch, not a solution.

    The question about deciding if using a CMS or developing your own one is a difficult one. It seems obvious that, as you say, an only person is not able to do all the work that a whole team has doe during years. That's usually correct. That's why, in my business, we decided to use postnuke instead of developing something similar by ourselves.

    But imagine that you decide to use a given CMS during years (postnuke), you generate lots of contents using the available modules (done by others, so that you are able to use them but you don't really know how to change the code) and you even develop some modules using the current structure. Then it happens that the CMS changes so much that the modules that you were using don't work any more (both the ones developed by you and the ones developed by others) and the contents that you generated during years won't be available in the new software (and the old one will be discontinued and not maintained at all).

    That is exactly what is happening.

    Then I wonder if I should do a lot of effort to be able to translate all the contents and modules so that they work with zikula. But what happens if in two years you decide to change something so that I have to change everything again? What if I discover a new CMS that fits my needs better?

    I must say that none of the current modules of zikula are specially useful for me. I rather use the user administration, permissions, menus, and little more. With postnuke I was using mostly a phpwiki module that doesn't work anymore in zikula and some other modules developed by me.

    You are a zikula team member. I imagine that that means that you really understand the code and know how to get the most out of it. In your case, as a postnuke/zikula member team, it can be easy to recode whatever you need so that it fits well into zikula as you might know the postnuke/zikula code very well. But I only want to use the CMS and program some modules that work within it.

    Besides that, if I decide to recode everything so that I follow all the zikula conventions, then I won't be able to use my applications outside zikula or with a different CMS in the future unless I recode a lot of things again. I'll be programming "in zikula", not "programming in PHP and being able to use it as a module for zikula". I dislike that.

    I will study the zikula convention to see if, as you suggest, I really can write a zikula layer and use my applications as includes. But I really think that, if I'm understanding everything correctly (maybe I'm not), the direction taken by zikula is not a good one.

    Thanks a lot for your answers
  • Mmmmmm
    well, sure that you need to follow the Zikula conventions to be able to access to your module controller-functions ($module&type&func). Other Frameworks/CMSs has their own conventions/classes too, that's the "price" of support your work over them, and even if it's your own code, you need conventions to save work and to gain consistency to save time, it's normal to have them when you develop software, and if i remember Ok, that's one of the quality criteria of good software... i have read that somewhere

    In the other hand, i see use of the Zikula API as a big advantage and not a path with constrains.

    About the code that you have done during many years, it's the software cycle right? it need maintenance sometimes, and we should use the advantages oh PHP5 and O.O. or not? new stuff is not just fun, it comes with new advantages, saves time and possibilities to code better things. This project can't support anymore the PHP-Nuke way, there are better ways to code stuff and Zikula offers a very nice one IMHO; and the direction in the 2.0 looks awesome (have you checked the Zikula blog?)

    Finally, it's always worth to know how the system works. I made my undergraduate thesis study-cases over Zikula and took advantage to study the core and i've learned a lot of it, so, giving back to the project i'm now a Team Member, and i prefer to do my Web stuff over the Zikula Core, because i like it and the integrations with external apps are not impossible.

    P/S: Check the Netquery module, i guess that it (like some few others) offers versions for Zikula and other systems

    --
    - Mateo T. -
    Mis principios... son mis fines
  • CRB, reading your response, you seem to be missing one option available to you. Don't upgrade, stay where you are on PostNuke. We can't help you with support as ZIkula moves further in to the future, and you'll need to take over your own security auditing of the code to make sure you stay secure, but no one is forcing you to upgrade.

    There comes a time in an Open Source projects life where someone decides, "okay I don't like the direction this project is taking" and they fork from it. That's what happened in 2001 when John Cox and company decided they didn't like the direction of phpNuke, they took the code base and forked it to PostNuke, over the 8 years since PostNuke forked from phpNuke, there have been at least 3 forks off of PostNuke when a group decided they didn't like the new direction. PostNuke is GPLed software, if you want to fork yourself, we can't stop you, and it may be your best bet. Just understand if you do that, we can't help you out here.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Isn't there a simple how to "build you how simple module for zikula" somewhere?
  • lordevol

    Isn't there a simple how to "build you how simple module for zikula" somewhere?

    Sure is: http://community.zik…uleProgrammingPart1

    --
    Cheers, Sascha

    Philivision, Inc. - User of Zikula since 2002...
  • Thanks, I start working on it today!
  • @crb

    To continue working with Zikula after having worked with PostNuke is going to mean a bit of adaptation. But it is indeed worth the trouble. There have been major changes since PostNuke, but the situation has become a lot more stable: the work you put in now would be a sound investment for the future.

    If you'd like to read a little more about what's been happening in the Zikula project, and to find out about the timeline and details of changes, you could usefully read:

    http://www.zikula.tv…stnuke-history.html

    You will find there are many advantages to learning to work with the Zikula application programming interface.

    --
    David
    http://zikula.tv
  • Yeah
    i though in the way that Michael said after post my second reply
    if you need PostNuke, you can stay in the 0.764 and don't upgrade
    that's a solution for you too...

    You will miss the Theming, Templating, and Core advantages of Zikula
    but well...

    --
    - Mateo T. -
    Mis principios... son mis fines
  • I'm in the same situation.

    The thing that was great about Postnuke is the number of modules developed by third parties.
    THAT was the strength of PN.
    Now most modules are obsolete, and Postnuke continuously lost momentum since 0.71
    I can't see any third parties developing modules like crazy for Zikula, and I definitely won't stay for the themeing and templating. I am still using "classic" themes, not Xanthia or XTE or whatever.

    I am currently kind of stuck with PN 0.764
    I use some great modules like PNphpbb2 and integrate my own PHP code using bits of PN API.

    I need permissions, multilanguage support, themeing, etc.

    I looked into Drupal, but they don't have real multilanguage support.

    Seems like I will end up using Joomla like everyone else. sad.
  • I don't really understand what you mean, speaking personally.

    It's true that the number of compatible modules decreased since .750 but Zikula provides a state-of-the-art approach for every aspect you're talking about: theming and templating, persmission and multi-language support (and soon it will have both a gettext solution and the traditional language system).

    Zikula is becoming more stable now, after the big changes there were since .750, and so it's worth being patient until all the benefits of what's been done start to bear fruit in terms of third-party developments.

    --
    David
    http://zikula.tv
  • manarak

    ...I can't see any third parties developing modules like crazy for Zikula, ...
    Seems that you have not visited the Cozi, and in particular the list of developing projects there.

    manarak

    ... and I definitely won't stay for the themeing and templating. I am still using "classic" themes, not Xanthia or XTE or whatever....
    There is no way to use "classic" themes together with modern features like caching and ease of costumization. Xanthia3 is in perfect shape, most old themes are easy to convert.

    manarak

    ...I am currently kind of stuck with PN 0.764...
    Times are changing, you definitely should move on. If you feel that's too much for you alone, go and get professional help - for example from the poeple at ZikulaPro. Paying for professional work to the people who develop Zikula and it's modules is also a fine way to support the project and ensure it's further development.

    manarak

    ...I need permissions, multilanguage support, themeing, etc....
    That's what you already got and of course get in Zikula.

    manarak

    ...I looked into Drupal, but they don't have real multilanguage support....
    Sad, but true.

    manarak

    ...Seems like I will end up using Joomla like everyone else. sad....
    Well, that's up to you but it will definitely not solve your problems better than Zikula, and add new ones - I promise. icon_smile

    Greetings,
    Chris



    edited by: slam, Feb 21, 2009 - 03:32 PM

    --
    an operating system must operate
    development is life
    my repo
  • Wow
    still using the "classic" mess of presentation layer mixed with logic and PHP?
    the advantages of the templating are endless, and Xanthia 3 is a big magicbox that enables you to do fantastic things. A proof of that: BlankTheme icon_biggrin

    Further, MultiLang support for modules will be even better.
    And what about the Zikula 2.0 stuff? things are becoming better.
    Old times where anybody with minimum knowledge of PHP were able to write extensions was cool, but now we have robust extensions that covers mostly of the common needs, and as Chris said, check the Cozi icon_wink

    Greetings

    --
    - Mateo T. -
    Mis principios... son mis fines

Go to page 1 - 2 [+1]:

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