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 wajones wajones is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-02-2001 Last Update: Never Installs: 50
 
No support by the author.

As requested, here is the small calendar from vbPortal.
I want to also give credit to one of my users "rabidmoogle" for help in optimizing my original hack.

It's a standalone file, with the template included for testing.
1. Create a new template called "small_calendar"
2. Cut and paste the included template from the script into the new template.
3. rename the cal.php.txt to cal.php and copy it to your forums directory and run to test.
4. Cut and paste the code between the <?php and ?> to the location of your choice to use in another script.

Show Your Support

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

Comments
  #72  
Old 03-21-2003, 09:46 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well,
it seems I do have some other problems.
I'm gonna have to backup through the stagged backups
I've made, and see if I can see where the other problems
are coming from.
Reply With Quote
  #73  
Old 05-07-2003, 03:26 PM
pdatoon pdatoon is offline
 
Join Date: Nov 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
10-23-02 at 09:32 AM SpankMe said this in Post #59
Just installed this hack on my newly started Kiwi Biker forums . It going to be an excellent tool for help users keep track of current and furture motorbike events.

Hazaar to wajones

Hi man,

I have seen that you had Event today and Coming events listed at the bottom of the small calendar. Could you tell me how you do that? Mine just have the calendar :surprised:
Reply With Quote
  #74  
Old 05-08-2003, 09:11 AM
pdatoon pdatoon is offline
 
Join Date: Nov 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #75  
Old 05-24-2003, 08:39 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Guys, how is it with 2.3?
Reply With Quote
  #76  
Old 06-15-2003, 03:24 PM
CatholicSin CatholicSin is offline
 
Join Date: Jun 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am curious, what does this error message mean (what did I do wrong with my install?) if anyone can help it would be great.


Quote:
Fatal error: Call to undefined function: vbdate() in /home/lochlain/domainname/docs/TMP3lgljgj6wr.php on line 141
Reply With Quote
  #77  
Old 06-30-2003, 03:33 AM
mbowers mbowers is offline
 
Join Date: Jun 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed this (w/ myvbindex) - pretty cool hack. Just wondering, where it shows today's event underneath the calendar, is it possible to have that text change when you rollover other dates that have events posted? Like, let's say it's Thursday, and Thursday is user BoBo's birthday. On Friday, someone has posted a calendar event for BoBo's birthday party. If you rollover Friday's date, the text changes from "Today's Events: BoBo's Birthday!" to "Events for Friday, June 27th: BoBo's Birthday Party"...

...you get the idea..

Mbow
Reply With Quote
  #78  
Old 08-02-2003, 11:34 PM
bosix's Avatar
bosix bosix is offline
 
Join Date: Jun 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
01-31-02 at 10:18 PM sccr410 said this in Post #31
Do you have it in the 'forum' directory? I just installed this hack ( http://www.sandiegopegasus.com ) and it worked perfectly.


puff anyone help me

I showing my calender non-vbpage like http://www.sandiegopegasus.com site.

my calender showing cal.php www.electronicafe.com/forum/cal.php

and future events show smp: in 15 days birthdays & public events


Sorry My english bad
Reply With Quote
  #79  
Old 12-18-2003, 08:45 PM
Russ_T Russ_T is offline
 
Join Date: Jun 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok its been working fine with myvbindex for a while now but I would like to change it so instead of showing todays events, it shows upcoming events (and I specify in my php say the next fortnight).

I've tried to do this myself but to no avail, anyone fancy working with me on it? I think it would be a good change to the mod (if wajones is too busy to help of course).

Thanks for the mod wajones!
Reply With Quote
  #80  
Old 12-19-2003, 04:43 AM
WeBBy WeBBy is offline
 
Join Date: Jun 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this calendar on a site I am building and I love it! It was just the ticket I needed....

But, I did notice that many of my errors (doin allot of mods), all have this "// End of vbPortal calendar script" showing up, even though the script may not even be called at the time. Anyway, that I can live with and so I forgot about it.

You can check it out by simply going to http://www.basementsystems.com/dealerarea/. You get an error because the index.php file needs a specific template in order to work. The actual error is no template for the index.php to use, so blank page. But why the cal script end comment????

Now, I installed the OakGalley hack and I cannot upload any images. The reason seems to be the cal.php script. This is the error I am getting:

Warning: Cannot modify header information - headers already sent by (output started at /home3/www/basementsystems/dealerarea/cal.php:121) in /home3/www/basementsystems/dealerarea/gallery/upload_handle.php on line 108

So, it would seem that cal.php is running in the background or something. I also noticed, about the time I installed the script, that pages will not auto-redirect anymore (haven't tried to fix that yet), but now I am thinking that maybe this is all inter-related.

Any ideas? Any help?

Thanx

EDIT: IGNORE THIS POST (I really should just delete this post but maybe someone is as stupid as I am and will be helped by it). Removing the end comment "<-- End of vbPortal calendar script" solved the whole problem. What a dumb ass .. lol :O
Reply With Quote
  #81  
Old 12-26-2003, 11:10 PM
Russ_T Russ_T is offline
 
Join Date: Jun 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok heres my little contribution. It's a quick and dirty fix but it's the only way I could think to do it using the current structure and not knowing any sql didn't help. I really need a book.

Ok in index.php replace

Quote:
// vbPortal mini calendar - by wajones
if ($showcalendar) {
$year = date('Y');
$doublemonth = vbdate('m',time());
$month = date('n');
$day = '1';
$today = vbdate('m-d',time());
$events=$DB_site->query("SELECT eventdate,subject,eventid,public FROM calendar_events WHERE eventdate LIKE '$year-$doublemonth-%' AND ((userid='$bbuserinfo[userid]' AND public='0') OR (public='1'))");
while ($event=$DB_site->fetch_array($events)) {
if ($showtodaysevents AND $event[eventdate]==vbdate('Y-m-d',time())) {
$eventsubject = htmlspecialchars($event['subject']);
if ($event['public']=='1') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calpubliccolor}\">$eventsubject</smallfont></a></li>";
}
if ($event['public']=='0') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calprivatecolor}\">$eventsubject</smallfont></a></li>";
}
eval("\$eventstoday = \"".gettemplate('index_calendar_todaysevents')."\" ;");
}
}
if (!$bbuserinfo['startofweek']) {
$bbuserinfo['startofweek'] = '1';
}

with


Quote:
if ($showcalendar) {
$year = date('Y');
$doublemonth = vbdate('m',time());
$month = date('n');
$day = '1';
$today = vbdate('m-d',time());
$events=$DB_site->query("SELECT eventdate,subject,eventid,public FROM calendar_events WHERE eventdate LIKE '$year-$doublemonth-%' AND ((userid='$bbuserinfo[userid]' AND public='0') OR (public='1')) ORDER BY eventdate");
while ($event=$DB_site->fetch_array($events)) {
$thetime = time();
for ($i = 0; $i < 14; $i++) {
if ($showtodaysevents AND $event[eventdate]==vbdate('Y-m-d',$thetime)) {
$eventsubject = htmlspecialchars($event['subject']);
if ($event['public']=='1') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calpubliccolor}\">$eventsubject</smallfont></a></li>";
}
if ($event['public']=='0') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calprivatecolor}\">$eventsubject</smallfont></a></li>";
}
eval("\$eventstoday = \"".gettemplate('index_calendar_todaysevents')."\" ;");
}
$thetime = $thetime + 86400;
}
}
if (!$bbuserinfo['startofweek']) {
$bbuserinfo['startofweek'] = '1';
}

$enddate = time() + 1209600;
$doublemonth = vbdate('m',$enddate);
$year = vbdate('Y',$enddate);

$events=$DB_site->query("SELECT eventdate,subject,eventid,public FROM calendar_events WHERE eventdate LIKE '$year-$doublemonth-%' AND ((userid='$bbuserinfo[userid]' AND public='0') OR (public='1')) ORDER BY eventdate");
while ($event=$DB_site->fetch_array($events)) {
$thetime = time();
for ($i = 0; $i < 14; $i++) {
if ($showtodaysevents AND $event[eventdate]==vbdate('Y-m-d',$thetime)) {
$eventsubject = htmlspecialchars($event['subject']);
if ($event['public']=='1') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calpubliccolor}\">$eventsubject</smallfont></a></li>";
}
if ($event['public']=='0') {
$todaysevents .= "<li><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\"><smallfont color=\"{calprivatecolor}\">$eventsubject</smallfont></a></li>";
}
eval("\$eventstoday = \"".gettemplate('index_calendar_todaysevents')."\" ;");
}
$thetime = $thetime + 86400;
}
}

if (!$bbuserinfo['startofweek']) {
$bbuserinfo['startofweek'] = '1';
}

$year = date('Y');
$doublemonth = vbdate('m',time());
$events=$DB_site->query("SELECT eventdate,subject,eventid,public FROM calendar_events WHERE eventdate LIKE '$year-$doublemonth-%' AND ((userid='$bbuserinfo[userid]' AND public='0') OR (public='1')) ORDER BY eventdate");
while ($event=$DB_site->fetch_array($events)) {}
Then just alter the index_calendar_todaysevents template to read something like

Next fortnight's events

instead of

Today's events


And that should work fine.

BUT this horrid work around adds two more queries to your home page and is generally horrid. Now can someone with some skill and time turn that code into something pretty please?

All credit to wajones for the original code for me to hack about though. Thank you.


(working demo at http://www.zclub.net )
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 11:02 AM.


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.05463 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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