[New Plugin] "News"
Moderator: Tata
[New Plugin] "News"
Hi all,
the past few weeks I worked on a new CMSimple plugin for managing and publishing news. Some of the features:
- Publish news in different categories.
- Call news of one or more categories on your pages.
- JQuery based newsticker.
See the documentation for getting started and installation instructions. Feedback is welcome!
Sourceforge project: http://sourceforge.net/projects/cmsimplenews/
regards,
David
the past few weeks I worked on a new CMSimple plugin for managing and publishing news. Some of the features:
- Publish news in different categories.
- Call news of one or more categories on your pages.
- JQuery based newsticker.
See the documentation for getting started and installation instructions. Feedback is welcome!
Sourceforge project: http://sourceforge.net/projects/cmsimplenews/
regards,
David
Re: [New Plugin] "News"
Hi David,
a very nice and useful plugin!
You should consider to use jQuery4CMSimple to avoid possible clashes with other CMSimple plugins using jquery. Developer documentation on how to use it, is included in the download.
An idea: it might be useful to be able to call newsticker() from the template.
Christoph
a very nice and useful plugin!
You should consider to use jQuery4CMSimple to avoid possible clashes with other CMSimple plugins using jquery. Developer documentation on how to use it, is included in the download.
An idea: it might be useful to be able to call newsticker() from the template.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: [New Plugin] "News"
Hi Christoph,
Not thought about that before, will update the plugin with JQuery4CMSimple compability.
Is there a trick enabling the plugins functionality for use in templates? Currently the scripts are not included correctly when I call plugins in the template.
David
Not thought about that before, will update the plugin with JQuery4CMSimple compability.
Is there a trick enabling the plugins functionality for use in templates? Currently the scripts are not included correctly when I call plugins in the template.
David
Re: [New Plugin] "News"
Hi David,
The solution is simple: just write to $hjs always by doing it in the global scope of index.php (or calling a function from the global scope). As this will cause some overhead even if the plugin is not called from the template, you can add a config option (say, enable_myplugin).
For my latest plugin I required the user to put an additional function call into the template before head() is called, so that the plugin works. As I see it now, that's nonsense A config option has exactly the same effect, but could be handled more easily.
Well, there's another approach to solve the problem, without any config option or additional function: scanning the template for the plugin call. But I doubt, that the advantage of this automatic approach will rectify its overhead.
Christoph
The problem is, that typically scripts are written to $hjs. But this will already be emitted in the <head> section of the template. So for any plugin call that happens later, $hjs will be ignored.Phrax wrote:Currently the scripts are not included correctly when I call plugins in the template.
The solution is simple: just write to $hjs always by doing it in the global scope of index.php (or calling a function from the global scope). As this will cause some overhead even if the plugin is not called from the template, you can add a config option (say, enable_myplugin).
For my latest plugin I required the user to put an additional function call into the template before head() is called, so that the plugin works. As I see it now, that's nonsense A config option has exactly the same effect, but could be handled more easily.
Well, there's another approach to solve the problem, without any config option or additional function: scanning the template for the plugin call. But I doubt, that the advantage of this automatic approach will rectify its overhead.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: [New Plugin] "News"
Hi Christoph,
Thanks for the advice, I think I would prefer the config option solution. I will see if I get it working that way
regards,
David
Thanks for the advice, I think I would prefer the config option solution. I will see if I get it working that way
regards,
David
Re: [New Plugin] "News"
Hai Phrax....
That's a wonderful plugin 2 thumbs for your job....
I just installed on my cmsimple_xh, running good on my localhost but after I tried to installed on my hosting I found a little problem.
When I added image or link text and save it, the result never show correctly , an image url or link text always include enclosure csv like \"./images/some-image.jpg\" that bring on my image or link text never show correctly.
Could you help me how to fix it?
regards,
avangers
That's a wonderful plugin 2 thumbs for your job....
I just installed on my cmsimple_xh, running good on my localhost but after I tried to installed on my hosting I found a little problem.
When I added image or link text and save it, the result never show correctly , an image url or link text always include enclosure csv like \"./images/some-image.jpg\" that bring on my image or link text never show correctly.
Could you help me how to fix it?
regards,
avangers
Re: [New Plugin] "News"
Hi avangers,
is magic_quotes_runtime enabled on the server? If so, you have to turn it off, as it might cause more such problems (with other plugins and even the core).
Christoph
is magic_quotes_runtime enabled on the server? If so, you have to turn it off, as it might cause more such problems (with other plugins and even the core).
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: [New Plugin] "News"
Hi Christoph
Thank You for your advice....
I have tried to setting off magic_quotes_runtime and my problem solved...
Add Code in .htaccess
Best Regards
Avangers
Thank You for your advice....
I have tried to setting off magic_quotes_runtime and my problem solved...
Add Code in .htaccess
Code: Select all
# Disable magic_quotes_gpc
php_flag magic_quotes_gpc off
Avangers
Re: [New Plugin] "News"
Hi Avengers, hi David,
ah, it was magic_quotes_gpc! That's not the same as magic_quotes_runtime. I guess no CMSimple component will run cleanly with the latter enabled, but the former can be handled easily by calling stripslashes() on all GPC parameters. There's even a function provided in CMSimple that does this only when magic_quotes_gpc is on: stsl().
But anyway: IMHO the magic_quotes_* ini settings were no good idea in the first place and forunately they have been deprecated in PHP 5.3 and already have been removed in PHP 5.4.
Christoph
ah, it was magic_quotes_gpc! That's not the same as magic_quotes_runtime. I guess no CMSimple component will run cleanly with the latter enabled, but the former can be handled easily by calling stripslashes() on all GPC parameters. There's even a function provided in CMSimple that does this only when magic_quotes_gpc is on: stsl().
But anyway: IMHO the magic_quotes_* ini settings were no good idea in the first place and forunately they have been deprecated in PHP 5.3 and already have been removed in PHP 5.4.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: [New Plugin] "News"
Hi Avengers, Hi CHristoph,
sorry for the late reply on your problem, Avengers...
I did not understand the whole problem, so just to be up to date, are there some mistakes in the code or is it just about PHP/Server configuration?
Regards,
David
sorry for the late reply on your problem, Avengers...
I did not understand the whole problem, so just to be up to date, are there some mistakes in the code or is it just about PHP/Server configuration?
Regards,
David