Announcement

Collapse
No announcement yet.

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

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

  • #46
    how would one make the events be pulled from this week or even this month?
    http://forums.cpfc.org/

    Comment


    • #47
      mess with the where clause of the sql query, and possibly $today.

      What do you Listen-To? http://www.listen-to.com

      i <3 vBulletin.

      Comment


      • #48
        Originally posted by mister
        mess with the where clause of the sql query, and possibly $today.


        mmm

        PHP Code:
        $today vbdate("Y-m-d",time()); 
        How do we make this a week?
        http://forums.cpfc.org/

        Comment


        • #49
          check out calendar.php

          you'll need to do something like this

          PHP Code:

            
          // Load the events for the month!
            
          $events=$DB_site->query("SELECT eventid, subject, eventdate, public
                             FROM calendar_events
                             WHERE eventdate
                             LIKE '
          $year-$doublemonth-%' AND ((userid = '$bbuserinfo[userid]' AND public = 0) OR (public = 1))"); 
          and then loop thru $events to the current week, etc..

          this hack is for the event of the day, and im pretty busy, or else i'd help further... sorry
          What do you Listen-To? http://www.listen-to.com

          i <3 vBulletin.

          Comment


          • #50
            Originally posted by mister
            check out calendar.php

            you'll need to do something like this

            PHP Code:

              
            // Load the events for the month!
              
            $events=$DB_site->query("SELECT eventid, subject, eventdate, public
                               FROM calendar_events
                               WHERE eventdate
                               LIKE '
            $year-$doublemonth-%' AND ((userid = '$bbuserinfo[userid]' AND public = 0) OR (public = 1))"); 
            and then loop thru $events to the current week, etc..

            this hack is for the event of the day, and im pretty busy, or else i'd help further... sorry
            Thanks - if you ever get the time I would really appreciate this hack to encompass more than a day as the coding is a little beyond me

            Dave
            http://forums.cpfc.org/

            Comment


            • #51
              just a gentle bump
              http://forums.cpfc.org/

              Comment


              • #52
                I tried to install this with no success.

                When i try to access my forum I get an error on line 79 of my index.php file.

                What did i do wrong?
                Last edited by CCarissa; Sat 28th Jul '01, 4:04pm.

                Comment


                • #53
                  paste line 79 of your code into a reply, and we'll see whats happening....
                  What do you Listen-To? http://www.listen-to.com

                  i <3 vBulletin.

                  Comment


                  • #54
                    Here's line 69....

                    PHP Code:
                       $birthdays $DB_site->query_first("SELECT template FROM template WHERE title='birthdays' and templatesetid = -2"); 
                    its a few lines under the new stuff......
                    PHP Code:
                      $birthdays gettemplate('birthdays',0,0);
                      
                    $btoday explode('|||',$birthdays);
                      
                    $today vbdate("Y-m-d",time()); 
                    I really appreciate people looking at this for me.
                    Last edited by CCarissa; Sun 29th Jul '01, 8:35pm.

                    Comment


                    • #55
                      can you also paste the error

                      (and did you mean line 69 or 79?)
                      What do you Listen-To? http://www.listen-to.com

                      i <3 vBulletin.

                      Comment


                      • #56
                        It was line 79......and darn it if i didnt save the error message. And i dont want to interrupt my users now.

                        Lets see if i can remember it. I think it was something like, "there is a parse error on line 79 of index.php"

                        Comment


                        • #57
                          ok well

                          you pasted line 69... i'd need to see line 79 if the error was on line 79


                          all you have to do to index.php is

                          after this:

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

                          PHP Code:
                          require('./todaysevents.php'); 


                          my guess is either you mistyped that, or there was a problem copy/pasting it.

                          also, make sure that todaysevents.php is in the same directory as index.php (the main vbulletin dir)
                          What do you Listen-To? http://www.listen-to.com

                          i <3 vBulletin.

                          Comment


                          • #58
                            Im still pretty sure i posted line 79. *confused*

                            Thanks. I'll try that tonight when the board isnt busy.

                            Comment


                            • #59
                              Originally posted by CCarissa
                              Here's line 69....
                              i think i was confused by that
                              What do you Listen-To? http://www.listen-to.com

                              i <3 vBulletin.

                              Comment


                              • #60
                                D'oh.....sorry, twas a typo

                                Comment

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