Wed Sep 16 2009, 01:01AM
How easy (or not) would it be to add my own tabs to the 'latest' part of the home page? Ideally, with no or little hacking of the widget (which seems unlikely from a first glance).
Back to top
Wed Sep 16 2009, 11:31PM
Actually it's easy, no hacks required. Go to thbeam/includes/front/tabs/ folder and create your new tab script. You could easy do it with cop/paste/rename some of the existing tabs.
Example: mytab.php needs to have at least:
class clw_thbeam_front_tabs_mytab extends clw_thbeam_front_tabitem
{
	protected $mod = 'mytab';
}

You also would like to override _getBody() (see parent class) and create shortcodes, lans, templates for your tab (naming conventions here as well).
Back to top
Wed Sep 16 2009, 11:34PM
I really hope your question was about Beam widget and adding a 'latest' tab to it :)
Now when I read you, it seems you are talking about e_latest or...?
Back to top
Fri Sep 18 2009, 02:58AM
It was about beam widget - I'll give it a spin soon, thanks.
Back to top
Sat Sep 19 2009, 12:42AM
Just let me know if you meet any troubles.
Back to top
Fri Oct 09 2009, 09:32PM
OK, for info. this is what I've found that needs editing/adding:

thbeam/includes/admin/config_page.php
158 add new tab name(s) to $tabs_all array

thbeam/includes/front/tabs/newtab.php
new file (defines the class clw_thbeam_front_tabs_newtab - must implement render() function)

thbeam/shortcodes/tabs_newtab_shortcodes.php
new file (only needed if newtab.php uses templates)

thbeam/templates/tabs_newtab_tmpl.php
new file (only needed if newtab.php uses templates)

ncore/cl_widgets/thbeam/tabs_tmpl.php
27 add new tab name(s) to shortcode params
33 add new tab name(s) to shortcode params

ncore/cl_widgets/thbeam/tabs_newtab_tmpl.php
new file (is this needed if tmpl file is in plugin?)


Some basic/quick integration already done for this site: http://www.subhc.org.uk

[ Edited Fri Oct 09 2009, 09:33PM ]
Back to top
Mon Oct 12 2009, 02:03AM
nice done bugrain.
I forgot about $tabs_all array, I'll try to get rid of it in some future release and replace it with some kind of nice auto-detection.

Theme templates are not required - they are just overriding the widget templates (which are mostly blank AFAIR)
Back to top
Moderators: SonicE, veskoto, SecretR, Stoewarius, steved, McFly, Cameron, yanniiwanow
Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF

Jump:     Back to top