Lack of interest Create some usefull Installhelper Classes for 3rd party devs

  • Thread starter Thread starter ragtek
  • Start date Start date
This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
R

ragtek

Guest
Once the coders start creating add-ons with own content & node types, it gets really tricky, when it comes to creating the install & deinstall code.

IMHO it would be much cooler(and easier), if the xf framework would handle all this stuff.
You could provide a class, where we would only need to give the params and xf would do the work.

for example the install code could look like:
PHP:
/*
array containing the content type and the fields
*/
$contentTypeArray = array(
  'ragtek_article'  =>  array
    (
            array('news_feed_handler_class','Ragtek_AS_NewsFeedHandler_Article'),
            array('attachment_handler_class','Ragtek_AS_AttachmentHandler_Article')
    )
);
XenForo_Install_ContentTypes::insert($contentTypeArray);
The same could be done with node types

With this, also the deinstallation would be much easier.
While the deinstallation, xf have the add-on id, so it could query all the content types for this add-on =>(for deleting of the attachments, likes, alerts,moderation center items, report center items, etc...)

(see also this thread http://xenforo.com/community/threads/delete-specific-contenttype-attachments.12940/ ;) )

The best solution would be, to give us also a nice UI in the admincenter to manage all this stuff, so we wouldn't need to take care of anything.
Create content/node type, associate the classes and save the form:D
 
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
I agree with this. Do I have to manually write the insert queries to create my content type? Also you might be able to answer this... why is there both content_type and content_type_field tables? Looks like they both do the same thing just with a different data structure? Is one a cache?
 
Top Bottom