postfixadmin-devel Mailing List for PostfixAdmin (Page 27)
Brought to you by:
christian_boltz,
gingerdog
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(39) |
Nov
(29) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(5) |
Feb
|
Mar
(8) |
Apr
(8) |
May
|
Jun
(11) |
Jul
(21) |
Aug
(4) |
Sep
(9) |
Oct
(5) |
Nov
(25) |
Dec
(11) |
2009 |
Jan
(40) |
Feb
(16) |
Mar
(1) |
Apr
(46) |
May
(3) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(9) |
Oct
(27) |
Nov
(35) |
Dec
(20) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
(8) |
Apr
(1) |
May
(9) |
Jun
(8) |
Jul
(1) |
Aug
(7) |
Sep
(2) |
Oct
(2) |
Nov
(12) |
Dec
(7) |
2011 |
Jan
(45) |
Feb
(11) |
Mar
(18) |
Apr
(15) |
May
(20) |
Jun
|
Jul
(5) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
|
Dec
(14) |
2012 |
Jan
(30) |
Feb
(36) |
Mar
(6) |
Apr
(32) |
May
(20) |
Jun
(5) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
(22) |
Dec
(1) |
2013 |
Jan
(13) |
Feb
(4) |
Mar
(70) |
Apr
(10) |
May
(6) |
Jun
(11) |
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(15) |
Nov
(4) |
Dec
(4) |
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(8) |
Dec
(2) |
2015 |
Jan
(1) |
Feb
(9) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(4) |
Feb
|
Mar
(10) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(13) |
2017 |
Jan
(1) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
2018 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
From: aja-lists <aja...@tn...> - 2009-11-16 17:34:13
|
Simone Piccardi wrote: Hi, > I had the same issue after running the upgrade script for a 2.2 database. > > It was solved just adding the quota column in the domain table after the > maxquota column. > > I don't remember the exact SQL, it was someting like: > > update table domain add quota after maxquota Thank you. After I ran into some trouble with emails to only email-aliases giving "user unknown" (or similar) errors (turned out that was due to certain usage of "no_address_mappings"), I decided to put back a backup and started upgrading again, that gave amongst others a "config" table not found which could not be handled by the upgrade.php I'll probably set up another test VPS to produce a clean Postfixadmin 2.3 install, and then compare the table structure. Regards, Adrian. |
From: Simone P. <pic...@tr...> - 2009-11-15 19:24:14
|
aja-lists ha scritto: > I'm getting this error now : > Unknown column 'domain.quota' in 'group statement' > when pressing the "Domain list" option in Postfixadmin. > > A search for : > "Unknown column" "in group" postfixadmin > doesn't come up with anything. > How to fix this ? > (By the way, I'm not planning to use the quota, nor the vacation options) > Hi, I had the same issue after running the upgrade script for a 2.2 database. It was solved just adding the quota column in the domain table after the maxquota column. I don't remember the exact SQL, it was someting like: update table domain add quota after maxquota It seems that the upgrade script did not add it. Regards Simone |
From: aja-lists <aja...@tn...> - 2009-11-15 04:02:22
|
aja-lists wrote: > I'm getting this error now : > Unknown column 'domain.quota' in 'group statement' > when pressing the "Domain list" option in Postfixadmin. > > A search for : > "Unknown column" "in group" postfixadmin > doesn't come up with anything. I've installed Postfixadmin on Debian Lenny from the deb file (which went fine, without errors). Is it possible to have a (2.3) database skeleton to compare my current database with somehow ? In earlier Postfixadmin versions years ago a MySQL "setup" file was included where one could see how the tables were created. Like here e.g. : http://download.debian-france.fr/tutoriels/postfix/mail.sql I can't find a file like that in the current release. (dpkg -L postfixadmin|grep -i sql gives no results) Is it there or am I missing something ? Everyone works fine so far, except this error above. The tables overview also looks OK : +-----------------------+ | Tables_in_postfix | +-----------------------+ | admin | | alias | | alias_domain | | config | | domain | | domain_admins | | fetchmail | | log | | mailbox | | quota | | quota2 | | vacation | | vacation_notification | +-----------------------+ 13 rows in set (0.01 sec) (And for the record, I've also set up vacation in the meantime, which works great) |
From: aja-lists <aja...@tn...> - 2009-11-15 01:08:35
|
Hi, After a bit of a struggle I've managed to upgrade to 2.3 (wonderful!) and I'm delighted to also have the squirrelmail-postfixadmin plugin in use now! :) Two questions : So far everything seems to be fine in Postfixadmin (a.o. a setup.php + debug=1 showed no errors anymore after I'd re-enabled Innodb in MySQL) I'm getting this error now : Unknown column 'domain.quota' in 'group statement' when pressing the "Domain list" option in Postfixadmin. A search for : "Unknown column" "in group" postfixadmin doesn't come up with anything. How to fix this ? (By the way, I'm not planning to use the quota, nor the vacation options) And what would be the preferred permissions for /usr/share/squirrelmail/plugins/postfixadmin/config.php ? Would a chown www-data $1;chmod 640 $1 be good enough to "secure" the password in that file ? Cheers, Adrian |
From: aja-lists <aja...@tn...> - 2009-11-15 00:28:36
|
David Goodwin wrote: > Yes, this is supported already. I think you just set the hostname to > be e.g. localhost:3304 in the config.inc.php file. Thanks! And I see that I missed the fact that PostfixAdmin 2.3 is out since october. Great! :) |
From: David G. <da...@co...> - 2009-11-14 21:54:27
|
aja-lists wrote : > Hi, > > I'm using greensql-fw, and I'd like to use it also with Postfixadmin. > > Would it be possible to let Postfixadmin have a configuration option > where you can define a non-default MySQL port so that greensql-fw can be > used ? > Yes, this is supported already. I think you just set the hostname to be e.g. localhost:3304 in the config.inc.php file. thanks David. -- David Goodwin [ david at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ] |
From: aja-lists <aja...@tn...> - 2009-11-14 17:48:08
|
Hi, I'm using greensql-fw, and I'd like to use it also with Postfixadmin. Would it be possible to let Postfixadmin have a configuration option where you can define a non-default MySQL port so that greensql-fw can be used ? Regards, Adrian. |
From: Aaron D. <aa...@da...> - 2009-11-14 17:44:20
|
I'm new to postfixadmin. I am managing a dozen or so domains, all of which I wish to use with DKIM. Having the admins manually edit text files listing domains and keys is a problem. Are there any hooks I can attach a script to that will manage these files for me? Thanks for your time! Aaron |
From: Tanstaafl <tan...@li...> - 2009-11-09 15:03:20
|
On 11/9/2009 9:37 AM, David Goodwin wrote: >> don't know if this is the right list to use, but I'd like to share >> a simple python script that can be used to create users and domains >> in a Postfixadmin installation taking the list from a .CSV file. <snip> > Thanks! I'll try and get it in the ADDITIONS/contrib folder > (whichever) And maybe add it to the interface (an 'Import' button, with the ability browse a local filesystem for the cvs file)? :) |
From: David G. <da...@co...> - 2009-11-09 14:37:24
|
Simone Piccardi wrote : > Hi, > > don't know if this is the right list to use, but I'd like to share a > simple python script that can be used to create users and domains in a > Postfixadmin installation taking the list from a .CSV file. > > All it needs is an ordinary CSV file (I created mine exporting an excel > file with openoffice). The file should contains the user list with a > line for each user; the first line must be a title line with at least > the following column names: > > * user - user part of the email (like user in 'us...@do...') > * password - cleartext password (it will be encripted) > * domain - domain name (like 'domain.com') > * name - full user name (like 'Name Surname') > > (the 'name' column is optional) > > the script will populate the DB creating entries in the domain, mailbox > and alias tables. You can ask also to create default aliases for each > domain. > > The script can be found here: > > http://labs.truelite.it/truedoc/raw-attachment/wiki/EnPostfixAdminInst/inspostadmusers.py > > invoking it with -h will give you all the options, in normal use you > will need to give a database account password with the -p options, other > parameters (dbname, dbuser, dbhost) are set to the default used by the > Debian package, but can be changed by other options or editing the > default values inside the script. > > I used this script to import over 400 users for ~10 domains in a > Postfixadmin server (a 2.3 version using dovecot and MySQL). It did its > work in a few seconds without problems, but I cannot give any warranty > about it... > > I'aware of some limitation: the script works only with a MySQL backend, > and the mailboxes are created with a pathname in the form: > > domain/usernmame > > This can be easily changed modifying* the line: > > mailbox['maildir'] = row["domain"]+'/'+row["user"]+'/' > > but making it work with Postgres will require some knowledge of Python > Postgres API (and I have none...). > > The script was used and tested only on a Debian Lenny system using > postfixadmin 2.3, so probably there are many other limitations and > trivial errors I'm not aware of. Unfortunately I don't have the time to > test it more extensively; I'm posting it anyway hoping it could be > useful to other people and that it could be used at least as a starting > point for something more refined. > Thanks! I'll try and get it in the ADDITIONS/contrib folder (whichever) thanks David. -- David Goodwin [ david at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ] |
From: Simone P. <pic...@tr...> - 2009-11-09 14:12:32
|
Hi, don't know if this is the right list to use, but I'd like to share a simple python script that can be used to create users and domains in a Postfixadmin installation taking the list from a .CSV file. All it needs is an ordinary CSV file (I created mine exporting an excel file with openoffice). The file should contains the user list with a line for each user; the first line must be a title line with at least the following column names: * user - user part of the email (like user in 'us...@do...') * password - cleartext password (it will be encripted) * domain - domain name (like 'domain.com') * name - full user name (like 'Name Surname') (the 'name' column is optional) the script will populate the DB creating entries in the domain, mailbox and alias tables. You can ask also to create default aliases for each domain. The script can be found here: http://labs.truelite.it/truedoc/raw-attachment/wiki/EnPostfixAdminInst/inspostadmusers.py invoking it with -h will give you all the options, in normal use you will need to give a database account password with the -p options, other parameters (dbname, dbuser, dbhost) are set to the default used by the Debian package, but can be changed by other options or editing the default values inside the script. I used this script to import over 400 users for ~10 domains in a Postfixadmin server (a 2.3 version using dovecot and MySQL). It did its work in a few seconds without problems, but I cannot give any warranty about it... I'aware of some limitation: the script works only with a MySQL backend, and the mailboxes are created with a pathname in the form: domain/usernmame This can be easily changed modifying* the line: mailbox['maildir'] = row["domain"]+'/'+row["user"]+'/' but making it work with Postgres will require some knowledge of Python Postgres API (and I have none...). The script was used and tested only on a Debian Lenny system using postfixadmin 2.3, so probably there are many other limitations and trivial errors I'm not aware of. Unfortunately I don't have the time to test it more extensively; I'm posting it anyway hoping it could be useful to other people and that it could be used at least as a starting point for something more refined. Regards Simone -- Simone Piccardi Truelite Srl pic...@tr... (email/jabber) Via Monferrato, 6 Tel. +39-347-1032433 50142 Firenze http://www.truelite.it Tel. +39-055-7879597 Fax. +39-055-7333336 |
From: Johan H. <Jo...@do...> - 2009-11-09 07:53:57
|
>Hi Johan, > >ok, I tested with short_tags_open = off and I could reproduce the >problem. All problems related to short tags are fixed in the latest >revision. >Regards, >Sebastian Thanks all is working now, i have short_tags_open = off set It looks realy good this way, I really like the alias / mailbox toggle. The thing I do not like is that on the alias page I can no longer set the value alias_goto_limit It make the page really big, I have some aliases with more than 100 mailboxes. So it would be really nice if I get back the old behaviour, be able to set the alias_goto_limit. Thanks again for the wonderful project. No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.425 / Virus Database: 270.14.55/2490 - Release Date: 11/08/09 19:39:00 |
From: reg9009 <re...@ya...> - 2009-11-08 15:51:28
|
> > > Hello again. > I have updated to revision 761 > > Now i have the following on top of the page : > > '.$val.''; } return $ret_val; } function eval_size ($aSize) { if > ($aSize == 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_unlimited']; > } elseif ($aSize < 0) {$ret_val = $GLOBALS > ['PALANG']['pOverview_disabled']; } else {$ret_val = $aSize; } return > $ret_val; } php?> > > This is before the postfixadmin logo > > The first page load normal but the page list-virtual.php stays empty > (except for the above line) > This is also for almost all other pages like domain overview log > alias overview. > > Thanks again for the work on this project. > regards, > Johan Hendriks > Hi Johan, ok, I tested with short_tags_open = off and I could reproduce the problem. All problems related to short tags are fixed in the latest revision. Regards, Sebastian |
From: reg9009 <re...@ya...> - 2009-11-07 18:36:28
|
Johan Hendriks schrieb: > > > Hello again. > I have updated to revision 761 > > Now i have the following on top of the page : > > '.$val.''; } return $ret_val; } function eval_size ($aSize) { if > ($aSize == 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_unlimited']; > } elseif ($aSize < 0) {$ret_val = $GLOBALS > ['PALANG']['pOverview_disabled']; } else {$ret_val = $aSize; } return > $ret_val; } php?> > > This is before the postfixadmin logo > > The first page load normal but the page list-virtual.php stays empty > (except for the above line) > This is also for almost all other pages like domain overview log > alias overview. > > Thanks again for the work on this project. > regards, > Johan Hendriks > Ok, it seems that your installation is lacking support of short tags in PHP. Could you crosscheck if short_open_tag is set to On in your php.ini file (short_open_tag = On)? In the meantime, I'll fix the rest of the php files... Regards, Sebastian |
From: Johan H. <Jo...@do...> - 2009-11-07 13:11:34
|
>hmm, it seems that it cannot initiate the smarty object (done in >common.php). I'll add some error checks... >Regards, >Sebastian Hello again. I have updated to revision 761 Now i have the following on top of the page : '.$val.''; } return $ret_val; } function eval_size ($aSize) { if ($aSize == 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_unlimited']; } elseif ($aSize < 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_disabled']; } else {$ret_val = $aSize; } return $ret_val; } php?> This is before the postfixadmin logo The first page load normal but the page list-virtual.php stays empty (except for the above line) This is also for almost all other pages like domain overview log alias overview. Thanks again for the work on this project. regards, Johan Hendriks |
From: reg9009 <re...@ya...> - 2009-11-06 18:53:38
|
> No it is an FreeBSD server. > If I place back the old postfixadmin dir all is working fine again. > > This is what I have in my http-error log file > > [Fri Nov 06 18:16:39 2009] [error] [client 192.168.50.201] PHP Notice: > Undefined variable: smarty in /usr/local/www/postfixadmin/login.php on > line 39 > [Fri Nov 06 18:16:39 2009] [error] [client 192.168.50.201] PHP Fatal > error: Call to a member function assign() on a non-object in > /usr/local/www/postfixadmin/login.php on line 39 > > Im am out of the offe till Monday now. > regards, > Johan Hendriks > > > No virus found in this outgoing message. > Checked by AVG - www.avg.com > Version: 8.5.425 / Virus Database: 270.14.52/2483 - Release Date: > 11/05/09 19:52:00 > > hmm, it seems that it cannot initiate the smarty object (done in common.php). I'll add some error checks... Regards, Sebastian |
From: Johan H. <Jo...@do...> - 2009-11-06 17:18:03
|
>> >> Hello all >> >> I did a test of my postfixadmin wuith the latest svn of postfixadmin. >> I get the following error. >> >> >> >> debugging = true; $smarty->template_dir = >> $incpath.'/'.$smarty->template_dir; $smarty->compile_dir = >> $incpath.'/'.$smarty->compile_dir; $smarty->config_dir = >> $incpath.'/'.$smarty->config_dir; $CONF['theme_css'] = >> $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_css']); >> $CONF['theme_logo'] = >> $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_logo']); >> $smarty->assign ('CONF', $CONF); $smarty->assign ('PALANG', $PALANG); >> //*** footer.tpl $smarty->assign ('version', $version); //*** menu.tpl >> $smarty->assign ('boolconf_alias_domain', boolconf('alias_domain')); >> $smarty->assign ('authentication_has_role', array ('global_admin' => >> authentication_has_role ('global-admin'), 'admin' => >> authentication_has_role ('admin'), 'user' => authentication_has_role >> ('user'))); if (authentication_has_role('global-admin')) { $motd_file >> = "motd-admin.txt"; } else { $motd_file = "motd.txt"; } if >> (file_exists ($CONF ['postfix_admin_path'].'/templates/'.$motd_file)) >> $smarty->assign ('motd_file', $motd_file); ?> '.$val.''; } return >> $ret_val; } function eval_size ($aSize) { if ($aSize == 0) {$ret_val = >> $GLOBALS ['PALANG']['pOverview_unlimited']; } elseif ($aSize < 0) >> {$ret_val = $GLOBALS ['PALANG']['pOverview_disabled']; } else >> {$ret_val = $aSize; } return $ret_val; } ?> >> >> Do I need to install something on my server(like smarty) >> >> Regards, >> Johan Hendriks >> >> ------------------------------------------------------------------------ >Hi Johan, > >no special needs, all libraries are included. It seems that your web >server doesn't do the PHP part. Which file is causing the problem? Is >the server running on windows? That could be an explanation. > >Regards, >Sebastian No it is an FreeBSD server. If I place back the old postfixadmin dir all is working fine again. This is what I have in my http-error log file [Fri Nov 06 18:16:39 2009] [error] [client 192.168.50.201] PHP Notice: Undefined variable: smarty in /usr/local/www/postfixadmin/login.php on line 39 [Fri Nov 06 18:16:39 2009] [error] [client 192.168.50.201] PHP Fatal error: Call to a member function assign() on a non-object in /usr/local/www/postfixadmin/login.php on line 39 Im am out of the offe till Monday now. regards, Johan Hendriks No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.425 / Virus Database: 270.14.52/2483 - Release Date: 11/05/09 19:52:00 |
From: reg9009 <re...@ya...> - 2009-11-06 16:40:37
|
Johan Hendriks schrieb: > > Hello all > > I did a test of my postfixadmin wuith the latest svn of postfixadmin. > I get the following error. > > > > debugging = true; $smarty->template_dir = > $incpath.'/'.$smarty->template_dir; $smarty->compile_dir = > $incpath.'/'.$smarty->compile_dir; $smarty->config_dir = > $incpath.'/'.$smarty->config_dir; $CONF['theme_css'] = > $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_css']); > $CONF['theme_logo'] = > $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_logo']); > $smarty->assign ('CONF', $CONF); $smarty->assign ('PALANG', $PALANG); > //*** footer.tpl $smarty->assign ('version', $version); //*** menu.tpl > $smarty->assign ('boolconf_alias_domain', boolconf('alias_domain')); > $smarty->assign ('authentication_has_role', array ('global_admin' => > authentication_has_role ('global-admin'), 'admin' => > authentication_has_role ('admin'), 'user' => authentication_has_role > ('user'))); if (authentication_has_role('global-admin')) { $motd_file > = "motd-admin.txt"; } else { $motd_file = "motd.txt"; } if > (file_exists ($CONF ['postfix_admin_path'].'/templates/'.$motd_file)) > $smarty->assign ('motd_file', $motd_file); ?> '.$val.''; } return > $ret_val; } function eval_size ($aSize) { if ($aSize == 0) {$ret_val = > $GLOBALS ['PALANG']['pOverview_unlimited']; } elseif ($aSize < 0) > {$ret_val = $GLOBALS ['PALANG']['pOverview_disabled']; } else > {$ret_val = $aSize; } return $ret_val; } ?> > > Do I need to install something on my server(like smarty) > > Regards, > Johan Hendriks > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel > Hi Johan, no special needs, all libraries are included. It seems that your web server doesn't do the PHP part. Which file is causing the problem? Is the server running on windows? That could be an explanation. Regards, Sebastian |
From: Johan H. <Jo...@do...> - 2009-11-06 13:30:00
|
Hello all I did a test of my postfixadmin wuith the latest svn of postfixadmin. I get the following error. debugging = true; $smarty->template_dir = $incpath.'/'.$smarty->template_dir; $smarty->compile_dir = $incpath.'/'.$smarty->compile_dir; $smarty->config_dir = $incpath.'/'.$smarty->config_dir; $CONF['theme_css'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_css']); $CONF['theme_logo'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_logo']); $smarty->assign ('CONF', $CONF); $smarty->assign ('PALANG', $PALANG); //*** footer.tpl $smarty->assign ('version', $version); //*** menu.tpl $smarty->assign ('boolconf_alias_domain', boolconf('alias_domain')); $smarty->assign ('authentication_has_role', array ('global_admin' => authentication_has_role ('global-admin'), 'admin' => authentication_has_role ('admin'), 'user' => authentication_has_role ('user'))); if (authentication_has_role('global-admin')) { $motd_file = "motd-admin.txt"; } else { $motd_file = "motd.txt"; } if (file_exists ($CONF ['postfix_admin_path'].'/templates/'.$motd_file)) $smarty->assign ('motd_file', $motd_file); ?> '.$val.''; } return $ret_val; } function eval_size ($aSize) { if ($aSize == 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_unlimited']; } elseif ($aSize < 0) {$ret_val = $GLOBALS ['PALANG']['pOverview_disabled']; } else {$ret_val = $aSize; } return $ret_val; } ?> Do I need to install something on my server(like smarty) Regards, Johan Hendriks |
From: reg9009 <re...@ya...> - 2009-11-05 21:09:10
|
> OK. > > How about.... > > a) setup.php has a check to see whether it exists and is writeable > > or > > b) if templates_c is not writeable, we use e.g. /tmp/? > > (Thanks for merging it) > > David. > Sounds good, will try to improve error handling... Regards, Sebastian |
From: David G. <da...@co...> - 2009-11-05 15:33:13
|
reg9009 wrote : > Hi all, > > I've merged the actual smarty branch into trunk. The branch was > up-to-date with all recent changes made. > > The only important thing is that the directory "/templates_c" needs to > be writable to the web server process, as compiled templates are stored > in this directory. > OK. How about.... a) setup.php has a check to see whether it exists and is writeable or b) if templates_c is not writeable, we use e.g. /tmp/? (Thanks for merging it) David. -- David Goodwin [ david at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ] |
From: reg9009 <re...@ya...> - 2009-11-05 14:56:55
|
Hi all, I've merged the actual smarty branch into trunk. The branch was up-to-date with all recent changes made. The only important thing is that the directory "/templates_c" needs to be writable to the web server process, as compiled templates are stored in this directory. Regards, Sebastian |
From: reg9009 <re...@ya...> - 2009-11-02 18:32:19
|
Christian Boltz schrieb: > > I didn't look too close at the smarty branch yet (will do when it's in > trunk), but I found one issue already: > > Your fetchmail template doesn't exactly match the current fetchmail > template, even if the resulting HTML looks the same. > - the current (PHP) template loops over all fields and prints them using > helper functions (per field type, for example "text input" or > "dropdown list") > - your smarty template contains a more "traditonal" code where each > field is listed separately - at least for displaying the list view. > - for the edit form, you are using PHP-functions to handle the loops > which is already better, but - can this be changed to smarty code? > > The advantage of looping over all fields is that it's very easy to add > additional fields: > 1. add the column to the database > 2. add one line in the $fm_struct array in fetchmail.php > 3. (optional:) add a line to the $fm_defaults array > 4. be happy ;-) > > Ok, I've got your point. I would like to commit the code anyway, and fix that thing afterwards. Maybe we find a neat solution which can be applied to all templates, etc. at once? Regards, Sebastian |
From: reg9009 <re...@ya...> - 2009-11-02 18:25:49
|
> Hi, > > Assuming you want to / are able to - feel free in merging it into trunk :) > > I know cboltz and I have made a few minor changes to trunk since the > 2.3 release, so I guess your branch is slightly out of date in that > respect. > > a bit, but just slightly. I'll get in sync and commit to trunk... > > Is Smarty3 out of beta? > > David. > > hmm, no. But on my private machines I'm brave :) Regards, Sebastian |
From: reg9009 <re...@ya...> - 2009-11-02 18:22:47
|
Christian Boltz schrieb: > Same from me - feel free to merge it into trunk. > > ok, I'll do! ;) > If possible, do a separate commit for the smarty (upstream) code and one > for the postfixadmin-related code. This should result in better readable > commit mails ;-) > > I'll try, but as of smarty, it's just a subfolder within root, so it should be easy to separate. Updates of smarty are easy, just update the subfolder. > I didn't look too close at the smarty branch yet (will do when it's in > trunk), but I found one issue already: > > Your fetchmail template doesn't exactly match the current fetchmail > template, even if the resulting HTML looks the same. > - the current (PHP) template loops over all fields and prints them using > helper functions (per field type, for example "text input" or > "dropdown list") > - your smarty template contains a more "traditonal" code where each > field is listed separately - at least for displaying the list view. > - for the edit form, you are using PHP-functions to handle the loops > which is already better, but - can this be changed to smarty code? > I'll have a look. Usually all is done by smarty. Which edit forms do you mean exactly? > The advantage of looping over all fields is that it's very easy to add > additional fields: > 1. add the column to the database > 2. add one line in the $fm_struct array in fetchmail.php > 3. (optional:) add a line to the $fm_defaults array > 4. be happy ;-) > > It would be good if the smarty template could work the same way, because > I want to change all parts of postfixadmin to use a similar way on the > long term. (We could then even have common templates for _all_ lists and > _all_ edit forms, independent of what to edit or list.) > > It does. Usually, you assign the array to a smarty array variable. If you add another filed into it, just use it in the smarty template. > I think the best solution to do this is to have a template named > "common-edit.tpl" (and one named common-list.tpl). > It should still be possible to handle some fields in a special way. > > The common-edit.tpl could look like this (pseudocode, I still have to > learn smarty): > > if ($table == foo and $fieldname == bar) # special field handling > echo "<td>special field handling</td><td><input type=..."/></td>" > [... more special handling if needed ...] > elseif ($fieldtype == text) > echo "<td>$label</td><td><input type="text" name="$field"/></td>" > elseif ($fieldtype == dropdown) > ... > else # default for unknown field types > echo "<td>$label</td><td><input type="text" name="$field"/></td>" > > You achieved quite the language already, just leave the echo's... Me personally, I would keep the templates separated. I like to have as much logic in the PHP files and just some logic for the displaying part in smarty itself. But you can include template files within template files, e.g. in an if-statement. > This is nothing that blocks the merge to trunk, but please change the > fetchmail template to behave this way. (When this is done, we can change > more parts to use the common-* templates.) > > OK. >> I know cboltz and I have made a few minor changes to trunk since the >> 2.3 release, so I guess your branch is slightly out of date in that >> respect. >> > > My yesterday's commit probably doesn't qualify as "minor change" ;-) > (but it doesn't change too much in the template) > > BTW: your mail address suggests you are living in germany. Where > exactly? (I live in the "Pfalz", in Insheim to be exact.) > > > Yes, good old Frankfurt... And I'm a fan of old (and old school) Riesling, btw. > Regards, > > Christian Boltz > Regards, Sebastian |