Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 08-04-2011, 11:19 AM
arvid arvid is offline
 
Join Date: May 2003
Location: Stockholm, Sweden
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm now well into my second custom content type and these are my experiences so far:

The framework is very object oriented and hierarchic in a sense that almost all classes inherit behaviour from parents. This is great since you get to write less code, but at the same time it makes it harder to get a complete view of what functions are availible and what versions you have availible in your class.

You often have to do a lot of file-searching to find out what happens when you call a specific function.

When you get the hang of it this is mostly a good thing, but it takes a bit of time to get the big picture...

Also, some of the features aren't as straight forward as you might think and even vB's own content types aren't 100% streamlined, so don't trust that copying them will get you a perfect base to stand on.
For example the getContentQueryFields() & getContentQueryJoins() functions in /packages/vbcms/collection/content/article.php are never used since they are overridden by the custom query in getLoadQuery() in /packages/vbcms/item/content/article.php.

Don't get me wrong - basing your content type on one of vB's contenttypes is clearly the best way to go, but don't trust that everything is perfect and 100% correct. =)

It's hard to give you tips just out of the blue, but this is the way I would recommend you would go when creating your own content type:
  • Read Edwin's blog post (remember that it's not 100% up to date)
  • Create your own product and add your own package to it (detailed in Ed's Content Type post, but a more clear explanation can be found in his custom widget blog post)
  • Create your own content type as a copy of one of vB's content types. It will be messier then using the custom content type from Ed's blog post, but it will be more up to date. Remember to change all the Article/Staticpage names to your own name to avoid conflicts. And to use your own set of templates (this is detailed in Ed's blog post)
  • When you get it up and working, start by changing something small like adding a new field to your content type and trying it out.
  • As you get more familliar with the content type you can go on to change more drastic things.

Small steps and then test would be my general recommendation, so you don't get stuck somewhere and have lot's of code to check.

--------------- Added [DATE]1312462546[/DATE] at [TIME]1312462546[/TIME] ---------------

The framework is nice and quite flexible, but there are a few points where it is lacking:

- Quite complex to create your own content types - you really have to familiarize yourself with vB's way of thinking and the frameworks structure
- The rights management structure is really lacking. The different levels are too broad and inherit rights from each other. For instance if the user has the rights to publish she also has the rights to edit the section itself - not really ideal...
There is also no possibility to pinpoint the permissions more precisely to an individual content type for example (if the user is allowed to create and publish content she will also be able to create articles for example)
Reply With Quote
Благодарность от:
Alfa1
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:13 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07704 seconds
  • Memory Usage 2,637KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (13)post_thanks_box
  • (2)post_thanks_box_bit
  • (13)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (13)post_thanks_postbit_info
  • (13)postbit
  • (13)postbit_onlinestatus
  • (13)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete