Announcement

Collapse
No announcement yet.

[RELEASE v2] Today's Events on Main Forum Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE v2] Today's Events on Main Forum Page

    my first hack, enjoy...

    Today's Events on Main Forum Page
    Hack Version: 4

    Description:
    Lists today's events on the main page, under the Online Users & Birthdays (both public, and private events).
    *Version 2 adds the ability to list either bulleted or linear
    *Version 3 uses the users timezone adjusted date, rather than the servers date
    *Version 4 fixes a type-o on line 47ish, and adds one bit of instruction if using the bulleted list, rather than linear

    Files to Add: todaysevents.php
    Files to Edit: index.php
    Templates to Edit: forumhome_loggedinusers
    Templates to Add: calendar_privateevent_linear, calendar_publicevent_linear
    Demo:
    Bulleted:

    Linear:


    upgrade from version 2:
    0) backup necessary files
    1) upload new todaysevents.php
    2) done

    upgrade from version 2:
    0) backup necessary files
    1) upload new todaysevents.php
    2) done

    upgrade from version 1:
    0) backup necessary files
    1) upload new todaysevents.php
    2) add 2 templates
    (NOTE: there is an important space after the comma at the end, and an extra space in {calpubliccolor } and {calprivatecolor })

    calendar_publicevent_linear
    PHP Code:
    <a href="calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$eventid"><smallfont color="{calpubliccolor }">$eventsubject</smallfont></a>, 
    calendar_privateevent_linear
    PHP Code:
    <a href="calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$eventid"><smallfont color="{calprivatecolor }">$eventsubject</smallfont></a>, 
    3) edit todaysevents.php to either show bulleted or linear events (comment or uncomment the corresponding eval statement)
    4) done



    First Time Installation:
    0) backup everything, just in case
    1) upload todaysevents.php to your main vbulletin directory
    2) edit index.php
    after this:

    PHP Code:
    if ($displayloggedin) { 
    add this:

    PHP Code:
    require('./todaysevents.php'); 
    3) edit the 'forumhome_loggedinusers' template
    change this:
    PHP Code:
    $birthdaybits</smallfont></td

    to this:
    PHP Code:
    $birthdaybits
    $todaysevents
    </smallfont></td
    4) add 2 templates
    (NOTE: there is an important space after the comma at the end, and an extra space in {calpubliccolor } and {calprivatecolor })

    calendar_publicevent_linear
    PHP Code:
    <a href="calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$eventid"><smallfont color="{calpubliccolor }">$eventsubject</smallfont></a>, 
    calendar_privateevent_linear
    PHP Code:
    <a href="calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$eventid"><smallfont color="{calprivatecolor }">$eventsubject</smallfont></a>, 
    5) edit todaysevents.php to either show bulleted or linear events (comment or uncomment the corresponding eval statement, and the line near the end doing the substr)

    6) All done.


    one person downloaded version 4, i didnt test my change, and forgot to comment out a line.
    line 10 needs comments for that one person who downloaded the bad version 4

    this one is fixed, fyi (its at the bottom somewhere)
    http://www.vbulletin.com/forum/showt...943#post141943
    Last edited by mister; Fri 20 Jul '01, 8:56am.
    What do you Listen-To? http://www.listen-to.com

    i <3 vBulletin.

  • #2
    cool

    demo??

    cool hack

    Comment


    • #3
      Nice concept, and I am sure a good hack also

      @ Balbanes: what do you need a demo for? There is a screenshot and description showing that it lists todays events in the calendar in a similar fashion to online users/birthdays.
      HP DL-380 G6, 2x E5520, 28GB RAM, 4x300GB SAS, VMWare ESXi
      -
      Unreal Tournament : Assault forums - irc://irc.utassault.net:6667 -

      Comment


      • #4
        i just added the screenshot after he requested it
        What do you Listen-To? http://www.listen-to.com

        i <3 vBulletin.

        Comment


        • #5
          Looks interesting I might have to try this out!

          thanks!

          Comment


          • #6
            Thank you so much for making this hack!!! I was using a piece of code from Wajones' vbportal a while back, but couldn't get it to work after upgrading to 2.0.0 (I'm now on 2.01) I'm still learning PHP, so I'm sure it was a user error on my part!

            Thanks so much!
            TigerLily
            Last edited by TigerLily; Mon 25 Jun '01, 8:28am.

            Comment


            • #7
              Question: Is there a way to remove the bullet and have the event on the same line as "Today's Events"? I use mine at the top of my forums, and would love to save as much space as possible.
              Thanks again!
              TigerLily

              Comment


              • #8
                Yea.
                I just did this real quicky, and used the same template used in the calendar. I may change this for v2.0 just because it will save alot of space.
                What do you Listen-To? http://www.listen-to.com

                i <3 vBulletin.

                Comment


                • #9
                  Thanks Brandon! This is just what I've been looking for.

                  One question: I assume the 'private' events will only show for the owner of that event, correct?
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    that is correct.

                    private events show only to their owner
                    What do you Listen-To? http://www.listen-to.com

                    i <3 vBulletin.

                    Comment


                    • #11
                      Oh, I already gushed over this in my requests thread, but let me gush here, too!

                      Thank you!

                      My only question before I try this is ...

                      If I don't have birthdays enabled, will it still work?

                      -deb

                      P.S. Thank you so much. I'm in awe.

                      *gush*

                      Comment


                      • #12
                        it wont show up if you have 'show logged in users' off.

                        (i didnt feel liek going all out and having a separate config option...so i put it in with the 'show logged in users' option)
                        What do you Listen-To? http://www.listen-to.com

                        i <3 vBulletin.

                        Comment


                        • #13
                          Mister:

                          You had great instructions, the installation went perfect, and it's now working at our new board.

                          I may play around with the placement on the main page -- I'll let you know if I can't figure that out.

                          The only other thing I'd could possibly ask for it to do is flag a reminder for an event tomorrow.

                          Thanks so much, this is GREAT!!

                          Kudos!

                          Props!

                          Wild Cheering!

                          -deb

                          Comment


                          • #14
                            Worked great! The only thing is that I tried to add $todaysevents to my forumhome_pmloggedin template but it doesn't show. The reason I did this is because I have the Private Messages box at the top of the forum page and would like to have Today's Events there as well. I don't really want the Currently Active Users at the top of the page though.

                            If you're still bored, could you tell me how to do this?

                            Oh and one other thing - I noticed that the event for today stopped displaying when the server's time went past midnite. It looks like this isn't tied into the users time like $birthdaybits is. (Today's birthday still displayed.)

                            Thanks again!
                            Last edited by Steve Machol; Mon 25 Jun '01, 8:57pm.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #15
                              I think I love you!

                              I've been waiting for this... the girls on my board have been asking for this for a while...

                              Now I'm off to set it up....

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X