Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

New to Block development  Bottom

  • hi
    i am about new to zikula and I've learnt alot about it in recent months
    but all I learnt , was from reading modules code and testing my idea to reach my goal
    I've searched alot but found no complete documentation about zikula or postnuke
    anyone knows a place than i can learn proffessional features of zikula like block developement or hooks?
    the documentation in this site is really poor.
    thanks to every one who can help me.
  • Hi Hosseingt!
    Welcome to the community forums!

    In fact, we need more hands on the documentation icon_frown
    Hooks is an undocumented cool feature that you can implement looking to other Hook modules too, but I guess that the Blocks development page is complete enough to build your own block, it's real simple and you can also check the existing Blocks...

    In the other hand, Hooks are not a mystery...
    You just register the functions that handle each purpose (display, edit, create...) and It got inserted/called from the respective places. If you build a create hook, you define the GUI function in charge, so, handle both cases:
    * When the hook is called after creation/edition submit (you get your unique input parameters)
    * When the hook is called from the edit/creation form, then you return the section that you want to insert in the other's module Item creation/edition.

    It's just a matter to register your GUI method, Hook your module to Pages/News/etc and play icon_wink

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

    I was wondering about the possibility of create blocks as well..
    It is possible to create one by combining code from other ones?

    Just as an example, on my site i'm working on, http://www.learnphoto.ca/onlinecourses/
    I've got a variety of blocks:
    -News
    -10 latest weblinks
    -5 latest discussion forum

    Is it possible to combine them all into one block? For example, can i just take the code out of the latest weblinks and latest discussion forum templates and paste them into the news one so they all show together?

    Or could i copy the Web_Links not available module, rename the folder something else(LATEST INFO for example) and put it the modules folder and then adjust the code in the templates?

    Another unrelated question, how can i make the space between blocks on my left menu smaller or not there at all?

    Thanks
    Noel
  • thank you alot;
    i made the block with your guides.
    i have a new problem.
    my module has some function that works correctly in admin mode..
    but when i made a block and put in in my home page (user mode) it does not run correctly and SQL queries are not in right format
    (for example 'select from where id=3' table name and fields are not in final query that i have made with dbutil )
    is here right place for posting this problem?
  • I found it
    sometimes all of the tables don't load into $pntable variable and some of dbutill functions that use $pntable cannot find table name and its columns so the query will bi like that i said
    the solution is that we use
    pnModDBInfoLoad('ModuleName');
    to load data into $pntables

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