Forums / Developer / New datatype for users

New datatype for users

Author Message

David Engelmark

Tuesday 07 August 2007 6:39:51 am

Hi im trying to make a new datatype that will be called Credits and it will exists in the User class and i want a extension that will be able to increse tills datatype what whould the best practice to implent this be? Im not very expreinced with Ez publish so i really don't know where to start and i want to implent it so smooth as posibly with ez publish and also is therer any other place to look for documententions/tuturials other than the main documentations?

Felix Laate

Tuesday 07 August 2007 12:17:54 pm

Hi David,

if I understand you correct, you want your user-class to have an attribute (Credits) of type number. This is easily done in the admin-interface.

Now, you can make an extension that consists of (at least) an template operator that increments the attribute.

See http://ez.no/community/forum/developer/how_to_update_an_attribute_of_an_object_with_php/re_how_to_update_an_attribute_of_an_object_wit__7 for some advice on manipulating an object with PHP.

See http://ez.no/community/contribs/template_plugins for examples of such extensions.

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com