$object = new ElggObject();
$object->subtype = 'my_new_object_type';
$object->my_new_field = 'hello, world!';
$object->save();
That's all it takes. You can do it on the fly like that or write a class file.
@Tom - The subtype is added automatically, but without a classname (an optional 3rd parameter). If you've extended the ElggObject class, you'll want to use add_subtype('object', 'my_new_object_type', 'MyClassName');
hi sarav and welcome to the community :)
I'm sure you'll learn you're way around in no time.
Is this happening while you are you logged in to the site ?
hi sef,
thanks for your greetings. no actually after enabling the cubet_membership, I logged out and registered a user. upon successful registration, i get the message as
" Sorry, you cannot perform this action while logged out."
Actually i should be registered or taken to payments page if any..
hope you got a feel of my problem.
thanks
sarav
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.