Event Registration Mod

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

Previous topic - Next topic

Zirc

pftq,

My issue would be in the post.template.php right?  It does the same thing in all my themes, see attached for core theme.  It's almost as though there is an extra <div> in there somewhere.

hcfwesker

Either post.template.php for each theme.  Or perhaps Sources/Posts.php , since it seems to be affecting all themes at once.

Zirc

Okay I seemed to have solved my problem and you can tell me if it's needed code because it seems to be working fine without it.

If I go to calendar.template.php and take out the following code added by the mod everything goes back to where it should be on the first post page and the event registration stuff is on the second page after you hit the submit button.

// Event Registration mod
// pftq: Don't show, too cluttery
echo '<tr>
<td class="smalltext">
<input type="hidden" name="maxAttendants" maxlength="5" size="30" value="'.$context['event']['maxAttendants'].'" />
<input type="hidden" name="daysConfirm" maxlength="5" size="30" value="'.$context['event']['daysConfirm'].'" />
<input type="hidden" name="daysSort" maxlength="5" size="30" value="'.$context['event']['daysSort'].'" />
<input type="hidden" name="daysClosed" maxlength="5" size="30" value="'.$context['event']['daysClosed'].'" />
<input type="hidden" name="termsAndCond" value="', $context['event']['termsAndCond'], '" />
<input type="hidden" name="multipleSignups" value="', $context['event']['multipleSignups'],'" />
<input type="hidden" name="allowGuests" value="', $context['event']['allowGuests'], '" />
<input type="hidden" name="allowComments" value="', $context['event']['allowComments'], '" />
</td>
</tr>';



pftq

Those are all hidden fields, so I'm not sure why they would affect the placement of the other options.

What those hidden fields do is prevent you from getting error logs when someone views that Post Event Page.  Technically it does work fine without the code - it's just now you have a lot of undefined variable notices.

Can you attach the template file before removing the code? I just want to take a look - thanks.

Zirc

Yeah there were a few of them in the error log lol.  Actually though the one I saw the most was 'undefined - dateregistered'  Anyway attached is my calendar.template.php  looks like the mod put the code in at line 196

pftq

Oh I see.  SMF2 isn't using tables anymore so those tr/td tags shouldn't be there.  I'll make sure to take those out in the next version.

You should be able to either just remove the tr/td tags or replace them w/ li tags like in the other parts of the file.

Zirc

That did the trick.. I eliminated the <tr></tr> tags and replaced the <td class="smalltext></td> with <li class="smalltext"></li> and it works perfectly now.

DasVON

Installed it but it does not work ..

Does it need to be activated somewhere ? I am a nooB at th!s  ???

pftq

Make sure you enable events linked to posts under Calendar Settings.

OCJ

Like it  :) Glad it was updated for smf2 - we are an outdoor club with quite a lot of events on the calendar - useful!

The explanation (English) for the options isn't so easy to understand though - for users ...even me  :-\
If you have the documentation handy yes but in real life its tough on ordinary users of different nationalities. Clearer explanation would be good, even if longer.



2 things that look like bugs:

I cant see any comments that are made - none on the message or near registration area. Nothing by mail or PM?

The posting time does not follow that set in Admin with the server offset - way off.
Completely different times posting through the calendar and posting directly to the board.

Otherwise Im looking forward to members using it - thanks for the hard work.
Andy

And error log
"Undefined offset" - index.template.
Looks like its will add up to thousands in a matter of an hour or so.


OneActivist

  Trying to install in SMF 2.01 today. I am getting the following warnings before installing:

*    1.    Execute Modification    ./Sources/Calendar.php    Test successful
      1.    Add After    ./Sources/Calendar.php    Test successful
      2.    Add After    ./Sources/Calendar.php    Test successful
      3.    Add After    ./Sources/Calendar.php    Test successful
      4.    Add After    ./Sources/Calendar.php    Test successful
*    2.    Execute Modification    ./Sources/Display.php    Test failed
      1.    Add After    ./Sources/Display.php    Test failed
      2.    Add After    ./Sources/Display.php    Test successful
      3.    Add After    ./Sources/Display.php    Test successful
      4.    Add After    ./Sources/Display.php    Test successful
*    3.    Execute Modification    ./Sources/Post.php    Test successful
*    4.    Execute Modification    ./Sources/Subs-Calendar.php    Test successful
*    5.    Execute Modification    ./Themes/default/Display.template.php    Test failed
      1.    Replace    ./Themes/default/Display.template.php    Test successful
      2.    Add After    ./Themes/default/Display.template.php    Test successful
      3.    Add After    ./Themes/default/Display.template.php    Test failed
*    6.    Execute Modification    ./Themes/default/Post.template.php    Test successful
*    7.    Execute Modification    ./Themes/default/Calendar.template.php    Test successful
*    8.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
*    9.    Execute Modification    ./index.php    Test successful
   10.    Execute Code    database.php    
   11.    Extract File    ./Sources/RegisterEvent.php    
   12.    Extract File    ./Themes/default/TermsAndConditions.template.php    
   13.    Extract File    ./Sources/admin_register_event.php    
   14.    Extract File    ./Themes/default/admin_register_event.template.php    

  Here is what mods are installed:
1.    Event Registration Mod    0.175 BETA    [ Install Mod ] [ List Files ] [ Delete ]
2.    Event Reminder Mod for SMF2    2.02    [ Uninstall ] [ List Files ] [ Delete ]
3.    Simple Audio Video Embedder    2.0.4    [ Uninstall ] [ List Files ] [ Delete ]
4.    FB & Twitter Sharer Mod 2.0    2.0    [ List Files ] [ Delete ]

6.    Facebook_Like v.2.0    2.0    [ List Files ] [ Delete ]
7.    RSS Feed Poster    3.0.2a    [ Uninstall ] [ List Files ] [ Delete ]
8.    Simple Audio Video Embedder    2.0.3    [ Upgrade ] [ List Files ] [ Delete ]
9.    Social Media Icons    0.7.1    [ Uninstall ] [ List Files ] [ Delete ]
10.    ENotify    2.0.1    [ Uninstall ] [ List Files ] [ Delete ]

12.    RSS Feed Icon    1.1    [ Uninstall ] [ List Files ] [ Delete ]

    Thanks!
There was never a good war or a bad peace.
         Benjamin Franklin

hcfwesker

Quote from: igirisjin on December 05, 2011, 02:30:05 PM
I cant see any comments that are made - none on the message or near registration area. Nothing by mail or PM?

This was already mentioned just a few posts earlier in the topic.  http://www.simplemachines.org/community/index.php?topic=331107.msg3222365#msg3222365

Quote from: OneActivist on December 05, 2011, 05:34:42 PM
*    2.    Execute Modification    ./Sources/Display.php    Test failed
  3.    Add After    ./Themes/default/Display.template.php    Test failed

You need to parse the mod on the mod page, and make the manual edits to those files.

pftq

Will check on the time offset - possibly overlooked that.

As mentioned before, the Admin Register page doesn't show comments.  The comments should be right under the name of the registrant on the topic view.

For the options, can you give me a few examples? Are these the ones regular members see when signing up or the ones on the Edit Event page?

QuoteAnd error log
"Undefined offset" - index.template.
Do you have the line number on that as well? Thanks

So far planning to update on next version:
- Change table tags to list (tr/td to li)
- Fix time offset
- Clearer options

Anything else just let me know - I'm going to try to release all these changes together in the next version.

hcfwesker

Quote from: pftq on December 05, 2011, 08:33:16 PMFor the options, can you give me a few examples? Are these the ones regular members see when signing up or the ones on the Edit Event page?

I'm guessing he means when event creators make events.  Cause I've had to write a detailed description for our tournament hosts on how it works, and some are still confused lol

OCJ

#314
I want to check 1 more thing about the error - line 651 is  Bloc custom menu. It could be the template menu system but it was working ok without errors until I installed this mod.
Any site url is producing the error now.
I had problems with manual edits installing and uninstalling - could be a mistake I made making edits but not sure. Will restore to before any changes and try it again.



If possible - make the  options in 'simple' layman's English! Users will have trouble with anything else. If it looks easy to set the options - they will use it.




http://####.com/index.php?action=calendar;sa=post

8: Undefined offset: 1

File: /home###/###/public_html/Themes/Proteus20b/index.template.php
Line: 651
Also 652

Quote643:    
$menus = explode("\n",$settings['emenus']);
644:    
foreach($menus as $menu)
645:    
{
646:    
$it = explode(",",$menu);
647:    
// first the parents
648:    
if(!isset($it[3]))
649:    
{
650:    

$context['menu_buttons'][$it[0]] = array(
==>651:    
'title' => $it[1],
652:    
'href' => $it[2],
653:    
'active_button' => false,
654:    
'sub_buttons' => array(),

   

Bixby

This is a fantastic Mod and will help significantly with two sites that I run. Both of them use the calendar and events quite heavily.

I am still playing around with the options. One question I have...
...Is it possible to have this mod Active for some sections of the forums but not for others? For instance, some sections of our forums require Registration, where other sections are just posting events to the Calendar and no registration is needed for those events. It would be great to have control over which events used the registration feature. If that is not an option today, consider this a feature request :)

Thanks again,
Bixby (Matt)
Life is Short; Play Games!

Zirc

@Bixby

If you set the max attendants option to 0 then registration is disabled for that event.

Bixby

Quote from: Zirc on December 06, 2011, 05:55:12 PM
@Bixby

If you set the max attendants option to 0 then registration is disabled for that event.


That is awesome. Thanks.
Life is Short; Play Games!

OCJ

If possible in future versions ....

Admin page checkbox options to allow comments or guest registration.

For clubs like ours we have a safety waiver/issue and membership fee. If members see guest sign up and start signing up guests it just makes trouble.
But sometimes events at low level/safe, we allow guests - then its uesful. Nice the have the option in admin.

It maybe a lot more work but typical permissions would be good one day - group permissions page to select who can use it and what options they can see/use.

doughboy99

I've installed this mod on a test site. I'm using SMF 2.0.1 and Simpleportal 2.3.4. It works fine using the default curve theme but using the theme Argentum2 theme the Register button doesn't appear at all.
When I installed the mod I had to make a couple of small manual edits to display.template.php for both themes

Code: (Find) [Select]
   global $context, $settings, $options, $txt, $scripturl, $modSettings;

Code: (Replace) [Select]
   global $context, $settings, $options, $txt, $scripturl,
         $modSettings, $topic;

because I have some other mods installed. Any ideas as to how I can get this to work for the Argentum2 theme?]]Thanks

Advertisement: