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

News

Articles | Extensions

Articles: What a wonderful day :-)

Contributed by rallek on Jan 21, 2014 - 06:58 PM

Extensions

I am happy and proud to show my very first module! Of course it is a simple one. But see yourself: VerySimpleDownload

This is made with ModuleStudio. I have to say it is really easy. A lot of community members know me as a user. And I am still only a user. But I can now create my own module icon_smile .

How did I proceed with my module? First I made the model with the current version of ModuleStudio. It do have an outdated generator but the webgen is available to provide me actual code. So I generated my module there. This is my guarantee to have the latest code running for 1.3.6.

The model itself is easy. I do have a title, a description and an upload field. By choosing some of the properties like categories I already got a very good starting point. Additionally I wanted to make the allowed file size and the allowed extensions configurable. Therefore I added these both inside a variable container. Easy to do for a user like me icon_smile .

The next step was to adjust some templates. In this case I only changed the view.tpl file a bit. In edit.tpl I changed two places where the file size and file extensions are shown. There I placed the two modvars I created inside the model. How I had to do that I was told in the german forum. This was a big milestone in learning for me. But only changing this inside the template is not solving my issue. I learned to change the uploadHandler.php. And here I have recognised the brilliancy of ModuleStudio!

There is already an prepared file to do my changes. So I do not have to touch the original code. I just can overwrite it in the empty uploadHandler.php file! Again I got help by our community to do so. But this part was not that difficult to solve. And again I learned a lot!

Finally I changed the admin.png and added an editor.png. To show the new editor icon in scribite I only have to exchange the path inside the three plugin files of the three editor plugins.

During testing I made some more small changes in some templates, but nothing important to tell here. Now I am asking you to try out my first module and give me tips for improvement inside the issue tracker. By the way: the next two modules are under development right now. A little bit more complex but also not a big deal icon_wink

Thanks to Axel that he provides such a great tool like ModuleStudio for free. I can recommend to every developer and user to try out the simple way to create modules with ModuleStudio!

 

Share    

Comments

Comment by:
pnFilip's Avatar
pnFilip
22 Jan 2014 - 07:48PM
Great news!
Glad to see that things are moving on the file management side. I will test your module in the next few days and report. Thank you for all the work done!
 
Comment by:
espaan's Avatar
espaan
22 Jan 2014 - 11:26PM
Nice !
Hi Ralf. Good stuff.

Adjusting templates and some Child classes to get what you want is doable (with a little help if needed icon_wink ) and you get to where you want quickly.

BTW I'm also working again on SimpleMedia2. With MOST061 webgen code and some core patches things are starting to get there. And also there the uploadhandler is adjusted of course for the allowed extensions and filesize icon_biggrin
 
Comment by:
rallek's Avatar
rallek
23 Jan 2014 - 08:53AM
Thanks!
This is just a very simple example. I want to show everybody would be able to create these litte nice helper modules in short time. It tooks me only 5 or 6 hours to leran the needed details. More skille users would be able to this in 30 minutes!

The next two modules are more complex. And even them are able to made by a user like me. Try it icon_biggrin
 
Comment by:
pnFilip's Avatar
pnFilip
29 Jan 2014 - 08:10PM
Report on install
I have successfully installed the module but I am having a workflow error while trying to upload. I will submit you one ticket.

To me the idea is not to have everybody developing his own module because I think that putting forces together is more efficient. It's also not a trivial task to maintain a module that you created, despite the use of module studio icon_wink .
 
Comment by:
rallek's Avatar
rallek
02 Feb 2014 - 08:53AM
thanks for testing
the workflow error is a known bug in 1.3.6. please read the documentation icon_wink
 
Comment by:
espaan's Avatar
espaan
19 Feb 2014 - 04:23AM
workflow bug
Just for information, the workflow should be gone in 1.3.7 !
 
Only logged in users are allowed to comment. register/log in