Encountered problems during developing extension of a module (Tags)

rockarena

Joined: 2007-05-03
Posts: 15
Posted: Fri, 2007-05-04 09:35

Hi everyone,

I'm working on an adition of the Tags module, which is a very excellent piece of work, but I wanted to add one thing to it. When you look at the admin view or when you want to add the tags to an item it shows the tags in alphabetical order; I want to have those tags categorized for the admin so it gives you a better view. So I started with copying all the files from the Tagmodule into a new module folder and modified the module.inc file so if the Tag module would get upgraded I wouldn't lose all my changes. I left the name of the original designer off course because he has already been a great help to me.

When I went to the plug ins page I suddenly got these error messages:

Warning: join() [function.join]: Bad arguments. in /home/projects/kumagallery/site/modules/core/AdminPlugins.inc on line 114

Warning: join() [function.join]: Bad arguments. in /home/projects/kumagallery/site/modules/core/AdminPlugins.inc on line 116

I have no idea what this means so can anyone please help me with this?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-05-04 13:53

@copying modules / forking:
maybe it would be a better idea to create a patch than to copying the module.
if you plan to release your module (which is basically the tags module plus small changes), people have to choose between your module and the tags module.
which would be bad for future maintenance / bug fixing etc.
so i hope that your changes flow back to the original tags module such that we don't have to deal with the pain associated with a fork.

@topic:
it reports an error in modules/core/AdminPlugins.inc on line 114 and line 116.
now you need to look at modules/core/AdminPlugins.inc and see what's on line 114 / 116.

i assume you're using g2.2.1
see line 116 at http://fisheye3.cenqua.com/browse/gallery/trunk/gallery2/modules/core/AdminPlugins.inc?r=16045

looks like you either forgot the setRequiredModuleApi call or you're setting it to a wrong value.
take a look at other modules to see what should be part of the module constructor.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
rockarena

Joined: 2007-05-03
Posts: 15
Posted: Fri, 2007-05-04 14:57

Thanx for the reply and I see the issue you are talking about with there already being a Tags module. I wasn't really intending on releasing it because I'm not a good programmer and it's basically just something I want to add for my own convenience. Now however if the original creator of the Tags module would be interested in using it he can off course and I would be happy to give him my code for revision.

It's almost finished now but when trying to make the Maps.xml file I got this error message:

GNUmakefile:1: ../../../lib/tools/bin/GNUmakefile.classes: No such file or directory
make: *** Er is geen regel om doel '../../../lib/tools/bin/GNUmakefile.classes' te maken. Gestopt.
translation of the above line: make:***there is no rule to make target '../../../lib/tools/bin/GNUmakefile.classes'

Ifound this on the wiki: Rebuild Map.inc and Entity.inc as well as Database Schemas whenever You Change an Entity or Map's Structure

A G2 member is a member which has a "@g2" XML snippet in its phpdoc variable comment. We use that to generate the Entities.inc and Maps.inc files associated with every entity class and map, and also to generate the SQL database definitions. We must change the entity/map schema version number and create entity migration XML files whenever we change entity members.

cd modules/[modulename]/classes/ && make

But make doesn't seem to work. Is there another way I can add tables to the module or not?

Sorry, it seems I don't have the developers version of gallery so that fixes my problem ;-)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-05-04 14:57

you need g2's development package (which includes all the stuff in lib/tools/ ...) to call make.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage