Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Events plugin
#76
Some of the issues may be related to when the events_preload() fires. In the root directory (i.e. end user) it is before the HTML is output (and also before the time zone is set), using the hook index-pretemplate. In the admin control panel, it is after the main <head> content is loaded. This is because the admin panel lacks an index-pretemplate hook, so the header hook had to be used - this hook is only in the admin control panel, but this is desirable since it loads CSS and JavaScript only relevant to administrators.
-- Sam
Reply
#77
I for one would be superhappy if this would be completed and working. Seemed to be a really good beginning. And is just what i would need.
Reply
#78
Hi,

I don't know the progress of the plugin, but I wasn't able to get it working properly.
I was wondering, maybe you could use this script: http://www.hotscripts.com/listing/basic-...ts-lister/ to create a plugin? I am not into php and it's just a suggestion, but I would like to see this plugin work.
Reply
#79
Apologies for the bugginess of this plugin, I think something changed between 2.3 and 3 (I was OK till I upgraded).

I would appreciate any patches via GitHub, since I am struggling to resolve the cause of the time zone issues.
https://github.com/SamWM/get-simple-plug...ter/events

Probably missing something obvious, but no matter how many times I look at it can't see where the problem is (changed all occurrences of gmdate to date, gmmktime to mktime and vice-versa)
-- Sam
Reply
#80
Connie Wrote:I just downloaded the events plugin from the extend, uploaded it to my working GS 3-version and after that I could not log in in GS

I tested with 2 installations, both times I could not login
when I deleted the plugin files from the server I could login again

what is this?
Same here... this bug is really annoying... I have do remove events.php and add it again when logged in.

And the second thing is that when i create an event in admin panel it's displayed in front-end exactly one day earlier. I think there's still some issues with the timezone.

Most of the other Bugs seem to be vanished, nice plug-in....

But this plug-in thing, any suggetions? I read the code and can't find anything by myself.
Reply
#81
Lebowski Wrote:
Connie Wrote:I just downloaded the events plugin from the extend, uploaded it to my working GS 3-version and after that I could not log in in GS

I tested with 2 installations, both times I could not login
when I deleted the plugin files from the server I could login again

what is this?
Same here... this bug is really annoying... I have do remove events.php and add it again when logged in.

And the second thing is that when i create an event in admin panel it's displayed in front-end exactly one day earlier. I think there's still some issues with the timezone.

Most of the other Bugs seem to be vanished, nice plug-in....

But this plug-in thing, any suggetions? I read the code and can't find anything by myself.

same here... Great plugin! but...
can't login after installing events plugin. when deleting events.php i can login again.

please help!

I don't know if this has something to do with it but in debug mode i get this warning:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mywebsite.com/httpdocs/getsimple/plugins/php-helper/calendar.php:1) in /var/www/vhosts/mywebsite.com/httpdocs/getsimple/admin/inc/cookie_functions.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mywebsite.com/httpdocs/getsimple/plugins/php-helper/calendar.php:1) in /var/www/vhosts/mywebsite.com/httpdocs/getsimple/admin/inc/login_functions.php on line 81
Error: Headers already sent in /var/www/vhosts/mywebsite.com/httpdocs/getsimple/plugins/php-helper/calendar.php on line 1 If your browser does not redirect you, click here
Reply
#82
jarno1982 Wrote:I don't know if this has something to do with it but in debug mode i get this warning:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mywebsite.com/httpdocs/getsimple/plugins/php-helper/calendar.php:1) in /var/www/vhosts/mywebsite.com/httpdocs/getsimple/admin/inc/cookie_functions.php on line 30
And if you look at line 1 of php-helper/calendar.php you'll see a UTF-8 BOM marker or similar. Delete the first 3 characters on the line leaving [bold]only[/bold] the <?php and that should be sorted. You may need to use a decent text editor to get at it as some "helpfully" hide the garbage characters.

Anthony
Reply
#83
Well, thank you very much! That works now.
Now I've got another problem. The moment i add a photo (that is uploaded to the server) to a page i get a transparent white layer over my screen and i can't do anything but hit the 'previous' button of my webbrowser.
so adding pictures doesn't work anymore.
When i remove events.php from my server everything works fine again...

Someone?
Reply
#84
somebody? please help me out!
Reply
#85
To be honest,
Problem with encoding in month name it's not really a problem.
everywhere where i find 'strftime', I'm put:

Code:
iconv("ISO-8859-2","UTF-8",ucfirst(strftime($format,$timestamp)))

But i didn't yet get a proper working timezones. All my events are 1 day early than it should be.

But still working!
Reply
#86
has anyone considered how to get this to work with google calendars?
Reply
#87
Many Thanks for the update today on this Sam - have been testing with GS v3 on localhost and all working as it should Wink
Reply
#88
grs84pl Wrote:To be honest,
Problem with encoding in month name it's not really a problem.
everywhere where i find 'strftime', I'm put:

Code:
iconv("ISO-8859-2","UTF-8",ucfirst(strftime($format,$timestamp)))

But i didn't yet get a proper working timezones. All my events are 1 day early than it should be.

But still working!

I've just realized than there's no need for me to change any strftime occurence to the code above.
Setting
Code:
setlocale(LC_ALL, 'pl_PL.UTF8','pl.UTF8','pl_PL','pl');
in GSCONFIG.PHP (Polish laguage which gave me cp ISO-8859-2 before) seems to be enough to solve the problem.

There's another with the use of utf8_encode() PHP function used while the event content saving.
As written on php.net function description:
Quote:Please note that utf8_encode only converts a string encoded in ISO-8859-1 to UTF-8. A more appropriate name for it would be "iso88591_to_utf8". If your text is not encoded in ISO-8859-1, you do not need this function. If your text is already in UTF-8, you do not need this function. In fact, applying this function to text that is not encoded in ISO-8859-1 will most likely simply garble that text.
So when I'm using Polish language and got ISO-8859-2 or UTF-8 encoding out of the New Event form - utf8_encode() completely garble it before saving to XML file.
The same is happening when outputting calendar month names.

Anyway I still do have issue the event added on 8 Sep is showed properly in calendar (8 Sep) and in Event Edit Form in Admin Panel, but as an output from upcoming_events(null, null); function appears the day before its real schedule (7 Sep).

EDIT: I have quickly experiment with different setlocale parameters (for Polish language) and there are results:
  • pl_PL.UTF8 - correct (Polish) month names with correct encoding
  • pl_PL - correct (Polish) month names with incorrect encoding (ISO-8859-2)
  • pl.UTF8 - incorrect (English) month names - no idea about encoding
  • pl - as just above

BTW: As I understand definitions - 'pl' (or maybe 'pl.UTF8') code should be enough for specifying Polish locale, but it isn't. I don't know why. Reading different decriptions of ISO, RFC and so on I wonder why setlocale doesn't work with "canonical" code 'pl-PL' but works with "non-canonical" code 'pl_PL'.
Reply
#89
For anyone that is having an issue with time zones and having to add events a day before/after to show them, there is a fix, although it can't be applied to the plugin - GetSimple has to be tweaked (so would need to be done again if you apply an update (e.g. 3.1) to it).

Go to admin/inc/common.php. Find all occurrences of
Code:
$TIMEZONE = 'America/New_York'
Replace America/New_York with your appropriate time zone.
Code:
$TIMEZONE = 'Europe/London'
-- Sam
Reply
#90
Nice plugin and very helpful to, just got the problem of the sidebar snippets opening up to full text view and the main page shooting up to the start of the details of the event, instead of drawing the full page from the top down?

See www.55002koyli.com/newsite and click on the sidebar events listed there.
Pete

Chefbyte Services
Reply
#91
I had problem with czech lanfuage. I placed this code "setlocale(LC_ALL, 'cs_CZ.utf8');"
at line 107 of events.php

-----------------------------------------
// set to midnight
setlocale(LC_ALL, 'cs_CZ.utf8');
$events_calendar_date = mktime(0, 0, 0, date('n', $events_calendar_date), date('j', $events_calendar_date), date('Y', $events_calendar_date));
------------------------------------------

and deleted "utf8_encode" at line about 565:

return utf8_encode('<span class="previousmonth">'.$previous_month_link.'</span> <span class="currentmonth">'.strftime('%B %Y', $event_date).'</span> <span class="nextmonth">'.$next_month_link.'</span>');

and names month names are correctly in Czech lang.





maxpop Wrote:Not working ;(...

Thx anyway, i like the plugins Smile.


SamWM Wrote:Since it just uses php's `date` method, it should hopefully work if you set the locale in the gsconfig.php file (at the bottom). e.g.
Code:
setlocale(LC_ALL, 'sv_SE');
You would probably want to set the timezone in GetSimple as well (if you have not already).

maxpop Wrote:thx....

Working...

How do i use other languages like swedish?
So july is showing as Juli..
Reply
#92
Anyone else experienced problems with deleting or editing a posted event? i seem to be able to edit just the same day i posted it. But later on if i go back to that date and want to edit or change so i am not able to get that event again. should popup in the menu right? but it doesnt.
Reply
#93
I found and fixed one bug in events.php where there was a typo on the day variable.
Do a find/replace for '%#d' replace with '%d' which fixes bug with the rendering of day and assignments of day to $events_calendar_date_display and $date_formatted.

At this time I am still experiencing the following:
  • Need to adjust the width of previous/current/next calendar link to fit within sidebar width
  • Unable to insert <?php echo events_list() ?> into page template, gets commented out on save
  • Event is saved 1 day prior to actual date selected (could this be a 0 index bug in days array?)
  • Placing <?php echo events_list() ?> in the sidebar renders the event list. Clicking on event results in correct path, however day is incorrect due to day off by 1 bug

So, to sum, I believe there are 2 issues: Day off by 1, and Event List rendering in template.
Also, what is the purpose of file-info.php? I see it on github yet it is not included in the download package.

I'll let you know if I come up with anything on the day off by 1 issue. Hope you will give this a bit more active dev, we're all busy, I know, and thanks for what you've got going here - its a great start and you are very close to a stable release.
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." __Paul Atreides
Reply
#94
Here are fixes to some of the items I posted:
Quote:
  • Unable to insert <?php echo events_list() ?> into page template, gets commented out on save
This was my issue for trying to insert the php code into the page editor. Rather, place the php in the template.php file. This posed a problem with working the event content into my page layout and also showing up on all pages. In order to work around this I did the following:
Code:
<?php if ( $_GET["id"] === "events" ) {
        echo events_list();
        }; ?>
I then removed all of the common elements from pages and placed them in template.php where they belong.
Quote:
  • Event is saved 1 day prior to actual date selected (could this be a 0 index bug in days array?)
In order to get the calendar dates to line up correctly with days of month I needed to change the day counter variable initialized value to 0. Line 139 calendar.php:
Code:
$day_counter = 0;
Quote:
The addition of echo events_list() above fixed the rendering issue. I have not yet fixed that actual date that is linked to event in calendar yet. The calendar component is still linking one day off (e.g. 10th when it should be 11th).
Quote:
  • Placing <?php echo events_list() ?> in the sidebar renders the event list. Clicking on event results in correct path, however day is incorrect due to day off by 1 bug
This was fixed by initializing the day_counter variable to 0.
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." __Paul Atreides
Reply
#95
I've written a patch that addresses issues with incorrect rendering of calendar dates and incorrect assignments of dates to events. This patch fixes an issue caused by dependency on locale time rather than calculations on Greenwich Meantime.
Patch results: Correct rendering of days of week, Correct rendering of dates of week, Correct rendering of event date links, Correct arguments provided to URL path.
Included folders and files in .zip:
events.php
php-helper>calendar.php
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." __Paul Atreides
Reply
#96
These issues are fixed in my patch provided in forum post: http://get-simple.info/forum/post/19489/#p19489
Quote:
  • Event is saved 1 day prior to actual date selected (could this be a 0 index bug in days array?)
This ended up not solving the issue that is fixed in patch.
Quote:In order to get the calendar dates to line up correctly with days of month I needed to change the day counter variable initialized value to 0. Line 139 calendar.php:
Code:
$day_counter = 0;
Fixed in patch
Quote:
Fixed in patch
Quote:The addition of echo events_list() above fixed the rendering issue. I have not yet fixed that actual date that is linked to event in calendar yet. The calendar component is still linking one day off (e.g. 10th when it should be 11th).
Fixed in patch
Quote:
  • Placing <?php echo events_list() ?> in the sidebar renders the event list. Clicking on event results in correct path, however day is incorrect due to day off by 1 bug
Day counter returned to 0 in patch
Quote:This was fixed by initializing the day_counter variable to 0.
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." __Paul Atreides
Reply
#97
Hey guys... has anyone in the US been able to successfully change the dates to MM/DD/YYYY or Month Date, Year across this plugin? I've tried to update everything I can find accordingly, but nothing seems to work. The rest of the dates across GS are diplaying the way I'd like, just not inside this plugin.
Reply
#98
patriotmedia Wrote:Hey guys... has anyone in the US been able to successfully change the dates to MM/DD/YYYY or Month Date, Year across this plugin?

see PHP: date - Manual http://php.net/manual/en/function.date.php for format characters.

For example, the following line 638 in events.php:
Code:
$date_formatted = gmstrftime('%d %B %Y', $event_date);
Can be modified to:
Code:
$date_formatted = gmstrftime('%m/%d/%Y', $event_date);
Which will render in MM/DD/YYYY format (e.g. 11/12/2011) in the event list. You would use '%y' (lower case) to represent a 2 digit year format to render MM/DD/YY.
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." __Paul Atreides
Reply
#99
Hi,

I installed ur awesome plugin, to finish my page over all.
I adapted ur plugin into my main language german and it's a great feature.

After I had finished the admin panel, i come to the front page. I tried to edit the sidebar, but the problem is, can't changing the sidebar as I want.

So, my question is, how can I change the sidebar, to have the following output:

Date / Title,
e.g. 23.12.2012 Singing in the church

I don't want to have single lists of dates, but lists of single events.
I give you an example:

- 23.12.2011 Name of event 1
- 05.01.2012 Name of ...
- 08.03.2012 Name of ...
- ...

You understand?
How can I do this?

See also http://weforg.de/cms/ on the right side of the page.
Reply
I would like to second this post.
http://get-simple.info/forum/post/18642/#p18642
linden Wrote:Anyone else experienced problems with deleting or editing a posted event? i seem to be able to edit just the same day i posted it. But later on if i go back to that date and want to edit or change so i am not able to get that event again. should popup in the menu right? but it doesnt.
I too have this problem and am going to look at it, but would love any direction or ideas around what the issue may be.

Thanks for the plugin Sam!
Reply




Users browsing this thread: 2 Guest(s)