GithubHelp home page GithubHelp logo

nikrou / eventhandler Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 5.0 699 KB

a dotclear plugin to manage events in your blog.

License: Other

PHP 42.40% CSS 3.69% HTML 10.78% JavaScript 41.22% Smarty 1.57% Makefile 0.34%

eventhandler's People

Contributors

franck-tomek avatar nikrou avatar onurb-taktile avatar scolin avatar vdanjean avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

eventhandler's Issues

Erreur 500 si utilisateur non super-administrateur

L'accès au plugin semble désormais cantonné aux seuls super-admin ce qui est particulièrement restreignant : en effet, en tentant d'accéder à la page du plugin dans l'admin, si non super-admin, on a droit à une erreur 500.
Version 2023-01-22

fatal error on 2.27.1

Trying to get to the plugin admin page, here is the error:
PHP Fatal error: Uncaught TypeError: Dotclear\Helper\Html\Html::escapeJS(): Argument #1 ($str) must be of type ?string, bool given, called in /site/dc/src/Core/Backend/Page.php on line 1454 and defined in /site/dc/src/Helper/Html/Html.php:96 Stack trace: #0 /site/dc/src/Core/Backend/Page.php(1454): Dotclear\Helper\Html\Html::escapeJS() #1 /site/site/plugins/eventHandler/tpl/list_events.tpl(9): Dotclear\Core\Backend\Page::jsVar() #2 /site/site/plugins/eventHandler/inc/index.events.php(432): include('/site/...') #3 /site/site/plugins/eventHandler/index.php(79): include('/site/...') #4 /site/dc/src/Process/Backend/Plugin.php(70): include('/site/...') #5 /site/dc/src/App.php(99): Dotclear\Process\Backend\Plugin::render() #6 /site/dc/src/App.php(75): Dotclear\App::process() #7 /site/dc/admin/index.php(16): Dotclear\App::bootstrap() #8 {main} thrown in /site/dc/src/Helper/Html/Html.php on line 96

And The plugin is not functional on 2.27.1, no event displayed on frontend.

New error with latest version

Affecting only backend (admin unreachable), frontend is ok:
PHP Fatal error: Uncaught TypeError: Argument 3 passed to dbStructTable::field() must be of the type int or null, string given, called in /dc/inc/libs/clearbricks/dbschema/class.dbstruct.php on line 514 and defined in /dc/inc/libs/clearbricks/dbschema/class.dbstruct.php:487 Stack trace: #0 /dc/inc/libs/clearbricks/dbschema/class.dbstruct.php(514): dbStructTable->field('event_address', 'text', '', true, NULL) #1 /site/plugins/eventHandler/_install.php(38): dbStructTable->__call('event_address', Array) #2 /dc/inc/core/class.dc.modules.php(819): require('/home/xxx/...') #3 /dc/inc/core/class.dc.modules.php(551): dcModules->loadModuleFile('/home/xxx/...') #4 /dc/inc/core/class.dc.modules.php(521): dcModules->installModule('eventHandler', NULL) #5 /dc/admin/index.php(50): dcModules->installModules() #6 {main} thrown in /dc/inc/libs/clearbricks/dbschema/class.dbstruct.php on line 487

Fatal error / SQL

En faisant la mise à jour vers dotclear 2.21, un bug est apparu :

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INNER JOIN dc_eventhandler EH ON EH.post_id = P.post_id WHERE P.blog_id = 'd...' at line 1 (1064) Something went wrong while loading template file for your blog.

et

Fatal error: Uncaught Error: Call to a member function display() on null in /www/site/plugins/eventHandler/tpl/list_events.tpl:92 Stack trace: #0 /www/site/plugins/eventHandler/inc/index.events.php(403): include() #1 /www/site/plugins/eventHandler/index.php(80): include('/home/users5/a/...') #2 /www/dotclear/admin/plugin.php(43): include('/home/users5/a/...') #3 {main} thrown in /www/site/plugins/eventHandler/tpl/list_events.tpl on line 92

Add utf-8 charset in headers

When using google calendar to automatically import an ics, google does not look into the ics itself to look for the charset (whereas eventHandler already put UTF-8 here). For non ascii characters to work, it is required that the server return the "Content-Type: text/calendar; charset: utf-8" header.

The patch is easy :
diff --git a/web/plugins/eventHandler/_public.php b/web/plugins/eventHandler/_pu
index 81ccf9b..e282aaa 100755
--- a/web/plugins/eventHandler/_public.php
+++ b/web/plugins/eventHandler/_public.php
@@ -675,7 +675,7 @@ class urlEventHandler extends dcUrlHandlers

            $res .= "END:VCALENDAR\r\n";
  •           header('Content-Type: text/calendar');
    
  •           header('Content-Type: text/calendar; charset=utf-8');
            header('Content-Length: '.strlen($res));
            header('Content-Disposition: attachment; filename="events.ics"')
            echo $res;
    

    Regards,
    Vincent

Lost all images in default-templates folder

Since last update, certainly due to the new organisation for templates Mustek / Currywurst, all images have disappeared. There was previously a folder "img" in "default-templates". Maybe it could be a good idea to put them back and modify the path to display them.

switch to https URI

When using a website with https, the google maps API call is not using the same protocol (http) and as a result the map is not displayed.

no map!

Using GoogleMaps, the map on event is not displayed at all (there's sometimes a flash of it). Using OpenStreetMap, there is only a part of it, where the links are, on the bottom.

DC 2.8.1, jquery 1.11.3, all tested browsers (Firefox, Safari, Chrome).

Edit : the problem was the old personnalised templates. Fixed.

Filter on admin list of event always opened

There's a bug on the JS-controlled link to display filters in the list of events in the admin: it's always opened, and when clicking on the link, it's ineffective (leads to an error page).

Dernière version impossible à installer

"Erreur : Le fichier zip ne semble pas être un fichier de module Dotclear valide."
Même erreur que ce voit via le gestionnaire de plugins, ou en uploadant le fichier.

Bind a post to an unexisting event

From posts list, when user wants to attach an event and there's no event, context is lost. User can create an event but it must return to posts list.

Error trying to find coordinates with Gmaps & OSM

When trying to find the coordinates with Gmaps by clicking on the link to do so, here is the message I get :
Geocode was not successful for the following reason: ERROR
No error but no more results with OSM.

DC 2.10.2 / Latest Eventhandler 2016.09.08

Issues with events lists

Events list is not accessible if any event exists.
There's problem with filter box and probably missing translations.

Édition en masse d'événements

J'ai des soucis pour l'édition en masse d'événements. Quand, en tant qu'admin du blog, je vais dans le gestionnaire d'événement et que je demande à changer l'auteur ou la catégorie de plusieurs événements, ça ne marche pas. J'ai essayé un peu de suivre le cheminement du code, mais je n'ai pas réussi à trouver comment corriger cela. J'ai l'impression que c'est une redirection qui n'est pas valide à un moment donné.
Est-ce que d'autres que moi observent ce bug ?
Est-ce que quelqu'un sait comment le corriger ? (pour l'instant, pour changer l'auteur, je vais directement taper dans la base mysql...)

Ce qui "m'énerve" le plus, c'est la bêtise que j'ai faite cet après midi. Quand j'avais signalé ça sur le forum en 2010, j'avais réussi à patcher pour que le changement d'auteur fonctionne. Mais, en faisant la mise à jour de ce plugin tout à l'heure, j'ai perdu ma modif que je n'avais pas sauvé :-(

Fond de carte OSM

Bonjour,

Allez je loggue ici la demande d'évolution pour ajouter OpenStreetMap :)
Du coup je pourrais installer le plugin chez paris.libre.cc !

Sylvain

all "days" pages display "Dotclear" -> error

There seems to be a bug in the eventhandler-list.html template for "days" contexts. For instance, clicking on "All events" leads to a "Dotclear" error page.

It seems to happen only when using mustek tpl set.

New version interfere with Tags

When updating to the latest EventHandler version (2016.08.09), I noticed the tags ot the entry and link to display the full list of tags in the entry edition page disappear.

Warning & erratic display on the frontend - version 2023.01.27

"Dotclear"displayed instead of content on most of the site's pages. The problem seems linked to this tag: {{tpl:SysBehavior behavior="publicEntryAfterContent"}}. Everything below this call returns an error content.

Warning trace:

WARNING /dc/inc/public/class.dc.template.php:442 Undefined array key "date"
[/site/plugins/eventHandler/inc/class.tpl.eventhandler.php:783] : dcTemplate::getSortByStr
[/dc/inc/libs/clearbricks/template/class.template.php:687] : tplEventHandler::EventsOfPost
[/dc/inc/public/class.dc.template.php:276] : template::compileBlockNode
[/dc/inc/libs/clearbricks/template/class.tplnodeblock.php:88] : dcTemplate::compileBlockNode
[/dc/inc/libs/clearbricks/template/class.tplnode.php:58] : tplNodeBlock::compile
[/dc/inc/libs/clearbricks/template/class.template.php:662] : tplNode::compile
[/dc/inc/libs/clearbricks/template/class.template.php:425] : template::compileFile
[/dc/inc/libs/clearbricks/template/class.template.php:491] : template::getFile
[/dc/inc/public/class.dc.template.php:246] : template::getData
[/site/plugins/eventHandler/inc/class.public.eventhandler.php:112] : dcTemplate::getData
[/site/plugins/eventHandler/inc/class.public.eventhandler.php:82] : publicEventHandler::publicEntryContent
[/dc/inc/core/class.dc.core.php:848] : publicEventHandler::publicEntryAfterContent
[/dc/cache/cbtpl/d0/f5/d0f596926d26f9c9f614ea0652f3202b.php:591] : dcCore::callBehavior
[/dc/inc/libs/clearbricks/template/class.template.php:496] : ::include
[/dc/inc/public/class.dc.template.php:246] : template::getData
[/dc/inc/public/lib.urlhandlers.php:172] : dcTemplate::getData
[/dc/inc/public/lib.urlhandlers.php:294] : dcUrlHandlers::serveDocument
[/dc/inc/libs/clearbricks/url.handler/class.url.handler.php:231] : dcUrlHandlers::home
[/dc/inc/libs/clearbricks/url.handler/class.url.handler.php:269] : urlHandler::callHelper
[/dc/inc/public/lib.urlhandlers.php:233] : urlHandler::callDefaultHandler
[/dc/inc/public/class.dc.public.php:274] : dcUrlHandlers::getDocument
[/dc/inc/public/prepend.php:32] : dcPublic::init
[/index.php:8] : ::require

eventHandler->getEvents won't allow $params['sql_only'] usage

Hello,
For eventhandler extension plugin debugging purposes, I need to check the sql requests generated.

For regular posts, I use $request = $core->blog->getPosts(['sql_only'=>true]) to get the sql request.
When I want to do the same with eventHandler->getEvents, I get an error, because the $rs returned by $this->core->blog->getPosts($params,$count_only) is a string instead of a record and lines 159 and 160 in class.eventhandler.php try to access $res as a record.

My fix to this issue is to enclose lines 159 & 160 with a condition test

		if(!array_key_exists('sql_only', $params) || !$params['sql_only']){
			$rs->eventHandler = $this;
		 	$rs->extend('rsExtEventHandlerPublic');
		}

Hope this will help!
Regards,
Nurbo

Lost automatic address from GMaps

When entering an address in the dedicated field for an event, even if not complete, when clicking on the button "find... on Gmaps", the field was automatically completed with the full address: it's no longer the case (beginning with version 2015.03.22).

EventHandler with sqlite: "cannot start a transaction within a transaction (1)"

Hi,
trying to add an event when using an sqlite database ends up with the error message indicated in the subject.
Configuration:

  • Dotclear: 2.10.2
  • Database: sqlite 3.13
  • EventHandler plugin: 2015.08.05
    Steps to reproduce: install dotclear with an sqlite database, install the plugin, add an event.
    I narrowed the error to the addEvent function, with this instruction:
    $this->con->writeLock($this->table);

Some google-fu showed that this might be because sqlite does not like nested transactions (trying the same install and steps but with mysql does not throw an error). But I don't know enough about the plug-in if that's easily fixable or might require a refactor of the db interaction logic.

icon-b trop grosse

salut,

l'icon-b est en 70x70 alors qu'elle devrait être en 64x64.
icon-b
image recadrée jointe

Calendar Widget navigation

Hello,
I'm using eventhandler 2018.01.25 on dotclear 2.14.3
When I use the prev or next link, the first time, it switches to the according month, and loads the calendar through ajax request. The link's URL is ignored.
The second time, it goes to the link's URL.
I've investigated, and it looks like the $(target).replaceWith call in event-public-calc.js in eventHandlerQuery function erases all data and events.
The weird thing is that just after that, the eventHandlerCalendar() function is called again, which should reset the click event handlers (lol) on the newly created links. But it has no effect.
I haven't found any solution yet, but it is like if the target element is changed by the replaceWith and then target doesn't exist any more.
Any clue?
Thanks for your help
Nurbo

l'attachement d'un événement à un billet ne fonctionne pas

Quand je vais sur la page avec la liste des événements depuis un billet, je coche le/les billet/s que je veux lier. Puis en appuyant sur le bouton "Lier les événements sélectionnés", au lieu de retourner sur le billet, la page de la liste se recharge, et rien d'autre ne se passe.
DC 2.28.1 / EH 2023.12.29

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.