new event calendar plugin

Creating and modifying plugins.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

new event calendar plugin

Post by Timbalu »

Frontend-Features::serendipity_event_cal

Be happy with a fully template based s9y/mysql public event calendar plugin.

Features:
- monthly & weekly (cw) view
- embedded event_form, approve and single_entry table views
- choose between single-day, multi-days and recuring events (monthly or weekly)
- public access to insert new events, to be approved by logged-in Serendipity user
- qualified user access to edit or erase events via unapproved or inside single entry table view

Please, read the Readme first.

Ian
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

Where can the plugin be downloaded Ian?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

DOH! Didn't bother to see if you had already checked it in.
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

Ian - excellent initial effort... I am willing to spend a bit of time testing for you.

There will be a number of HTML and css issues as you refine the code, but may I suggest you run each of your pages through a validator and fix the errors it reports?

Here are a few comments based on your documentation:
* Be shure to copy ./img folder and all the .tpl files to your template/default directory!!!
* Do the same with the file style_eventcal_backend.css!!!
User should not have to do this. Other plugins have tpl files, images, etc... Users should not have to manually copy tpls from the plugin to anywhere. They should be fetched first from the current template folder, and if they do not exist, then from the plugin itself. Additionally, your plugin includes two images whose filenames already exist in /templates/default/img/: delete.png and blank.png. The delete images are not the same. In fact, I'll bet s9y already has icons in templates/default/admin/img/ that would be suitable so you would not need to ship the plugin with any icons, unless you prefer your graphically over s9y's icon pack.
* Copy the file: modifier.close_tags.php to s9y/bundled-libs/Smarty/libs/plugins!! - This modifier is used, when a qualified serendipity user changes or writes an event with BBCode in the long description field. This will do noisy html when we use the modifier truncate in the app table for unapproved events only.
I'm not entirely sure what this is, but again, I am not comfortable with a plugin asking a user to place a file in a core folder. Why is this plugin trying to handle BBCode in a description field?
* Install and see if table eventcal is installed. If not, do it manually (see bottom line and do not forget to change the prefix to your usual ones).
I tried it on two different test servers. The table was not created in either one. One attempt was installed via spartacus, the other was installed by downloading the zip file and extracting. I think this needs to be fixed as not all users have access to phpMyAdmin through their hosting providers and will be unable to follow your instructions for manually creating the table.
* Fill in event values. You can choose between single days, muli-days, recuring events (monthly or weekly).
I was unable to create any event entries - clicking "Insert entries" takes me back to my front page.
* IMHO there is no need for Capchas, while these bots are stupid. if that ever changes, tell me.
Consider yourself told. :wink: I People & bots will abuse something like this every chance they get. Incorporating captchas into a form should be easily achieved through one of the other examples... maybe the contact form or suggest entry plugin would be a good place to look.

A few other quick observations:

The permalink path did not detect URL rewriting as off or on... nor did it detect the serendipity install folder... for instance, one of my sandboxes deliberately does NOT use URL rewriting, and exists in a folder called "sandbox". The plugin defaulted the permalink to "pages/eventcal.html" when it should have defaulted to "sandbox/index.php?/pages/eventcal.html". I'm sure there is a simple variable holding the rewrite path, just as there is in smarty ({$serendipityRewritePrefix}), I just do not know what it is.

I see you emitting the table at a specified width, but then override that width with css. I do not think you should be emitting a width of anything other than 100%. Again, I did not spend much time examining the html and css due to the numerous validator errors. Besides, way too early for that kind of fine tuning.

That is all I have for now. Keep up the great work!
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

Hi Bughunter Don
Thank you for you time....

You are right, I missed to switch back to disable mod_rewrite and have a deep look to what will happen. I got back to work!
The db install table had some errors in last minute, which s9y couldn't manage, I'm sorry.
The permalink just needed a global $serendipity....
About the missing Captchas I just remembered this plugin, which I had in public use over one year and never experienced problems with spam in this special case. But I will think about it again.
Finetuning html and css is in work, satisfying the w3 validator seems hard ;-).
About the needed smarty modifier, I would appreciate a solution without using the core folder!

I'll switch back when its done!

Ian
Last edited by Timbalu on Fri Nov 13, 2009 11:05 am, edited 1 time in total.
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

I look forward to your continued progress. I do not envy you on the validation issues - there are a lot of them. I think HTML improvements are also going to be time consuming.... tables within tables within tables within.... :lol:
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

Well, I did change some settings. Please have a test Don.
I zipped it to your PN.

Ian
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

Looks like you have eliminated most validation errors... there are still a few, but I am sure you will track those down over time.

I think your next objective should be to make the tpls work like other plugins, which is they are loaded from the currently selected template if they exist there, or directly from the plugin's folder. Users should not have to copy files to /templates/default/.

The other thing is the file modifier.close_tags.php... I do not think it is a good idea to require a user to manually copy this file to a core folder. Is it absolutely necessary?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

Hi Don

There is no need to put the tpls anywhere else anymore, I am sorry this wasn't clear. Just the image files have to be copied, while I am using {serendipity_getFile file="img/blank.png"} inside the templates to fetch them.

The modifier is necessary, while it depends on the smarty truncate modifier. As I said, if there is another solution to use a pluginsite smarty modifier without copy it to core, I would appreciate, but I have no idea for this by now.

Good to hear the rest is working, so I can send it to Garvin.

Thank you Don,
Ian
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

Maybe instead of serendipty_getFile you could use src="{$serendipityHTTPPath}plugins/serendipity_event_cal/img/blank.png" ?? I cannot think of a plugin that is smartified and ships with its own images... perhaps Garvin has a better suggestion if mine is not the best approach.

Also look at your files and make sure they conform to this: http://www.s9y.org/217.html.

And you still have the issue with modifier.close_tags.php.
=Don=
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Re: new event calendar plugin

Post by robert »

I´m looking forward to a new version without copying files :)

Keep up the work and THANKs.

Could it be possible to implement an ical feed in a further version?
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

The new version 1.3 will hopefully be commited soon.
No need to copy files anymore, if someone isn't comfortable with it.

@Robert
robert wrote:Could it be possible to implement an ical feed in a further version?
Hi Robert
Maybe....., schreib mir mal ne PN, was du da genau beabsichtigst.

Ian
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: new event calendar plugin

Post by Don Chambers »

Timbalu wrote:No need to copy files anymore, if someone isn't comfortable with it.
Do you have another zip file update?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new event calendar plugin

Post by Timbalu »

via spartacus tomorrow evening will be ok?
Post Reply