Forum template regions

A little update while I’m waiting for some inspirational lightning to hit reguarding the module/plugin problem on the forum script.

I’m still torn between a pure hooks only system and plugin API. I don’t want to take too much flexibility away from the template designers, so hooks would have to be non-intrusive. But plugins alone would do just that.

I did come up with a list of module data injection regions to work on in the mean time…

	/**
	* Template rendering injection regions
	*/
	protected $regions = array();
	
	
	/**
	* Generic regions
	*/
	$regions["BeforeBody"];					// After body tag
	$regions["Body"];						// On body
	$regions["AfterBody"];					// Before body end tag
	
	$regions["BeforeHeaderStart"];			// Before header start
	$regions["BeforeHeader"];				// After header start
	$regions["Header"];						// On header
	$regions["AfterHeader"];				// Before header end
	$regions["AfterHeaderEnd"];				// After header end
	
	$regions["BeforeContentStart"];			// Before content start
	$regions["BeforeContent"];				// After content start
	$regions["Content"];					// On content
	$regions["AfterContent"];				// Before content end
	$regions["AfterContentEnd"];			// After content end
	
	
	/**
	* List regions
	*/
	$regions["BeforeForumsStart"];			// Before forums list start
	$regions["BeforeForums"];				// Before first list item start
	$regions["Forums"];						// On forum list as item
	$regions["AfterForums"];				// After last forum list item end
	$regions["AfterForumsEnd"];				// After forums list end
	
	$regions["BeforeTopicsStart"];			// Before topics list start
	$regions["BeforeTopics"];				// Before first topics list item start
	$regions["Topics"];						// On topics list as item
	$regions["AfterTopics"];				// After last topic list item end
	$regions["AfterTopicsEnd"];				// After topics list end
	
	$regions["BeforeRecentStart"];			// Before recent topics list start
	$regions["BeforeRecent"];				// Before first topic list item start
	$regions["Recent"];						// On topics list as item
	$regions["AfterRecent"];				// Before recent topics list end
	$regions["AfterRecentEnd"];				// After recent topics list end
	
	$regions["BeforeRepliesStart"];			// Before replies start 
	$regions["BeforeReplies"];				// After replies start 
	$regions["Replies"];					// On replies 
	$regions["AfterReplies"];				// Before replies end 
	$regions["AfterRepliesEnd"];			// After replies end 
	
	$regions["BeforePagerStart"];			// Before pager start 
	$regions["BeforePager"];				// After pager start 
	$regions["Pager"];						// On pager 
	$regions["AfterPager"];					// Before pager end 
	$regions["AfterPagerEnd"];				// After pager end 
	
	
	/**
	* Individual item regions
	* NOTE: Singular! (no 's' at the end)
	* Content for these regions will be refreshed with each iteration within a loop
	*/
	$regions["BeforeForumStart"];			// Before forum item start
	$regions["BeforeForum"];				// After forum item start
	$regions["Forum"];						// On forum list as item
	$regions["AfterForum"];					// Before forum end item
	$regions["AfterForumEnd"];				// After forum end item
	
	$regions["BeforeTopicStart"];			// Before topic item start
	$regions["BeforeTopic"];				// After topic item start
	$regions["Topic"];						// On topics list as item
	$regions["AfterTopic"];					// Before topic end item
	$regions["AfterTopicEnd"];				// After topic end item
	
	$regions["BeforeLockedTopicStart"];		// Before locked topic item start
	$regions["BeforeLockedTopic"];			// After locked topic item start
	$regions["LockedTopic"];				// On locked topics list as item
	$regions["AfterLockedTopic"];			// Before locked topic item end
	$regions["AfterLockedTopicEnd"];		// After locked topic item end
	
	$regions["BeforeStickyTopicStart"];		// Before sticky topic start item
	$regions["BeforeStickyTopic"];			// After sticky topic start item
	$regions["StickyTopic"];				// On sticky topics list as item
	$regions["AfterStickyTopic"];			// Before sticky topic item end
	$regions["AfterStickyTopicEnd"];		// After sticky topic item end
	
	$regions["BeforeGlobalTopicStart"];		// Before global sticky topic item start
	$regions["BeforeGlobalTopic"];			// After sticky topic item start
	$regions["GlobalTopic"];				// On global sticky topic item
	$regions["AfterGlobalTopic"];			// Before global sticky topic item end
	$regions["AfterGlobalTopicEnd"];		// After global sticky topic item end
	
	$regions["BeforeReplyStart"];			// Before reply item start
	$regions["BeforeReply"];				// After reply item start
	$regions["Reply"];						// On reply item
	$regions["AfterReply"];					// Before reply item end
	$regions["AfterReplyEnd"];				// After reply item end
	
	
	/**
	* Form data
	*/
	$regions["BeforeTopicFormStart"];		// Before new topic start
	$regions["BeforeTopicForm"];			// After new topic start
	$regions["TopicForm"];					// On new topic 
	$regions["AfterTopicForm"];				// Before new topic end
	$regions["AfterTopicFormEnd"];			// After new topic end
	
	$regions["BeforeReplyFormStart"];		// Before new reply start
	$regions["BeforeReplyForm"];			// After new reply start
	$regions["ReplyForm"];					// On new reply 
	$regions["AfterReplyForm"];				// Before new reply end
	$regions["AfterReplyFormEnd"];			// After new reply end
	
	$regions["BeforeLoginFormStart"];		// Before login start
	$regions["BeforeLoginForm"];			// After login start
	$regions["LoginForm"];					// On login 
	$regions["AfterLoginForm"];				// Before login end
	$regions["AfterLoginFormEnd"];			// After login end

	$regions["BeforeReigsterFormStart"];	// Before register start
	$regions["BeforeReigsterForm"];			// After register start
	$regions["RegisterForm"];				// On register 
	$regions["AfterRegisterForm"];			// Before register end
	$regions["AfterRegisterFormEnd"];		// After register end
	
	$regions["BeforeSearchStart"];			// Before search start
	$regions["BeforeSearch"];				// After search  start
	$regions["Search"];						// On search 
	$regions["AfterSearch"];				// Before search end
	$regions["AfterSearchEnd"];				// After search end
	
	
	/**
	* Navigation regions and items
	*/
	$regions["BeforeBreadcrumbStart"];		// Before breadcrumb links start
	$regions["BeforeBreadcrumb"];			// After breadcrumb links start
	$regions["Breadcrumb"];					// On breadcrumb 
	$regions["AfterBreadcrumb"];			// Before breadcrumb end
	$regions["AfterBreadcrumbEnd"];			// After breadcrumb end
	
	$regions["BeforeCrumbItemStart"];		// Before breadcrumb link item start
	$regions["BeforeCrumbItem"];			// After breadcrumb link item start
	$regions["CrumbItem"];					// On breadcrumb item
	$regions["AfterCrumbItem"];				// Before breadcrumb item end
	$regions["AfterCrumbItemEnd"];			// After breadcrumb item end

	$regions["BeforeNavigationStart"];		// Before navigation list start
	$regions["BeforeNavigation"];			// After navigation list start
	$regions["Navigation"];					// On navigation list as list item
	$regions["AfterNavigation"];			// After last navigation list item
	$regions["AfterNavigationEnd"];			// After navigation list end
	
	$regions["BeforeNavItemStart"];			// Before navigation item start
	$regions["BeforeNavItem"];				// After navigation item start
	$regions["NavItem"];					// On navigation list item
	$regions["AfterNavItem"];				// Before navigation list item end
	$regions["AfterNavItemEnd"];			// After navigation list item end
	
	
	/**
	* Ancillary regions
	* Sidebar, footer etc...
	*/
	$regions["BeforeSidebarStart"];			// Before sidebar start
	$regions["BeforeSidebar"];				// After sidebar start
	$regions["Sidebar"];					// On sidebar 
	$regions["AfterSidebar"];				// Before sidebar end
	$regions["AfterSidebarEnd"];			// After sidebar end
	
	$regions["BeforeSideWidgetStart"];		// Before sidebar widget item start
	$regions["BeforeSideWidget"];			// After sidebar widget item start
	$regions["SideWidget"];					// On sidebar widget 
	$regions["AfterSideWidget"];			// Before sidebar widget end
	$regions["AfterSideWidgetEnd"];			// After sidebar widget end
	
	$regions["BeforeSideItemStart"];		// Before sidebar widget item start (module specific)
	$regions["BeforeSideItem"];				// After sidebar widget item start
	$regions["SideItem"];					// On sidebar widget item
	$regions["AfterSideItem"];				// Before sidebar widget item end
	$regions["AfterSideItemEnd"];			// After sidebar widget item end
	
	$regions["BeforeFooterStart"];			// Before footer start
	$regions["BeforeFooter"];				// After footer start
	$regions["Footer"];						// On footer 
	$regions["AfterFooter"];				// Before footer end
	$regions["AfterFooterEnd"];				// After footer end

I doubt all of the available regions will be used even with many plugins installed, but they are there just in case. I’m hoping template designers would adopt containers as list items (<li>) instead of tables. All module rendering functionality will be depending on that.

2 thoughts on “Forum template regions

  1. Ah. Hmmm. Yes, plugins, data injections, I… No, no, I have no idea.

    Hope you’re doing well and that life is good. Finding the Color of Pommegranites is proving to be as tough as understand this forum stuff. Still, onward and forward!

    • Haha, indeed! Thanks!
      Actually, I did manage to solve this forum plugin headache.

      It’s a ducktape and superglue solution, but I think it should work. As they say, the best fixes are, sometimes, the dirty ones ;)

      I found the DVD on Amazon. But it says Only 2 left in stock–order soon (more on the way).

      This is one of the big problems with finding this movie. They don’t produce mass quantities and it sells out very quickly as soon as they get it in stock.

      There is a boxset collection including TCOP, but I’m not familiar with any of the other films in it. Also, note : Only 3 left. And it’s definitely pricy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s