GetSimple Support Forum

Full Version: Events plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Hi all,

I've created an events plugin people may find useful. Source can be found on GitHub - SamWM/get-simple-plugins. Attached plugin code in zip file.

Usage:
Show events on page by editing the template and adding the following:
Code:
<?php echo events_list() ?>

Show the calendar (for navigation):
Code:
<?php echo events_calendar() ?>

Show upcoming events (e.g. in the sidebar):
Code:
<?php echo '<h2>Upcoming events</h2><div class="feature">'.upcoming_events($SITEURL.'events/', 'strong').'</div>' ?>

`upcoming_events` has three arguments: $base_url, $date_heading_tag, $limit
$base_url is the page the the links are on. $date_heading_tag is the tag to wrap the date in. $limit is how many events to show (default is set to three)

Update:
Uploaded zip file with latest version. Rather than add new replies, I will update the attachment on this post instead. The latest 'stable' version can be found on the 'Extend' part of the GetSimple website.
Update 2:
New version for testing. Changes will hopefully fix issues such as missing events and navigation to the next/previous month. Apologies for delay in updating this plugin.
Update 3:
Done a few more fixes and changes (ability to set the text for previous / next month navigation) for testing, will update the GetSimple Extend Repository if there are no problems with this update.
Update 4:
New test release, hopefully will work as it should in GetSimple 3, regardless of time zone
Breaking my site....

Nothing is showing up when this plugin is installed

Could u make a
Yes, I'm getting the same thing. When installed, nothing on the site will come up. Just get a blank page.
I am currently running Get-Simple v2.02

I am not 100% done testing but I have fixed the issue with the blank page after plugin upload.

I will attach my updated version here.

Creator please feel free to implement my updates and remove all credits I have added to this version. (I went ahead and made it
version 1.0.2)
thx....

Working...

How do i use other languages like swedish?
So july is showing as Juli..




OWS_Matthew Wrote:I am currently running Get-Simple v2.02

I am not 100% done testing but I have fixed the issue with the blank page after plugin upload.

I will attach my updated version here.

Creator please feel free to implement my updates and remove all credits I have added to this version. (I went ahead and made it
version 1.0.2)
I had code like that originally, but found that it was trying to include `admin/php-helper/calender.php` rather than `plugins/php-helper/calendar.php`. Perhaps a Windows issue (tested it on XAMPP and IIS 7 on Windows 2008). Although I have now changed it to use require_once and it works...

OWS_Matthew Wrote:I am currently running Get-Simple v2.02

I am not 100% done testing but I have fixed the issue with the blank page after plugin upload.

I will attach my updated version here.

Creator please feel free to implement my updates and remove all credits I have added to this version. (I went ahead and made it
version 1.0.2)
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..
everything works fine. Is it possible to do something normal editor to insert images?
something with the encoding when opening events
Just put the fix for windows servers in your read me.

There may be a way to detect the type of server and if its windows use one include and if not use the default include.

Oleg06 are you wanted ckeditor implemented?
OWS_Matthew Wrote:Just put the fix for windows servers in your read me.

There may be a way to detect the type of server and if its windows use one include and if not use the default include.

Oleg06 are you wanted ckeditor implemented?
Yes, ckeditor
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..
SamWM Wrote:New version attached, rich text enabled.
For some reason the text looks at both
Is the text encoded properly in the XML file (data/other/events.xml)? Not really tested it in other languages, just English.
Oleg06 Wrote:
SamWM Wrote:New version attached, rich text enabled.
For some reason the text looks at both
encoding utf = 8
Why are you silent, you will finish this most useful plugin?
Sorry, not been able to spend much time on this recently. Trying to figure out what the problem is, since it is based on code already used by GetSimple. If you open the events.xml in notepad (or whichever text editor you use) is it the same as what you see on the page, or correctly encoded?
Hi,
I have the events plugin running on a box with PHP 5.1.5 and libxml 2.6.16. The contents of the event are not being displayed (the call to xpath in the function to display the event details is returning an empty array). I've read elsewhere re a problem between versions of PHP and libxml. Can anyone advise on whether upgrading the libxml might fix the problem? I do not have direct admin access to the server and the admin would rather not upgrade the PHP.
Many thanks
and the Russian language in general does not understand
[Image: 2.gif]
shumphreys Wrote:Hi,
I have the events plugin running on a box with PHP 5.1.5 and libxml 2.6.16. The contents of the event are not being displayed (the call to xpath in the function to display the event details is returning an empty array). I've read elsewhere re a problem between versions of PHP and libxml. Can anyone advise on whether upgrading the libxml might fix the problem? I do not have direct admin access to the server and the admin would rather not upgrade the PHP.
Many thanks

Admin has updated the PHP version - hurray!

Now, a further minor issue. 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 taht displays on teh main page teh full dteail but not in the sidebar?
Cheers
Hi all,

Done another update, but might need further testing.

Calender should hopefully show the month name in the appropriate locale (rather than English). Using `setlocale` in the `gsconfig.php` file.

I have also encoded the text before it is saved (using `utf8_encode`), so hopefully there should be no problems with non-latin languages (i.e. cyrillic).

--Sam
Oleg06 Wrote:http://neowebtime.ru/0000/event
not working at all
when you click on the calendar transition does not occur
when you click on the calendar month does not go back
Russian text breaks
Updated the zip file (see previous post), the month in the link should be a number rather than the month name (e.g. ?month=10 instead of ?month=October).

Also, have you tried adding`setlocale` in the gsconfig.php file? e.g. at the bottom
setlocale(LC_ALL, 'ru_RU');
SetLocale (LC_ALL, 'ru_RU'); added
zip file updated
how to make the show a month=10?
Update again (2.1c), was not formatting the date header in the events_list method. For those with encoding problems, try deleting the data/other/events.xml file and see if that makes a difference. The issue may be due to it being saved as ANSI (which doesn't support Cyrillic / non-latin characters), although if GetSimple itself does not have this problem I am not sure why this plugin does as it uses the same method to create the XML file.
I already installed GS twice just to recheck if i missed something

but every time i only got this %Europe/London %000 %2010 (check here my gs installation)


At the locale and through the admin panel i changed lang to 'pt_BR', and timezone to GTM 0, still no work.

Help me guys

Thank You
I confirm all mentioned problems with this plugin.
It's a pity, because I'd find such plugin very useful.

Errors:
- files are using ANSI codepage, so LC_TIME is US by default
After converting files to UTF-8, I was able to see days/months names in my native language, but special chars in names are screwed up.

I tried to use iconv function before strftime, but there are still strtotime functions, and this funct. display dates only in US format.

- I have no idea how to force this plugin to show the content of added event.
After clicking event's name, it reloads the page, but doesn't show anything.

- didn't had enough time to look deeper, but translating this plugin to other languages doesn't have sense, because with every update this plugin would have to be translated again.

Once again it's a pity, because spending some time on styling this calendar with css would make it awesome plugin. Of course if it was working properly Sad
But maybe it's a problem with GS 2.04. I have to test it under 2.03, but I doubt there will be any difference.
Pages: 1 2 3 4 5 6