News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Event Registration for SMF2

Started by HoverClub, December 15, 2011, 02:30:46 PM

Previous topic - Next topic

4everBlue


Gandrel

I'm currently running 2.0.15 with the Sunrise theme and we can't turn on the ability to add comments when registering. When someone tries to register, you get presented with a text window but once you put your comment in and hit the "Save" button, nothing happens. If I hit F12 in Chrome, I see that when you click on the "Save" button, it throws this error in the console:
An invalid form control with name='search' is not focusable

Does anyone know what this means and if it can be fixed?

Gandrel

Hmm, I did some more digging and I was able to get this to work with the default curve theme, so it looks to be an issue with the Sunrise theme specifically. Any ideas anyone? I'm also running PHP 7.1, for what it's worth.

Kindred

Did you install the theme before or after the mod?
If after, when you installed the mod, did you tell it to make edits to the Sunrise theme?


In either case, you may have to manually parse the mod and manually change any of the theme template files which need edits.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gandrel

Quote from: Kindred on January 08, 2020, 01:03:17 PM
Did you install the theme before or after the mod?
If after, when you installed the mod, did you tell it to make edits to the Sunrise theme?


In either case, you may have to manually parse the mod and manually change any of the theme template files which need edits.

I've tried to completely remove and reinstall it, but still no luck. I've installed it to the Default and Sunrise themes only as the Core theme failed the pre-install test. Could that be the issue? Everyone uses the Sunrise theme only, for what it's worth.

I've attached a screenshot of all the files that the mod is dealing with and the only file that is modified in the Sunrise theme as well. Would you mind having a look? I'm not sure how to fix this :/


Kindred

no that would not be the problem, core is useless anyway....

based on that screenshot, if it works in the Curve/default theme, should be working in Sunrise
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gandrel

Quote from: Kindred on January 08, 2020, 05:10:09 PM
no that would not be the problem, core is useless anyway....

based on that screenshot, if it works in the Curve/default theme, should be working in Sunrise

Huh strange. Did you have a chance to look at the php file that I attached as well? Also, can the core theme be removed without issue? I see an option to remove it, but isn't it also included by default in a new SMF installation?

Kindred

it's included as legacy.
I always remove the core theme as the first thing I do in a new installation. :)

The only theme you can/should never remove is the default/curve theme

I have not looked at your php yet
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mcmuroni

Hi there!
I read the hole threat to find some soultion to my problem but didn't find anything.
I used the SMF Verion 2.0.17 with the Responisve "Reseller Theme".
I have installed the Event Registration SMF2 Mod and everything with no error's. Then I startet to create an event with all the settings I need and started
the threat with an link to the registration. Finally on the Reseller-Theme the textlink to sign up is not showing up.
When I switch the forum to the standard curve theme the textlink to sign up is there.
Have anyone eexperience with the "Reseller-Theme" and this Mod.
I have tried some other themes "Night/Day" no sign up link. I tried the Averus-Theme and I can sign up.
I be thankful for any sugestions.
Sorry for my bad english.
greetings
mc

Kindred

sounds like the mod did not get installed into your additional themes
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mcmuroni

Now I tried several other "free" themes.
Often the responsive themes are not working with this mod.
But now I found one responsive which is working.
I'm just wondering how this is possible. With all themes I tried there was no problems with the installing of the mod
and to create an event with all registration options. But then only a few are showing the register linkbutton in the created threat.
And that's why I thought that I have only set some settings wrong. Because when there is a problem with theme and mod
then there it should be an error also on creating an registration event.
This is the thing I don't understand... but maybe I get something wrong.
thx for help
greetings mc.

Kindred

if you install themes AFTER the mod, then you have to MANUALLY update the template files in those themes.

The reason it works in some and not in others is that some themes don't define a new version of the template -- in which case, they use the template in the default theme. Since the mod was installed, fully, into the default theme, then any theme which uses the default versions will work as expected - while custom themes that have their own versions need to have the code added.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mcmuroni

I'll see. thanks for you explanation.
since my skills aren't good enough to add something to a theme
it's better to choose one where everything is working.

mcmuroni

Now I know what you mean with manual installing.
Thanks for the hint.
Now it is working.

gdavison

#334
Forgive me if I break any forums polidies - first post etc

We have been using this mod on our club forum for doing reservations during these COVID-19 days.  We run a sporting club so needed to limit the number of members on site.  While I don't think this reservation system was designed to be this granular it worked well.. We set up numerous events on each day with the title being the time of the event for example

10 Aug Group 1 : 9am to 10am
10 Aug Group 2 : 10am to 11am
19 Aug Group 3 : 11am to noon

etc etc.  Each calendar entry was set for the max number of people allowed by UK Gov't Covid recommendations (6) and we set the entry closes one day before the event.  System worked well until we spotted that the entry closes one day before the event was not working.  The Event displays the closing date as 9th Aug, however we had a member make a reservation at 10am on the morning of the 10th for the 9am to 10 am group 1. 

I am at best a self educated coder with a basic html, php understanding I was able to dig thru the various code and did discover that reservations did indeed not lock out until 11am of the morning off the event. We only use default theme so life was easier on having to find where I would need to make changes. Although we are in the UK, our Forum runs on a German server so I have a -1 hour in timezone setting in core forum settings

I changed line 272 in Display.template.php to
echo $event['start_timestamp'] . '&nbsp;' . time() . '&nbsp;' . $time_left . '<br />' . $txt['register_mod_maxAttendants'] . $event['hcc_max_attendants'] . ' -&raquo; ' . ($RegCount-$ConfCount) . '&nbsp;' . $txt['register_mod_registered'] . ($event['hcc_confirm'] ? ', ' . $ConfCount . ' '. $txt['register_mod_confirmed']  : '');

and could see that $event['start_timestamp'] was indeed 1597053600 for all the 10th of August events which is 08/10/2020 @ 10:00am (UTC)

My "hack to fix" was to change line  212 in Display.template.php from
$time_left = ceil(($event['start_timestamp'] - time()) / 86400); // days left until event starts(negative is event passed)
to
$time_left = ceil(($event['start_timestamp'] - time()-35940) / 86400); // days left until event starts(negative is event passed)

So while not really fixing the true problem which is $event['start_timestamp'] is not midnight, I now have things that $time_left  works out right and no one can make a reservation after one min past midnight

With my very limited understanding of PHP I cant work out where $event['start_timestamp'] gets its value from and should I be fixing it their or is what I have done "good enough"

As Said earlier we are really pushing that this mod does and its not been actively supported any more.  I would appreciate any feedback / pointers from more experienced folk re how they would have fixed this

Many thanks



Kindred

it's been a while since I looked at this -- but SMF has time settings in several places

1- Server time --- this is based on the location of your server and will vary greatly, depending on your host.
2- System time --- this is set in SMF admin and allows you to adjust the time delivered by server time to match the time that YOU want your site to use (indicated, in 2.0.x by a + or - adjustment to the server time -- in 2.1.x, an absolute setting by selecting your site timezone.)
3- Personal time setting --- each user can further adjust the system time DISPLAY to match their local time in their profile settings.

Without looking at the Event code, I'm not sure which one the mod is actually using -- it SHOULD be using (2), but that is not a guaranteed statement.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

gdavison

I was wondering if the issue could be that the database for Calendar database (which I believe is smf_1calendar) does not look to be using "unix time" format as start_date and end_date variables look to be in YYYY-MM-DD format, so somewhere between Event Registration and Calendar, start_date gets some "maths" done to set up $event['start_timestamp']  and I this is what I cant find  ???  I will continue to dig into the modification.xml to try and find it  :)

dendemeier

I got problems with the mod.

Somedays ago I updated my forum to 2.0.19. The mods were deactivated. So now i´m installing the mods again.

Installing the mod works like a charm, no errors are shown.

When i try to create an event with registration it got the error: "The database value you're trying to insert does not exist: maxAttendants"

I looked up the table _calendar in my database. The value exists in the database. So maybe the mod can´t write in it or something like that?
Is there a solution for the problem?


EDIT:

I looked up the errors at the protocol-log. There erreros shown like

2: Undefined array key "maxAttendants"
Datei: /home/prlxboxf/public_html/forum/Sources/Subs-Calendar.php

The same error shows up for  daySort, daysconfirm, daysclosed, termsandcond, multipleSignup, allowGuests, allowComments

dendemeier

I can´t delete my last post.
I did figure it out some minutes ago. It wasn´t a problem with this mod. It was a roblem with an other  event registration mod i tested before, which created other tales in the database but weren´t deleted during uninstalling the mod.

Advertisement: