Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Event attendance Details »»
Event attendance
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-04-2004 Last Update: Never Installs: 164
 
No support by the author.

Request by: DaveLogic

With this hack when you create an event you can give the users an option to "register" to the event. Then you can view which people have registered to that event.

This could be used so you create an event and then other people notify that they will be attending to the event. You can then keep track of all the people that would be attending each event.

Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 09-29-2004, 01:26 PM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's the hard part--the pseudocode. It's the logic behind the code. That's where ideas on how to do something get tested, shot down, optimized and the like. The coding is the easy part once you have the logic. Then it's just a matter of making the chosen language do what the pseudocode dictates.
Reply With Quote
  #93  
Old 09-30-2004, 09:41 AM
Benj's Avatar
Benj Benj is offline
 
Join Date: May 2006
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dont have a clue how to do pseudocode sorry
Reply With Quote
  #94  
Old 10-04-2004, 07:55 AM
Benj's Avatar
Benj Benj is offline
 
Join Date: May 2006
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so................................
Reply With Quote
  #95  
Old 10-04-2004, 08:17 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SamirDarji
If someone writes out the pseudocode, I'd be willing to hack at it in my spare time.
Here's the psuedo SQL:

PHP Code:
$query "SELECT `eventid` , `userid` , `event` , `title` , `allowsmilies` , `recurring` , `recuroption` , `calendarid` , `customfields` , `visible` , `dateline` , `utc` , `dateline_from` , `dateline_to` , `useroll` , `roll`
FROM `" 
TABLE_PREFIX "event`
WHERE `roll` LIKE '%i:" 
$bbuserinfo['userid'] . ";s:" strlen($bbuserinfo['userid']) . ":\"" $bbuserinfo['username'] . "\"%' LIMIT 0, 30"
That would return all events that a user was attending.

Note that the SQL matches the entire user information, as performing wildcard LIKE's are never good because if we just did the userid we might match events that had the same number of attendees as the user id... or worse, if we compared on username, there may be a user named Rob and one named RobSmith and we'd match that.

So that's the SQL... and it works... so it shouldn't be too hard to write the rest

Please, when writing the rest, bear in mind whether the event is publicly viewable, i.e. that the calendar that it appears on is viewable.
Reply With Quote
  #96  
Old 10-04-2004, 10:03 AM
Benj's Avatar
Benj Benj is offline
 
Join Date: May 2006
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

legend
Reply With Quote
  #97  
Old 10-04-2004, 02:10 PM
MWetherspoon MWetherspoon is offline
 
Join Date: Mar 2004
Location: New Jersey
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question - does anyone know of any easy way to update the mod so that when a user signs up for an event, as opposed to just listing their post name, it actually uses their name as a link to their public profile?

For me that would be a handy feature as even organizers could easily pull the user info from the custom fields in the user profile that I have enabled on the site.

I'm going to play with it and see what I can come up with.

Thanks in advance!

- Mark
Reply With Quote
  #98  
Old 10-04-2004, 02:33 PM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
Several people have asked, and I had already sent them to one person, so I'll put them here, and if the hack author objects I'll remove them.

This is what I sent to the first person that asked:

In calendar.php the block of code you would have adjusted following:
PHP Code:
if (($show['candeleteevent'] OR $show['canmoveevent'] OR $show['caneditevent']) AND !$show['holiday']) 
I have this:
PHP Code:
    // HACK : START : ATTEND
    //if (($show['candeleteevent'] OR $show['canmoveevent'] OR $show['caneditevent']) AND !$show['holiday'])
    //{
    //  $show['eventoptions'] = true;
    //}
    //
    //eval ('$caldaybits .= "' . fetch_template('calendar_showeventsbit') . '";');

    
if (($show['candeleteevent'] OR $show['canmoveevent'] OR $show['caneditevent']) AND !$show['holiday']) {
      
$show['eventoptions'] = true;
    }

    if (
$eventinfo['useroll']) {
      
// Roll for this event
      
$show['userattending'] = false;
      if ((
$roll = @unserialize($eventinfo['roll'])) && is_array($roll)) {
        
uasort($roll"strnatcasecmp");
        if (
array_key_exists($bbuserinfo['userid'], $roll)) {
          
$show['userattending'] = true;
        }
        while (
$rollusername current($roll)) {
           
$rolluserid key($roll);
           eval(
'$rollbits .= "' fetch_template('calendar_rollbit') . '";');
           
next($roll);
        }
      } else {
        
$eventinfo['roll'] = "";
      }

      eval (
'$eventinfo[roll] = "' fetch_template('calendar_roll') . '";');
      
// End Roll
    
} else {
      
$eventinfo['roll'] = "";
    }

    eval (
'$caldaybits .= "' fetch_template('calendar_showeventsbit') . '";');
    
// HACK : END : ATTEND 
And then the calendar_rollbit becomes:
Code:
<li><a href="member.php?u=$rolluserid">$rollusername</a></li>
And the calendar_roll becomes:

Code:
<p><strong>People attending this event</strong>:</p>
<if condition="$rollbits">
<ul>
$rollbits
</ul>
<else />
<p><i>Nobody yet!</i></p>
</if>

<if condition="$bbuserinfo[userid] > 0">
<if condition="$show[userattending]">
	[<a href="calendar.php?$session[sessionurl]do=unattend&e=$eventinfo[eventid]">I will no longer be attending this event</a>]
<else />
	[<a href="calendar.php?$session[sessionurl]do=attend&e=$eventinfo[eventid]">I will be attending this event</a>]
</if>

</if>
Finally... find and correct the label title for the checkbox in the calendar_edit template... it should be:
Code:
<div><label for="cb_roll"><input type="checkbox" name="useroll" value="1" id="cb_roll" tabindex="3" $useroll />Allow users to specify that they will be attending this event.</label></div>
Some of that may not work in old versions of PHP, you'll have to try it and see
Here it is. This code doesn't include the duplicate member listing fix, so you'll have to implement that, but it's got everything else.
Reply With Quote
  #99  
Old 10-04-2004, 02:57 PM
MWetherspoon MWetherspoon is offline
 
Join Date: Mar 2004
Location: New Jersey
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a ton SamirDarji - I had missed that note in the post by buro9 that he had added the link to the profile in the Roll Call hack!

Installed and working great!

Now to go back and fix the duplicate member fix!
Reply With Quote
  #100  
Old 10-04-2004, 03:23 PM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I missed the fix to the unregistered user problem and spent a few good hours making the same fix. I would've hated to see you do the same.
Reply With Quote
  #101  
Old 10-04-2004, 08:07 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SamirDarji
Yeah, I missed the fix to the unregistered user problem and spent a few good hours making the same fix. I would've hated to see you do the same.
vBulletin.org needs CVS so that all such fixes can be rolled in by anyone rather than this hunting around hack threads thing!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04707 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete