Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st July 2012, 17:19
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Default using 'sys_config' vs 'sys_ini' table?

I need to add some vars for the templates to the db.

Could or should I use
sys_config table or
sys_ini table

or should I add a new table?
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services
Reply With Quote
Sponsored Links
  #2  
Old 31st July 2012, 17:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

If the variables are available for all themes or general interface settings, then please use sys_ini table. The variables are defined in the system.ini file in the install/conf/ folder and in the form and template file of the interface config form. No database fields have to be added.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 31st July 2012, 17:47
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Default

and for theme specific parameters?
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services
Reply With Quote
  #4  
Old 31st July 2012, 18:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Good questions indeed Maybe we should use the sys_ini table for this.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 31st July 2012, 20:38
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Default

The structure of the sys_config table is a little more complex and I think it will leave a lot more leeway for future extension.
What have you planned to put in there?

EDIT/ADD: Or a new table? Like 'sys_tpl' ?
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services

Last edited by cfoe; 31st July 2012 at 20:44.
Reply With Quote
  #6  
Old 1st August 2012, 10:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

I had planned to use the sys_config table as general key value store and to implement user defined overrides for default values with it (http://bugtracker.ispconfig.org/inde...=582&project=3). The sys_ini system that we use for server and interface values at the moment is easy and works fine, but in case that we reach the limits of the ini style storage in future (e.g. requirements for multiline values), it might be migrated to sys_config values as well.

Quote:
EDIT/ADD: Or a new table? Like 'sys_tpl' ?
Thats an option too. But then we might have to write some kind of script in the installer / updater that automatically detects the existing themes and adds them to this table, so that we replace the current "scan dir" like functionality for themes with a table that holds the details of the themes and some default values..

Which values do you plan to store for the theme?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 2nd August 2012, 11:20
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Default

I was planning to make "branding" totally global but I had to realize that if themes should be as flexible as possible branding needs to vary on a theme basis.
for example the logo might need different dimensions.

one more thing to consider is the future possibility to set branding on a per user/per reseller basis. (maybe for 3.0.6)
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services
Reply With Quote
  #8  
Old 7th August 2012, 12:55
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Default

I have added tables in the format of
tpl_*theme-title*

for the standard themes: tpl_default + tpl_default-v2

Tables and config pages will not be required for a theme but will be possible by 3.0.5 to make parameters changeable within the frontend
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services
Reply With Quote
  #9  
Old 7th August 2012, 14:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

I dont think that its a good idea to have a table for each theme, this will clutter the database and each table will have just one record anyway.

We should change this to one table "sys_user_theme" or "sys_theme" to match the naming scheme and the table has a field for the theme name.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 7th August 2012, 14:43
cfoe cfoe is offline
ISPConfig Developer
 
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
 
Default

how many themes do you want to install?

I think I will be happy with 1.

But I think we can manage with 1 table for most themes
__________________
Christian Foellmann

OpenSource-Projects - GitHub-Projects - SVN-Mirrors on GitHub - Foe Services
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Courier Imap is not working HellMind General 5 12th April 2012 01:04
table lookup problem aurelius Installation/Configuration 5 2nd November 2011 19:12
server.sh not starting up tuxillo Installation/Configuration 8 31st December 2010 14:14
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 13:58
Howto analyse a IPTables firewall issue? chillifire Installation/Configuration 2 27th August 2008 07:23


All times are GMT +2. The time now is 20:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.