Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by mister mister is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-24-2001 Last Update: Never Installs: 72
 
No support by the author.

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)
https://vborg.vbsupport.ru/showthrea...943#post141943

Show Your Support

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

Comments
  #62  
Old 08-04-2001, 03:14 PM
sysmom sysmom is offline
 
Join Date: Oct 2001
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it just me, or is there only one event allowed per date?

I don't know if it might be related to the Today's Event addition, but I suspect it isn't.

I try to add a second event to the calendar, it takes the place of the first, the previous one does not appear on either the calendar, or the Today's Events listing.

I upgraded to vb2.03 the other day, if that matters. Although I don't recall scheduling more than one thing before anyway.

-deb
Reply With Quote
  #63  
Old 08-05-2001, 10:34 AM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just tested it out on my board

2.0.3 w/this todays-events hack.

worked fine.

two events.
both on calendar
both on main page

maybe re-upload calendar.php, make sure you have 2.0.3's version (not to say it isnt there already...but just in case)
Reply With Quote
  #64  
Old 08-22-2001, 12:19 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed v4. first time using this hack. works great.

two comments:
1) it would be nice to have a condition where if there are no events for that day it says 'none', or something to that effect.
2) i too would like to have this functionality in my header. i didn't see any 'how to' things in this thread for that.

on the same note. what php file controls functionality in the header?
Reply With Quote
  #65  
Old 08-22-2001, 01:47 AM
butty butty is offline
 
Join Date: Nov 2001
Location: manchester, uk
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what a great hack, a doddle to install and so effective

good work!!!
Reply With Quote
  #66  
Old 08-22-2001, 03:56 AM
sysmom sysmom is offline
 
Join Date: Oct 2001
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jakeman:

I did move it to the header, and regretted it.

Although it works FINE in displaying the event for that day, it 'breaks' your calendar, and you can only have one event per day, the last one that was entered.

I suspect a variable is being tromped on, but I haven't looked into it.

So, when I did the 2.03 update, I didn't put it back in the header, and I'm ... gonna get around to it someday, but I don't think I have the luxury of breaking two events on any day just now.

-deb
Reply With Quote
  #67  
Old 11-02-2001, 07:43 PM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone else had any luck moving this functionality into the header?
Reply With Quote
  #68  
Old 11-03-2001, 08:37 PM
TheCaver TheCaver is offline
 
Join Date: Oct 2001
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone gotten this to display the next WEEKS events? or next MONTHS events?

Its a GREAT hack, but to me, telling someone that there is an event today is a bit late

JC
Reply With Quote
  #69  
Old 11-04-2001, 01:21 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i agree.

what would be pimp is to have a stand alone hack for a calendar like vbportal's calendar. http://www.phpportals.com/
Reply With Quote
  #70  
Old 11-04-2001, 02:08 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hoorj! https://vborg.vbsupport.ru/showthrea...threadid=32087
Reply With Quote
  #71  
Old 11-08-2001, 02:50 AM
TheCaver TheCaver is offline
 
Join Date: Oct 2001
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I modified this to show the next months events but when I click on an event, it does not show the date in the calendar template.

I know, this should be over at vb.com but they said come here!

Anyone know how to hack the date into the calendar template to show what day you are looking at?

Thanks much,

JC
Reply With Quote
  #72  
Old 11-22-2001, 09:28 AM
Sascha Sascha is offline
 
Join Date: Oct 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any changes in this Hack on vB 2.2.x ?

I can?t find:

PHP Code:
if ($displayloggedin) &#123; 
in index.php





Sascha
Reply With Quote
  #73  
Old 11-23-2001, 09:16 AM
jamie jamie is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[stupid q]

where is the link to the todaysevents.php file?

[/stupid q]



god bless
Reply With Quote
  #74  
Old 11-23-2001, 12:38 PM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
  #75  
Old 11-23-2001, 02:35 PM
jamie jamie is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



much appreciated!
Reply With Quote
  #76  
Old 11-27-2001, 04:22 AM
Logtenberg Logtenberg is offline
 
Join Date: Nov 2001
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply


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 08:10 PM.


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.14115 seconds
  • Memory Usage 2,378KB
  • Queries Executed 30 (?)
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
  • (9)bbcode_php
  • (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
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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