Page 3 of 18
Re: CMSMS 2.0 (say what now?!)
Posted: Mon Jan 22, 2007 10:03 am
by Bobonov
Some more about the news system:
it would be nice, in plus of my previous message, to have the possibility to define more permission level for the news.
In particular to split the inserting of a news from the publication.
i.e. I define a group that can insert the news but can't publish, then there is another group that have the publish "power".
In this way I can let many people inserting an article an then have the possibility to allow only some selected people to check and publish them.
Re: CMSMS 2.0 (say what now?!)
Posted: Mon Jan 22, 2007 10:43 am
by cyberman
Bobonov wrote:
it would be nice, in plus of my previous message, to have the possibility to define more permission level for the news.
Yeah, a Permission Manager would be a nice thing (like Event Manager).
Every module comes with a global permission set, but they can be overwritten by (sub) permissions I can define (for instance a permission for every action I can do with a module).
Re: CMSMS 2.0 (say what now?!)
Posted: Tue Jan 23, 2007 4:43 pm
by Bobonov
Another addiction for the 2.0
Webbing around about PDF classes I found this site:
http://www.digitaljunkies.ca/dompdf/
It is a html to PDF class that support CSS 2.1, I made some test and it seem to work fine.
Maybe alongside the print icon a PDF icon would be very nice...
Re: CMSMS 2.0 (say what now?!)
Posted: Tue Jan 23, 2007 10:12 pm
by Pierre M.
Interesting.
I'd rather have it *instead of* a print icon : the print icon belongs to the browser, not to the content. And the printing layout belongs to the CSS with media=print (in which you put display:none for navigation items, for example).
PM
Re: CMSMS 2.0 (say what now?!)
Posted: Tue Jan 23, 2007 10:41 pm
by Ted
I agree. I have plans on removing the print plugin and possibly must making a simple default print stylesheet instead.
As far as the PDF thing, it's a good piece for a module. If anything, I want to remove libraries from the core, not add more.
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 4:47 am
by cyberman
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 9:15 am
by wientanz
yes, but as CMSMS 2.0 is built for PHP5 that shouldn't be a problem, right?
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 10:23 am
by Ted
wientanz wrote:
yes, but as CMSMS 2.0 is built for PHP5 that shouldn't be a problem, right?
That's what I was thinking...
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 1:12 pm
by MichaelK
I asked my hosting provider for PHP 5.0 but he don't support this before the year 2008. Because the PHP 4.0 scripts don't work with the 5.0 version.
So I CMS 2.0 is released I can't install this great peace of software.
Ted? Is it possible to also make this version work with 4.0? Maybe there's a fix with the install so he checked what kind of version of PHP you have and install the correct one?
Please

Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 1:32 pm
by moorezilla
A lot of hosts allow you to use both php 4 and php5. You might suggest this to your host and see what the tech department says. I keep a couple of vhosts at Site 5, and they use both php4 and php5 at the same time; I haven't had any problems related to it.
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 1:40 pm
by Ted
MichaelK wrote:
Because the PHP 4.0 scripts don't work with the 5.0 version.
This just sounds like someone that doesn't want to deal with it. CMSMS has been developed in with PHP5 since about 0.13 or so and it works fine in PHP4. It will work the other way as well.
Hosting companies should be working for you, not the other way around. My suggestion would be to look for a new host for new sites, and keep the existing 1.0.x sites where they are. *shrug* I went through 5 dedicated servers before I found the one that suited me best... and moving sites is certainly less painful then moving a whole server...
If you can tell from my last few posts, I'm getting frustrated with shared hosting companies. They're causing me a lot of grief lately...
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 2:19 pm
by Bobonov
Try to suggest to your provider to install both php version, by apache is quite easy to use one of the two on virtualhost base.
Anyhow 2.0 version is not going to happen very soon, so maybe they upgrade the system in time
Re: CMSMS 2.0 (say what now?!)
Posted: Wed Jan 24, 2007 3:40 pm
by Bobonov
Some other suggestion for 2.0 version.
CMSMailer Module, should handle mail sending differently. Actually if something goes wrong during sending you have to try again later and sometime is a mess (i.e. in NMS where all the mail are sent in a single action, if it stop there is the posibility to send double mails).
I think at sending time it should append in a db table the message to be sent, and have a separate process that send the message. Once the message is sent it is tagged as sent. In this way you can have also a kind of log of the sent messages and a better control of the situation and there are not double sends.
Here follow the consequence of the above proposal.
Therefore I think it is needed a scheduler that handle these (and other) operations.
The scheduler should be a command line php script that is execute by cron daemon. It should have a db table (like a cron one) with the various action to be executed. In the table there are periodic action (i.e a module that optimize the db once a week or automatic DB backup), and run once action, (i.e. mail sending that should happen only if there are mail in the queue)
In the case of a runonce action it is the process that is executed that decide if the action can be discharged.
i.e. Actually when I send the NMS newsletter it take a lot of time (1880 emails to be sent, and I think is not a big list) and I avoid to touch the computer to prevent in any possible way browser crash or any other problem.
With this email/scheduler system I can just activate the send action and do my work because the server do it independently.
The necessity of a runonce executed more than once is because I do not want the mailer send all the 1880 mail at the same execution, this would take a lot of resource for a lot of time, the idea is to configure the mailer to send a fixed (maybe configurable by the user) amount of emails. So the runonce process is executed again and again until the queue is empty and then the process "decide" to remove its runonce.
So the concept is to have "schedule.php" called by cron (each 5 minute should be fine) and then it execute at first the runonce process (probably they have an higher priority on normal schedule), and when there are no runonce, periodical process are executed.
I know that not all the people have the possibility to setup a cron process, but probably in these cases should be easy to create an interface to execute the scheduled process by hand and/or add a module configuration option like "Use Scheduler"
Some possible utilisation of the scheduler:
- schedule mail sending
- schedule NMS sending (I prepare the newsletter and it send two week later when I am in vacation)
- schedule db backup and optimisation in the night at low traffic time
- calendar module can send reminders for events
Re: CMSMS 2.0 (say what now?!)
Posted: Thu Jan 25, 2007 12:17 pm
by Ted
The cron is a neat idea, but beyond the scope of what we're trying to do. Most people don't know what cron even is, let alone have access to set it up.
However, I could see a possibility to have a scheduler of sorts that works off of page views. Scheduled events go into a queue of sorts and every page view runs a method that checks to see if any of those events should be run. If so, then it runs that event along with a regular page rendering and sets that event as being run.
On busy sites, it would be almost instantaneous that scheduled events get run at the right time. On really slow sites.... not so much. *shrug*
Re: CMSMS 2.0 (say what now?!)
Posted: Thu Jan 25, 2007 12:55 pm
by Bobonov
This is another possibility, but keep in mind also that sending 50 emails take some time and this would slow down a lot the loading time of the page, and the good execution of the script is tied to the user that does not press the stop button on the browser.
I dunno if it is possible within a php script to split the execution of another script and have it run independently from the original script. I never had this necessity therefore I never done any search in this direction.
Maybe is possible to run something at command line and have the script going on without waiting for the result.
In this way each time a page is loaded you can run the scheduler at command line without interfering with the execution of the web page script.
I would take anyhow in consideration the possibility to run it by a cron job, surely not all people has server access but some have it and can setup it and surely it is the best solution.
If you have server access, setting up a cron job can be done in few easy steps (with an CMS installation howto).
Just edit the crontab and paste the suggestion in the installation manual.
Something like this:
To use the scheduler you need the cgi version of php installed. This php version works alongside with the module version and is needed in order to execute php script at console command line.
To verify if you have the php-cgi installed, just open the console and type php.
To setup the automatic execution of the scheduler just follow these steps:
Under Linux/Unix system
access your server as root
type "crontab -e", this open the crontab in vi, it is the default editor
go to the last line
press the [INS] button and eventually press [enter] to create an empty line
type or copy and paste the following line:
* * * * * cd /path/to/CMSmadesimple/module/scheduler/; /usr/bin/php -q process_schedule_action.php
press [ESC] and type ":wq" to save and exit
For windows machine is even simple, there is a graphical interface for the at command.