News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Event Registration Mod

Started by pftq, August 15, 2009, 01:57:42 PM

Previous topic - Next topic

pythias

K an update on what I have done...........I looked at the modified display.template.php from the source directory on my server and made those changes to the one in the theme directory.......no issues it seems.  But there is no post.templete.php nor calendar.templete.php in the theme directory to modify.  Nor is there any of the other ones........which I take is why the modification does not work with the theme?  I copied those files over from the default theme to the current theme, but doesn't seem to make a difference.....soooo

What should I do now.  Site runs fine, just cannot see the confim button when not in default theme.

Also tried the SMF Package Parser to try to help.   But same results, it is asking me to modify those files from the theme directory that did not exist.

pythias

ok need help from anyone.    Actually talked to Kat on this.   I was told the only thing the needed to be changed would be with the files that came with this mod.   That is only one which is the display.temlate.php.   I made those two changes.  No difference.  He said that the Parse shows it not compatible with 1.1.11.  But of course, this mod is working with it, but just with the default theme.     Any help now would be great.   Sorry to be a pest.

Hannilein

QuoteEvent registration now shows up every time I want to post any Event. Any way to make Registration optional?

A quick and dirty solution for this:

In the Display.template.php file of your theme search for the following code-constructs (appears twice):

if(count($event['registration']) > 0)
{
  ...
}


and enclose these with the following condition:

if ($event['maxAttendants'] > 0)
{
  ...
}


It then should look like this example:

if ($event['maxAttendants'] > 0)
{
  if(count($event['registration']) > 0)
  {
    ...
  }
}


Please be sure to enclose the full code block for the condition (including the 'else'-Branch). Process both appearances of the condition separately, because of there is a "echo'</form>';" in between which must not be affected.

After inserted these modifications, you can disable the event registration by setting the option for "max attendants" of an event to zero.

Please be careful when modifying, you should have some experience with editing PHP-Code and have backups ready. Unfortunately I cannot post my code here, because it is modified too much at this place  ;)

Regards,
Dirk

Uhura!

Quote from: pftq on January 13, 2010, 08:38:46 PM
Quote from: Uhura! on January 12, 2010, 01:46:46 PM
You're sure T?

Here's what was described in that post you linked to:

QuoteAdded an extra Admin Register button that lets the admin add/delete other members from the event.  It's a bit ugly but it fills the gap for a feature I think should be there.
(what if people started signing up but you knew they weren't going??)

Also made the Admin buttons visible all the time, rather requiring the Admin to sign up (sometimes they're just managing the event and not attending).


nothing about any "confirm" button there...

Please advise.

Yes, I made two updates to the attachment is why.

Here is the post before it:
http://www.simplemachines.org/community/index.php?topic=331107.msg2426384#msg2426384



So I uninstall & then reinstall using that file?
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!


Babalui

Quote from: pftq on January 14, 2010, 01:14:30 PM
Quote from: Babalui on January 14, 2010, 11:29:14 AM
BTW, anyone figured out how to enable last minute registration? Pretty please   ;D

Do you mean registering the day of? I had to edit the mySQL table so that it allows negative numbers. :P Then I put -1 for days allowing registering.  If you know how to get to your SMF database, remove the unsigned attribute of the daysConfirm field in the calendar table.

Yup, registering on the day of the event, up to the time of the event itself. Many users are organizing their gaming in late hours and they would like to apply during the afternoon of that day. As the events are held quite late in the evening, there is no harm if someone will be able to apply after it starts.

Any other way to enable this beside suggested database tinkering. I had many crashed due to tinkering lately, and I woul like to avoid that. Besides, I have very hard time explaining members how to use Event Registration. Only one of the is using it properly. If I add to all that "be sure to enter -1 in this field", there would be even more confusion.

Maybe to disable deadline totally?

pftq

Go to display.template.php in your theme and find:

if($time_left > $event['daysClosed'])

The time_left is how many days are until the event.  The daysClosed is deadline (days before event).

Just change $event['daysClosed'] to -1

It would be the same as if you always had deadline as -1.

Final code:
if($time_left > -1)

Babalui

#147
Oho, pftq, it seems to be working!
I've created an event for today, and I have to wait until it expires to see what will happen.
I'll keep you posted. Thanks!
:)

EDIT:
Working fine, but members are able to Register for yesterdays event. Still, better to have such glitch then not to be able to register for todays event.
Thanks again!

EDIT 2:
Above line is repeated TWICE in that file (display.template.php). You have to edit each of them!

Babalui

Firstly, let me thank for help and patience.

Then, I would like to ask if it is possible to add another option to this mod: "Cannot attend".
Something that will enable members to announce that they will not be present for the event.

Thanks

improv

Hey Tyrsson™, some news or perhaps too busy? :)

pftq

Quote from: Babalui on January 21, 2010, 07:44:44 AM
Oho, pftq, it seems to be working!
I've created an event for today, and I have to wait until it expires to see what will happen.
I'll keep you posted. Thanks!
:)

EDIT:
Working fine, but members are able to Register for yesterdays event. Still, better to have such glitch then not to be able to register for todays event.
Thanks again!

Hi, that can easily be fixed by adjusting the -1 to -0.5 or something.  Tweak it until you get the right balance.

I'm a bit tied up these next few weeks, so I'm hoping someone else can take on your request for the "Cannot Attend".  It's definitely do-able though - it'd just be like the Confirm button except sending a different message.

Tyrsson

To be perfectly honest I have it loaded in a local to start work on, I have been swamped as of late. I plan to rewrite alot of the mod in the next version as well.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Babalui

Quote from: pftq on January 23, 2010, 12:08:44 PM
Hi, that can easily be fixed by adjusting the -1 to -0.5 or something.  Tweak it until you get the right balance.

dumb me, didn't think it was possible to use dicimals here  ::)

QuoteI'm a bit tied up these next few weeks, so I'm hoping someone else can take on your request for the "Cannot Attend".  It's definitely do-able though - it'd just be like the Confirm button except sending a different message.

No hurry, just a thought.
You help was crucial for my community and we are grateful as it is   ;D

adbrad

will this be updated to work with 2.0 rc2 thanks

improv

Quote from: Tyrsson™ on January 23, 2010, 01:03:30 PM
To be perfectly honest I have it loaded in a local to start work on, I have been swamped as of late. I plan to rewrite alot of the mod in the next version as well.
Okay dude, thanks for letting us know :).

Quote from: adbrad on January 23, 2010, 03:31:15 PM
will this be updated to work with 2.0 rc2 thanks

Yes

Uhura!

:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

firstsrgt

I have just install this mod on 1.1.11 so i had to modify the file as when i try to apply the mod it say not compatible, after done everyhting i get this error
QuoteUnknown column 'cal.maxAttendants' in 'field list'
File: /home/hhhclan1/public_html/forum/Sources/Calendar.php
Line: 349

i look on that line and this what is
QuoteAND (cal.ID_BOARD = 0 OR $user_info[query_see_board])" : ''), __FILE__, __LINE__);

Tyrsson

Access the db via phpmyadmin and check the calendar table to see if this column was added:

QuotemaxAttendants

This is just from reading the error message as I have not had time to check the structure. If this is the problem I can check the install file and write a query to add the column.
PM at your own risk, some I answer, if they are interesting, some I ignore.

firstsrgt

I check the calendar table and the column was not added  :'(

firstsrgt

Quote from: Tyrsson™ on February 02, 2010, 05:13:18 PM
If this is the problem I can check the install file and write a query to add the column.

How can i get this solve?, would you mind helping me out on this issue?

Advertisement: