Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Events plugin
#26
Didn't think the code page would have an impact on how dates are displayed. My testing is limited to the Windows version of PHP, although that shouldn't make a difference. When I use setlocale, the dates show in the correct language, although since I only know English, testing is more difficult (could resort to an online translation service perhaps).

Would there be a way to force the new events.xml file to be created as UTF-8, as maybe that could be one of the problems.

I've use strtotime as a bit of a hack to get just the date portion without the time and the timezone offset (since it would otherwise fail on days when daylight savings comes into effect). A better way of doing that is needed, but want to do it in a generic way (as I wish to use the calendar class outside of GetSimple as well)

I find dates a bit of a pain to work with, and have more experience in Microsoft.NET C#, where culture formatting is easier (through web.config and the CultureInfo class) and the locale doesn't depend on the OS (though that's only because it is limited to Windows, unless Mono is used).
-- Sam
Reply
#27
Just an update:
PHP files are saved as UTF-8 (with BOM, since for some reason it kept reverting back to ANSI when I edited it) and the original post in this topic has the latest version.

Delete data/other/events.xml if you are having trouble with characters encoding, hopefully that should fix the issue and create a UTF-8 encoded file (alternatively, just open the file and convert to UTF-8). This plugin uses the XMLsave function (if it exists) or asXML (the method built into PHP). The code for saving the XML file is not mine, so if that doesn't work I may have to resort to a 'hack' of some kind (i.e. dummy element with UTF-8 characters in it), but no guarantee that will work either.
-- Sam
Reply
#28
I had similar problems with files saved as ANSI instead of UTFw/oBOM.
Had to restart windows :/
I hope that messing with file encoding will do the job.

But would you have some time to test events plugin with GS 2.04ß and using other language than us_en ?


edit:
in events.v2 under GS 2.04ß I'm unable to choose the date in calendar form, because days doesn't appear as links, but as a normal text.
In 2.03 ckedit's buttons doesn't appear.

In both GS version 2.03 and 2.04 there's still problem with date encoding in native language.
I don't remember what did I do to fix it, but I canceled editing once, and I lost the changes :\
Addons: blue business theme, Online Visitors, Notepad
Reply
#29
I just installed the plugin into a fresh installation of GetSimple (v2.03). Your plugin is displaying dates in the format of: %America/New_York %250 %2010 and I cannot advance the calendar in the to the next month (December 2010). Excellent plugin though.

I hope someone can help me resolve this issue.

Thanks
Reply
#30
Does the navigation work on the admin page, on the content page or neither? Does the month name and the day abbreviations show in the correct language?

The links should contain `?month=12&year=2010` when you navigate to December.
-- Sam
Reply
#31
Yes, the links contain the correct information when you navigate to December, HOWEVER the only way to get to December in the admin menu is by selecting a December date from the November calendar. There is no way to advance the calendar in the admin menu because it says November for the current month and the Next month. Today's date also displays in the same incorrect format.
Reply
#32
Go to line 313 in events.php:
Code:
$events_calendar_date = (int)$event_date;
I am pretty sure that it is here something is going wrong. I tried to change the variable name to something random, and then i can switch between dates, i haven't looked into the consequences of this, but i hope it can help you on the way to make this great plugin better Smile

//Nannerup
Reply
#33
Apothem Wrote:I just installed the plugin into a fresh installation of GetSimple (v2.03). Your plugin is displaying dates in the format of: %America/New_York %250 %2010 and I cannot advance the calendar in the to the next month (December 2010).
It looks like Sam has used both date() and strftime() to produce formatted dates and times, unfortunately the two functions use different format strings and he's mixed them up in a couple of places.
The changes needed are...
Code:
406c406
<                       echo '<p>Go to <a href=&quot;'.$events_base_url.'today&quot;>Today
</a> ('.date('%e %B %Y', $today).')</p>';
---
>                       echo '<p>Go to <a href=&quot;'.$events_base_url.'today&quot;>Today
</a> ('.date('j F Y', $today).')</p>';
568c568
<                       $date_formatted = date('%e %B %Y', $event_date);
---
>                       $date_formatted = date('j F Y', $event_date);
Reply
#34
Has there been a fix to correct the "Next" functionality on the calendar? "Previous" works just fine, but "Next" isn't bring up the next month.
Reply
#35
Hi,
I am using the events pugin ...
I have an events summary in a sidebar which shows a summary i.e. title, date etc. When one of these is clicked the full detail appears in the main page BUT also in the sidebar which, for me, is undesirable.

I have tried hunting through the code and it seems that the call to the full event detail is in called in both places. has anyone tried setting up a separate function that displays on the main page the full detail but not in the sidebar?

I guess this needs a new function to be used in a sidebar only which when clicked loads the full detail in the main page. The function called from the main page (when events are being sumamrised) can then be different again so teh sidebar events are not exapnded ....
Reply
#36
Vulch is correct. I tested this fix and it works...
First correction is on line 406
Second correction is on line 568

Any chance Sam could make these updates and upload the fixed plugin?
Reply
#37
Here is a hack to fix the "next month" problem in the admin calendar view:

Replace Line 497 with this line:
$next_month = WMCalendar::end_of_month($event_date) + WMCalendar:Big GrinAY + WMCalendar:Big GrinAY;

This adds 2 days rather than one. A hack, but it works...
Reply
#38
Hello!

I'm quite new to GS and just build my first page using this fine CMS.

Right now I got a small problem: I installed the Events plugin and after that, when saving a page the data/page is saved but I#m (only) forwaded to the changedata.php and the Browser remains there. If I delete the plugin, everything is fine again.
Checking the Support->Serverstate, events.xml was marked as invalid XML. After removing the encoding-attribute from xml-tag, events.xml was shown as OK, but the error remains: changedata.php is called and the browser remains there.

Any ideas?

Regards,
Ken
Reply
#39
great plugin ! thanks

same problem here (GSv2.03.1) . changedata.php hangs the process ..
regards
Reply
#40
I'm working with this plugin for a new website, but i have a problem to figure out where i can change (day, month, year) in some other language. I have read something about changing the "gsconfig.php" and change there the "set php locale" to your own country. This was not working.

Is the not some other way so that you can change the name of the month so as "February" to "Feb" and if i see the calendar view for a month there is the link a month but can it be a << as link?

I would be nice to have more simple control over this plugin, maybe a nice template for new install people.
Reply
#41
did you check whether you define the date format?

PHP has some different dateformats, so to get "feb" instead of "february" is just a setting for php
maybe the plugin has a setting like that?

see here: http://de.php.net/manual/en/function.date.php
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#42
Connie Wrote:did you check whether you define the date format?

PHP has some different dateformats, so to get "feb" instead of "february" is just a setting for php
maybe the plugin has a setting like that?

see here: http://de.php.net/manual/en/function.date.php

Thanks, i would take a look there!
Reply
#43
It is change from February to Feb i was nog good looking to this, thanks!

I have a few problems left:
  • I want to change the language from english to dutch, swedish or whatever. February must be in the right in the right language
  • And i want to change the calendar view, now it is "Apr « May » Jun" but i want "<< May >>" where the << is the link to the previous month.

I'm looking for day now and i want to make a complete different style than the standard and more in the style of the website.
Reply
#44
I change the code in "event.php":

Code:
$previous_month = WMCalendar::start_of_month($event_date) - WMCalendar::DAY;
    $previous_month_link = '<a href="'.$events_base_url.''.date('F', $previous_month).'&year='.date('Y', $previous_month).'">'.date('M', $previous_month).'</a>';

to

Code:
$previous_month = WMCalendar::start_of_month($event_date) - WMCalendar::DAY;
    $previous_month_link = '<a href="'.$events_base_url.''.date('F', $previous_month).'&year='.date('Y', $previous_month).'">prev<'.date('M', $previous_month).'</a>';

Now you see "prev << April >> next" and can you change it in everything you want to make it more look like wat you want.
Reply
#45
It looks like this page is not compleet showing

http://get-simple.info/extend/plugin/events-v2/55/
Reply
#46
I have changed the "events.php" and "calendar.php" and placed a lot of divs to make a hole new layout for the "event list" and "upcomming list"

Yes it is possible to make it in a hole different layout style, now i have to make only a the overview for one date. I like the plugin but for layout changes it could be simpler.
Reply
#47
Is there somebody who can tell me how i can change "February" to other language? This is the only problem i now have.
Reply
#48
GetSimple2011 Wrote:Is there somebody who can tell me how i can change "February" to other language? This is the only problem i now have.

Either try to set your locale in gsconfig file,
or
look at line 318 in events.php
Code:
$events_calendar_date_formatted = date('j F Y', $events_calendar_date);
and change j F Y to j m Y, which will change full textual representation of a month into a numeric one.
Since there's a lot of variables to show dates, by replacing all F instances in date functions into m may be needed.

I forgot about this plugin, as it never worked satisfactory. Afair with gs 2.0.1 but it was already a history when I started my adventure with GS.
Addons: blue business theme, Online Visitors, Notepad
Reply
#49
I made the changes "us_US" to "nl_NL" or "de_DE" in the gsconfig.php file and it change nothing.

This is the only problem i have with the plugin, i made changes so it can be used for me. I made divs in the event.php and than it was possible to put them where i want.

But thanks for your support.
Reply
#50
SAM,

I ask you really to document the use of your plugin at the extend/Plugin-list
you started to enter some text but did not finish it

people are lost when they want to use your plugin
and the discussion here in the thread is really frightening..

so doubts arise whether this plugin is functionable at all

why no readme.txt in the ZIP????????
that costs no money but saves frustration

in my opinion, this plugin is an example of bad documentation, bad uploading (why 2 versions at the extend list?), missing knowledge about timezones, code pages etc. (The world is more than MacDonalds and USA ;=)

forgive my anger, but I just checked that plugin because there was a frustrated user claiming the missing documentation

EDIT: Sorry for my harsh words, but I was frustrated (as a non anglo-saxon-speaker with a language with umlauts... and fighting against bad codepages etc. since first years in the net, 1993 ... )
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply




Users browsing this thread: 3 Guest(s)