vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Event attendance (https://vborg.vbsupport.ru/showthread.php?t=63460)

PranK 04-06-2004 02:43 PM

Quote:

Originally Posted by ChurchMedia
Quick request: I'd like the attendee's user names to link to their profiles -- so members can easily contact each other. Is that a hard mod?

Again, great hack!

would be very easy to do.. but i dont want to modify and display code thats not mine.

I'll leave it to the hacker to mod/display.

Christian

buro9 04-06-2004 08:35 PM

Quote:

Originally Posted by Kentaurus
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.

This is a fantastic hack, and I've installed straight away.

Done a few modifications locally and if the author wants me to post them, just nod :) I don't like stomping on others hacks beyond giving support... these are features though so let me know if you want them.

The changes I've done are:
* Case in the event template to prevent guests from adding attendance (Google Spiders).
* Sorted the $roll array using natural sorting to make it more readable when it's large
* Add links through to the member profile page of the members in the $rollbits
* Corrected the HTML label in the edit template so that it functions

Erm, think that's all. Nothing too difficult as you've done such a stunning job already :)

WreckRman2 04-09-2004 02:42 AM

Quote:

Originally Posted by buro9
This is a fantastic hack, and I've installed straight away.

Done a few modifications locally and if the author wants me to post them, just nod :) I don't like stomping on others hacks beyond giving support... these are features though so let me know if you want them.

The changes I've done are:
* Case in the event template to prevent guests from adding attendance (Google Spiders).
* Sorted the $roll array using natural sorting to make it more readable when it's large
* Add links through to the member profile page of the members in the $rollbits
* Corrected the HTML label in the edit template so that it functions

Erm, think that's all. Nothing too difficult as you've done such a stunning job already :)

I'd like to see those changes if you don't mind as I am trying to do most of those already. Could you email them to "removed".

buro9 04-09-2004 07:11 AM

Quote:

Originally Posted by IndyWebDesign
I'd like to see those changes if you don't mind as I am trying to do most of those already.

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 :)

WreckRman2 04-09-2004 08:32 PM

Thanks! Could you edit your post and take out my email? I edited mine because if not I'll get blasted with spam. :)

Ted S 04-09-2004 08:48 PM

Awesome! Thank you, thank you, thank you!

buro9 04-15-2004 07:57 AM

Quote:

Originally Posted by Kentaurus
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.


There is a small bug, here is the description and fix for it.

If you have multiple events on the same day using the event attendance hack, and then view the day via the calendar... which lists all events on that day.

In this scenario the roll from event 1 is added to event 2, and 1 + 2 are added to event 3.

This occurs because a loop in calendar.php does not unset the rollbits HTML each time it starts processing a new event.

The fix is to find within calendar.php this:
PHP Code:

if ($eventinfo['useroll']) { 

And change it to this:
PHP Code:

if ($eventinfo['useroll']) {
  unset(
$rollbits); 

This will nuke the variable that contains the HTML of the rollbits from the last event, thus ensuring that attendees aren't appearing at events that they didn't mark themselves as attending.

Cheers

David K

Hugme1 04-15-2004 10:24 AM

Ihave one problem.

I have completely no idea at all how to create templates that are need.

All help I have found so far, don't actually tell u how to do it.

IE the

################################################## ###########
# New template: calendar_roll
################################################## ###########

and

################################################## ###########
# New template: calendar_rollbit
################################################## ###########

DaveLogic 04-15-2004 11:08 AM

Quote:

Originally Posted by Hugme1
Ihave one problem.

I have completely no idea at all how to create templates that are need.

All help I have found so far, don't actually tell u how to do it.

IE the

################################################## ###########
# New template: calendar_roll
################################################## ###########

and

################################################## ###########
# New template: calendar_rollbit
################################################## ###########

Vbulletin Admin > Styles & Templates (lefthand side nav) > Change All style options to Add Template > Type in template name (i.e calendar_roll) > Copy & paste html from txt file in and SAVE....

Hugme1 04-15-2004 07:35 PM

Now the only problem i have is the 2 PHP files won't work

I have had to upload the original version :o

DOH!!!!

Just ignore me, I'm was having a blonde moment


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01238 seconds
  • Memory Usage 1,778KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete