|
|
|
|
|
Joined: Tue Jun 16 2009, 11:13PM
Posts: 7
|
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).
|
|
|
|
e107 developer
Joined: Sat Nov 18 2006, 06:29PM
Posts: 1170
|
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).
|
|
|
|
e107 developer
Joined: Sat Nov 18 2006, 06:29PM
Posts: 1170
|
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...?
|
|
|
|
Joined: Tue Jun 16 2009, 11:13PM
Posts: 7
|
Fri Sep 18 2009, 02:58AM
|
|
|
|
It was about beam widget - I'll give it a spin soon, thanks.
|
|
|
|
e107 developer
Joined: Sat Nov 18 2006, 06:29PM
Posts: 1170
|
Sat Sep 19 2009, 12:42AM
|
|
|
|
Just let me know if you meet any troubles.
|
|
|
|
Joined: Tue Jun 16 2009, 11:13PM
Posts: 7
|
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 ]
|
|
|
|
e107 developer
Joined: Sat Nov 18 2006, 06:29PM
Posts: 1170
|
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)
|
|
|
|
|
|
Moderators: SonicE, veskoto, SecretR, Stoewarius, steved, McFly, Cameron, yanniiwanow
|
|
|