Extension & module generator

Author Message

Xavier Langlois

Thursday 10 August 2006 5:30:20 am

Hello,
I've made a basic extension & module generator:

http://xl714.info/index.php?/blog_site/scripts/ez_extension_builder

I will work on it a lot more and then put it as a contribution.
But maybe it could already be useful for some people (it is for me).
Or you can tell me what's wrong or what could be better.
Bye
Xavier Langlois

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Paul Borgermans

Thursday 10 August 2006 8:07:03 am

Hi Xavier

A good start for sure. Something to add: the views can take different ways of getting variables (HTTP, in url, ...). So you may add a stub for these methods or even let the user define them in the form.

Looking forward to your contrib, if you also want an svn account on pubsvn.ez.no, let me know

Regards

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Xavier Langlois

Friday 11 August 2006 1:00:01 am

Hello,
Thanks for your comment, it gave me more motivation to continue.

<i>... if you also want an svn account on pubsvn.ez.no, let me know</i>
Yes please. I havn't had the time to see how it's working but I'd like to have a look and see if it will be usefull. ( My email : xavier[dot]langlois[@]gmail[dot]com )

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Xavier Dutoit

Friday 11 August 2006 8:28:33 am

Salut,

one nice option would be to offer to create the translation structure too... and the events.

As for the modules and as Paul said, let create some views with the named/unamed params.

Nice start !

X+

http://www.sydesy.com

Kristian Hole

Saturday 12 August 2006 1:34:43 am

Hi Xavier,

I have been thinking about a module like this, but never gotten around to making it. Kudos for doing so :-)

Here is some motivation for you: I think this is something that would be cool to include as Rapid Application Development (RAD) in the admin interface. I am however not the one deciding what goes into ezp....

I noticed that you cannot make the module in the extension optional. You can have extensions with just a design in them (we do this for customer projects).

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Xavier Langlois

Friday 25 August 2006 6:58:01 pm

Hello,
Thanks for your replies (and svn account), I really took notes about them and will do my best to add the new functionalities when I'll be able to make some time for it.
Now it's there: http://ez.no/community/contribs/applications/extension_manager
And the link to the generator is added in setup/rad d;o)
@+

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Felix Woldt

Saturday 26 August 2006 8:12:55 am

Hi Xavier,

it's a great idea to make such an extension like this :-).
But it's very complex. Do you have a developing plan?
...
It would be great to have this as an in build feature of eZ.
May be i can help you with development???

I had a short look to your sourcecode ... you did more work as you needed :-(
You wrote functions to delete a dir ...
EZ has this functionaltiy in different libaries :-)
Have a look to

include_once( 'lib/ezfile/classes/ezdir.php' ); 

e.g.

eZDir:recursiveDelete( $dir );

=====
To have access to post and getvariable you should use the eZ build in functions:
e.g.

$http =& eZHTTPTool::instance();

if( $http->hasVariable('testvar') )
	$test = $http->Variable('testvar');

=====

To have access to parameter you send to the module you should use something like this
you set this in the module.php (params, unordered_params)

$Module =& $Params["Module"];

if( isSet($Params['NodeId']) )
	$NodeId = $Params['NodeId'];

=====

You can learn a lot from the conent module of ez.
Have a look to
kernel/content/module.php

====
May be this help you a little bit to improve your php code.

Best Regards
Felix Woldt

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

Xavier Langlois

Saturday 26 August 2006 4:02:03 pm

Hello Felix

<i>"Do you have a developing plan?" </i> >> No as its actually very basic compare to what the final "Extension manager" is, ... as I imagine it.

<i>May be i can help you with development???</i> >> You don't really need my answer ;) thanks for your help. Help me as much as you want !

<i>... to improve your php code</i> I know, I know :( ... but I'm learning.

Regards
Xavier Langlois
http://xl714.free.fr/cv/

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Jianjun Hu

Monday 02 July 2007 7:36:57 pm

I installed <b>Extension manager 0.3</b> on <b>eZ Publish 3.9.2.</b>

I created a extension with it.

extension:    my_new_extension
module(s):    my_new_module
view(s):      view_1

I activated it and cleared all cache.

When I want to see the result by browsering

http://www.mydomain.com/my_new_module/view_1

,
the result is same as homepage.

How could I see the result of the sample extension?

Thanks!

OnlyBlue

☆..·°∴°.☆°°.☆°.
°∴ °☆ .·enjoy star° .·★°∴°
∴°.°★ .·°
  ミ☆°∴°.★☆° ∴·°
°.☆° .·∴° 

Is it a pleasure after all to practice in due time what one has learnt?

Xavier Langlois

Tuesday 03 July 2007 2:06:16 am

Hello,
I'm sorry I'm not able to help you, as it's always working fine for me and I can't thing of what's the problem.
But there is something strange, you should have an error message such as "Module not found" or "Access denied", not the homepage result ...
Have you tried :
http://www.mydomain.com/index.php/my_new_module/view_1 or
http://www.mydomain.com/index.php/<yourSiteAccess>/my_new_module/view_1
and manually delete all the cache dir ? (We never know)

What's happening if you go to this adress ?
http://www.mydomain.com/non_existing_module/azerty

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Jianjun Hu

Tuesday 03 July 2007 2:40:33 am

I try:

http://www.mydomain.com/index.php?/chi/my_new_module/view_1

It works!

I try:

http://www.mydomain.com/non_existing_module/azerty

It displays homepage without error messages.

I try:

http://www.mydomain.com/index.php?/chi/non_existing_module/azerty

It displays an error message page:

Error / kernel (20)
Module not found
System can't find module on_existing_moduleB
Possible reasons:
......

Thanks! <b>Xavier</b>

☆..·°∴°.☆°°.☆°.
°∴ °☆ .·enjoy star° .·★°∴°
∴°.°★ .·°
  ミ☆°∴°.★☆° ∴·°
°.☆° .·∴° 

Is it a pleasure after all to practice in due time what one has learnt?

Xavier Langlois

Tuesday 03 July 2007 2:51:16 am

Great !
Happy to help.
++

--
There were these two cows, chatting over the fence between their fields.
The first cow said, "I tell you, this mad-cow-disease is really pretty scary. Don't you think ?"
The other cow replies, "Hell, I ain't worried, I'm a duck !"

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.