vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [RELEASE v2] Today's Events on Main Forum Page (https://vborg.vbsupport.ru/showthread.php?t=21232)

Sascha 11-22-2001 09:28 AM

any changes in this Hack on vB 2.2.x ?

I can?t find:

PHP Code:

if ($displayloggedin) { 

in index.php


:confused:


Sascha

jamie 11-23-2001 09:16 AM

[stupid q]

where is the link to the todaysevents.php file?

[/stupid q]

:o

god bless

mister 11-23-2001 12:38 PM

https://vborg.vbsupport.ru/attachmen...&postid=141943

Thats the link to the attachment.
It was in one of my replies on page 3, i believe.
The link in the first post has been updated.
It still referenced vbulletin.com, not vbulletin.org

:)

jamie 11-23-2001 02:35 PM

:o

much appreciated! :)

Logtenberg 11-27-2001 04:22 AM

I am trying to make some slight html modifications to the code.


Unfortunately I do not know php so, I usually play around with the code until what I get what I need done. With this hack, I can't seem to figure out how to add some code after the events have been displayed.

Basically, - I want to have a "</td></tr></table>" to close up my "Today's Events"

I am used to code like

write.line "</tD></tr></table>"

What is the PHP equivalent?

I was thinking of adding this just above the last } in todaysevents.php

Thanks For your help! :)

kyrnel 11-29-2001 12:46 AM

First of all, great hack!, thanks Mister..

I modified the hack to display events for the next two weeks by modifying the SQL query to this:
Code:

SELECT eventid, subject, eventdate, public
FROM calendar_events
WHERE (eventdate >= '$today' AND eventdate <= DATE_ADD('$today', INTERVAL 14 DAY)) AND ((userid = '$bbuserinfo[userid]') OR (public = 1))
ORDER BY eventdate

I also modified the hack to display "None" if there are no events found. You just have to add an 'else' clause to the If/Then statement.
Im running into 2 problems. (1) The function designed to remove the trailing commas does not seem to work. The code is this:
Code:

$todaysevents = substr($todaysevents,0,strlen($todaysevents)-2);
This doesnt seem to do anything at all because I have modified it and nothing changes. Any ideas?

(2) The other problem is based on a further modification of this hack. I wanted to separate Todays Events from Upcoming Events so I made separate variables to represent todays events and events from today+1 until today+14days. The problem is that it doesnt work. All the code makes sense to me except I can't figure out where $caltitlelength comes from. Im reusing that variable in both If/then statements. That may be the problem, but I dont understand the variables source or purpose so I cant modify it to suit my needs. Any help there would be greatly appreciated. I'd be happy to post the modified code if that will help.

Thanks

kyrnel 11-29-2001 01:15 AM

I just realized another problem with modifying this hack to display events in the near future. Birthdays aren't stored in the calendar_events table. So to display ALL events in the near future (for whatever time period) you will have to query calendar_events AND users and concantenate events from both queries. I'm afraid this is beyong my PHP abilities, I still can't figure out how to concantenate two simple string values much less two recordsets.
I could probably throw a poor hack together reusing Mister's code if I can figure out what $caltitlelength is.

RobAC 11-29-2001 02:07 AM

Kyrnel,

If you finally get this working, let me know. I've been wanting to display events ahead of time on my own forums.

kyrnel 11-29-2001 01:33 PM

Quote:

Originally posted by RobAC
Kyrnel,

If you finally get this working, let me know. I've been wanting to display events ahead of time on my own forums.

I dodnt have any trouble only displaying events from a longer period of time. See my first post, all you have to do is modify the SQL SELECT query in todaysevents.php. You can use the number 14 to display the next 2 weeks or change that number to any number of days from today.

What I can;t get it to to is show 2 separate lines of events, one for todays events and another for upcoming events, and this hack does not show birthdays at all, because they are not stored in the calendar_events table but rather just in the user's profile.

I am working on figuring this out. I think I can make it work if I can figure out what $caltitlelength is.

I'm planning on adding some more features to it too, like an option in the user's options to display upcoming events or not and maybe how long into the future they want them to be displayed (just today, 1 week, 2 weeks, 1 month).

I'll post as soon as I have something.

RobAC 11-29-2001 01:41 PM

Awesome! Thanks! :)


All times are GMT. The time now is 02:22 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.01243 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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