Forums / Developer / New datatype for users

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 Exponential so i really don't know where to start and i want to implent it so smooth as posibly with Exponential 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