Page 1 of 3

[3.2][BETA] [3.1] gn36 - Hookup

Posted: Mon Jun 08, 2015 6:20 pm
by gn#36
Extension Name: gn36 - Hookup
Author: gn#36 (Former author of corresponding phpBB 3.0.x Mod: Pyramide)

Extension Description: Allows adding a meeting planner similar to or doodle to your topics.
Extension Version: 1.0.3 (CDB for phpBB 3.1.x), 1.1.0-b1 (Beta for phpBB 3.2.x)

Requirements: No special requirements

Current features:
  • Adds a Date / User Matrix to the top of the topics.
  • Permissions can be set per forum.
  • Users and groups can be invited and receive an email on invitation. When listed, users also receive an email when dates are added. Reminders are reset when the user visits the topic.
  • Self-Invitation is supported, allowing users to enter themselves into the planner list, as long as they have access to the topic and are permitted to view the hookup. This is intended for large groups that would otherwise extend the list too much and can be set individually for each hookup.
  • User Options include yes, no, and maybe.
  • Once a final date is found, the date can be auto-prepended to the topic title and users can be informed by email. The list is hidden and instead a large notice on the final date is displayed above the topic. Final date can be changed if desired.
  • Text options instead of dates are supported.
  • Send notifications on several hookup events (user invite, new user, new date, active date set/reset).
  • Event for calendar extensions to hook into and catch the setting and resetting of an active date
  • Optional automatic resets and added dates once a week to allow use for weekly meetings.
  • Compatible to upgrades from phpBB 3.0.x Hookup Mod
Planned features:
  • Define a date after which users can't change their status.
  • See github issues and look for tag "enhancement"
Screenshots: see CDB page

Demo: none, similar to phpBB 3.0.x version (see e.g. no active date set, yet (german version) active Date set (german version))

Extension Download:

Re: [DEV] gn36 - Hookup

Posted: Tue Jun 09, 2015 11:55 am
by Mess
Very neat. :)

Re: [DEV] gn36 - Hookup

Posted: Tue Jun 09, 2015 3:41 pm
by Miri4ever
Looks very nice, will keep an eye onto it.

For the moment it only works with the standart style and on mine I didn't see anything, but thats normal for extensions. Just need to pick this piece of code from viewtopic into mine. This should not be the problem.

Re: [DEV] gn36 - Hookup

Posted: Tue Jun 09, 2015 11:45 pm
by leschek
Interesting. After some testing I found a few small issues:
  1. I can't open calendar in Propose new dates tab. I tried Firefox and Opera. EDIT: Problem was with name of javascript file - after changing the "en" to my language, calendar started working.
  2. Date above participating users is almost invisible
  3. Language files:
    1. Do you really want to delete %d dates and %d users? - this probably should be array of plurals
    2. Missing language keys in language file:
      1. COMMENT - in Meeting planner tab
      2. RUN - in Delete tab
      3. HOOKUP_AUTORESET - When creating topic
      4. HOOKUP_AUTORESET_DESC - the same as above

Re: [DEV] gn36 - Hookup

Posted: Wed Jun 10, 2015 9:03 am
by gn#36
Thanks! What do you mean by "changing the 'en' to my language"? Did you use the english version for testing but the calendar javascript did not work? Or did you copy the english language files to your language folder for testing and the javascript file was wrong because it needed a different name?

Re: [DEV] gn36 - Hookup

Posted: Wed Jun 10, 2015 9:22 am
by leschek
I use more than 1 language on my board. First I copied calendar-en.js into my language folder so it looked like ext\gn36\hookup\language\cs\calendar-en.js and calendar didn't work when I changed board language to cs language.
Then I changed name of calendar-en.js into calendar-cs.js and it starts working as it should.
Wouldn't be possible to have just calendar.js (without en or cs etc.)?

EDIT: Sorry, another issues.
  1. When I try to invite group I get this message:

    Code: Select all

    [phpBB Debug] PHP Notice: in file [ROOT]/ext/gn36/hookup/event/viewtopic.php on line 475: Undefined variable: userids
    [phpBB Debug] PHP Warning: in file [ROOT]/ext/gn36/hookup/event/viewtopic.php on line 475: array_diff(): Argument #2 is not an array
  2. Add a reply with a notice about the active date to this topic - If this option should create new post (reply) in topic then it doesn't work.
  3. Users can change their vote (Yes, No, Maybe) after the active date is set. I think that if planer creator (topic author) set active date users shouldn't be able to change their vote, but they can if they click on "Show all dates" link. I think it could lead into disagreement about chosen date. It's like changing vote after poll is finished.

Re: [DEV] gn36 - Hookup

Posted: Wed Jun 10, 2015 1:01 pm
by gn#36
Yes, I can see that this may cause issues. It should be easy to rename this, I'll fix that in the next few days or so. Maybe the original location of the file was not in a language folder, which made this differenciation necessary. Right now it is redundant anyways.

Regarding your new issues:
1.) I guess I forgot to test adding groups. Thanks!

2.) I know, this is why this is listed in "planned features". The old Mod was using a custom object oriented api that allows generating and submitting a post in basically 3-4 short lines of code. I have started converting this API as well, but right now I am not sure if I want to really invest more time in this or just use the phpBB functions directly. The api would make converting my internal mods much easier, but it is also a lot of overhead work.

3.) That is a bit debatable. For example, I would definitely allow changing a "maybe" to "yes" or "no" after a date has been found, because in most cases one would like to receive a definite answer even after the date was fixed. In other cases it may also be acceptable to opt in or opt out later even after a date has been fixed (even though possibly only one of these options is acceptable for the problem at hand). For example, a meeting may be planned for which ideally everybody invited will come. One person says no initially on the date that is then set active because most of the other people can make it then, but later the person finds out that their other appointment got canceled. A meeting that is open for anyone may permit late "no"s as well.

The current behavior on this is identical to the old 3.0 mod, which was desireable for me, because I don't like loosing functions. Whatever is changed should still permit this behavior in some way so we don't loose backward compatibility, even though additional options can of course be added.

I was also thinking about maybe adding the ability to set a date independently of the active date after which nobody can alter their setting anymore. Just like on votes, where it is possible to set a date after which the vote is over.
If you have any other usefull additions, just let me know. I won't guarantee that I put all of them in, at least not right away, but right now would be the best time to add suggestions what is needed. For example, one could think about allowing a limit on the total number of participants, disallowing the "maybe" option for special topics or allowing to make the list invisible to all users except the topic owner and moderators or things like that. Another request on the old mod was allowing other options than just dates in the headline. In a really old phpBB 2.0 mod that was similar to this, I had the possibility of adding guest users which was also neat. On the automatic resets, I also got the request to allow for automatic yes/no settings individually configurable by the user (also a feature of the old 2.0 mod). One could also allow different intervals than one week.

To get a first version of this extension done in reasonable time, some of these ideas will definitely have to wait for a later version, though. Still I'd like to collect them and get opinions on them to be able to prioritize.

Re: [DEV] gn36 - Hookup

Posted: Wed Jun 10, 2015 2:25 pm
by leschek
Thank you for your answer.
gn#36 wrote:2.) I know, this is why this is listed in "planned features".
Sorry, I forgot about that.

3. I see your point. Maybe it would help if extension shows some kind of notice that someone changed his/her mind, so active date of the meeting should be reviewed. There should also be notification about it **.

I also like this:
gn#36 wrote:I was also thinking about maybe adding the ability to set a date independently of the active date after which nobody can alter their setting anymore. Just like on votes, where it is possible to set a date after which the vote is over.
If I understand correctly there would be something like "So far the best date for meeting" (people can change their setting) and "Date of the meeting" (users will not be able to change their setting).

Note ** - Speaking about notifications. It would be great to have option to use phpBB core notification system, so users could choose how they want be notified.
gn#36 wrote:If you have any other usefull additions, just let me know.
Sure. I actually never used it to plan real meeting, so I don't know if there is something missing. It definitely would be nice to have option to change in automatic resets the one week interval. Right now I have just some design related questions, but they are just little things:
  1. Why the Participate option is included in individual tab, when it is also in "Meeting planner overview".
  2. I would like to have the "Hookup options" more separated from topic options (maybe on individual tab?)

Re: [DEV] gn36 - Hookup

Posted: Wed Jun 10, 2015 10:05 pm
by gn#36
Most of the issues you found should now be fixed.

Missing are
  • Separate Hookup options in posting.php - I still need to find the best event to add these options to. The one I found only adds options to the top of that particular tab, which is not the best location. Especially when I add more options like the freeze date an extra tab is definitely the way to go.
  • Participate option both in individual tab and overview - I still have to look into this. It is definitely there twice for historic reasons - I moved the button to the overview page from the extra tab because people kept asking me where they could find the button. Probably then other users couldn't find the button anymore and I decided to put it in twice. This new version could be a good place to change that, though.
  • Date after which no changes can be made by users (that is rather a feature request, I added it to planned above)
  • Using the notification system rather than sending direct mails (this is also a good feature request, but it's a rather big one, so it will have to wait for now, I put it on github, so it doesn't get lost)
Your interpretation concerning "so far the best date" and "Date of meeting" is correct.

Re: [DEV] gn36 - Hookup

Posted: Thu Jun 11, 2015 9:17 pm
by Miri4ever
If this extension is enabled, and you try to merge two topics, I got this error. The topics got merged but the database of the second is not more found:

Code: Select all

Allgemeiner Fehler
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE topic_id = '1475'' at line 1 [1064]


DELETE FROM WHERE topic_id = '1475'


FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/ext/gn36/hookup/functions/hookup.php
LINE: 510
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/gn36/hookup/event/mcp_events.php
LINE: 49
CALL: gn36\hookup\functions\hookup->delete_in_db()

FILE: (not given by php)
LINE: (not given by php)
CALL: gn36\hookup\event\mcp_events->delete_topic()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
LINE: 164
CALL: call_user_func()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
LINE: 53
CALL: Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php
LINE: 167
CALL: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 60
CALL: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 46
CALL: phpbb\event\dispatcher->dispatch()

FILE: [ROOT]/includes/functions_admin.php
LINE: 707
CALL: phpbb\event\dispatcher->trigger_event()

FILE: [ROOT]/includes/functions_admin.php
LINE: 2114
CALL: delete_topics()

FILE: [ROOT]/includes/mcp/mcp_forum.php
LINE: 483
CALL: sync()

FILE: [ROOT]/includes/mcp/mcp_forum.php
LINE: 75
CALL: merge_topics()

FILE: [ROOT]/includes/mcp/mcp_main.php
LINE: 204
CALL: mcp_forum_view()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: mcp_main->main()

FILE: [ROOT]/mcp.php
LINE: 310
CALL: p_master->load_active()

Re: [DEV] gn36 - Hookup

Posted: Thu Jun 11, 2015 11:26 pm
by gn#36
Thanks! This problem should be fixed now.

But it is an interesting question at hand: What should happen to hookups if two topics are merged? Right now it seems the delete hook is called and this triggers deletion of the hookup of the topic which is merged into the other topic. Should I also "merge" the two hookups? Should only one be kept?

Re: [DEV] gn36 - Hookup

Posted: Sun Jun 21, 2015 10:21 pm
by Booster1304
Hello Friend,

is there a way to make it work with the "subway" theme?
It not appears in Topics with this theme.

Best wishes

Re: [DEV] gn36 - Hookup

Posted: Mon Jun 22, 2015 12:21 pm
by gn#36
You could copy the contents of the styles/prosilver within the extension folder to styles/subway to see if it works then (might need to delete cache or disable/reenable the extension afterwards). I do not know the "subway" style.

If the "subway" style is subsilver2 based, it could be possible to copy the old phpBB 3.0.x subsilver2 style over to this new extension as well to make it work. It might be necessary to change a few things, though, and you will definitely need the style events for it to work. It might be sufficient to copy them over from prosilver, though.

Here is the old phpBB 3.0.x subsilver2 Version I have created some years ago:

If someone is willing to adjust the subsilver2 style for phpBB 3.1.x I will be happy to include it in the extension, but I do not plan to convert it myself.

Re: [DEV] gn36 - Hookup

Posted: Thu Sep 03, 2015 10:36 pm
by gn#36
Big update: Thanks to kilianr the hookup is now capable of working with both text and date entries. Also I have integrated the phpBB Notification System, so that instead of forcing E-Mails, the users can now choose what kind of messages they wish to receive.

Thanks to MetallicaMust, we also have a French translation now, even though that is lacking notification support as of now (the same for german, but I will fix that soon).

Re: [DEV] gn36 - Hookup

Posted: Sun Dec 27, 2015 1:58 pm
by gn#36
I thought I should put a short update here since quite a few additions have been made since my last post here and the extension is nearing completion of the first version to be entered in the extension database.
  • The extension now merges two hookups if the respective topics are merged
  • Several bugfixes regarding erroneous data in email notifications
  • Email notifications are now enabled by default for all users (but can be disabled in the ucp as for all notifications)
  • A new translation de_x_sie was added
  • A new translation en_us was added (identical to en except for changed date formats)