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
  #62  
Old 11-02-2002, 03:21 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by GamerForums
Any idea how to make this work with vBindex?
Reply With Quote
  #63  
Old 11-03-2002, 08:50 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I took a look at your code but wasn't sure how to port that into vBindex 'cos I didn't look at your templates.
Reply With Quote
  #64  
Old 11-03-2002, 09:03 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Search the vBindex thread, I know this calendar was talked about there and i think I posted instructions on how to add it.
Reply With Quote
  #65  
Old 11-03-2002, 11:07 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gamerforums - Check your PM's. I sent you the template for the calendar, so hopefully that'll help.
Reply With Quote
  #66  
Old 01-15-2003, 06:14 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jakeman
i got the 'No Events Today' condition working. instructions for those that want to add this:

find:

Code:
while ($event=$DB_site->fetch_array($events)) {
  if ($event[eventdate]==vbdate("Y-m-d",time())) {
    $eventsubject=htmlspecialchars($event[subject]);
    $todaysevents.="
		<li><smallfont><b><a href=\"$bburl/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=$event[eventid]\">$eventsubject</a></b></smallfont></li>";
  }
}
after it add this:

Code:
if (!$todaysevents) {
    $todaysevents="<li><smallfont><b>No Events Today</b></smallfont></li>";
    }
i did it all by myself! woo woo!
Now, which file is this referring to?
Reply With Quote
  #67  
Old 01-15-2003, 09:05 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This the only code I see close to it

PHP Code:
while ($event=$DB_site->fetch_array($events)) {
            
$eventsubject =  htmlspecialchars($event[subject]);
            if (
$caltitlelength != and isset($caltitlelength)!=0)
            {
                if (
strlen($eventsubject) > $caltitlelength)
                {
                    
$eventsubject substr($eventsubject,0,$caltitlelength) . "...";
                }
            } 
Reply With Quote
  #68  
Old 02-19-2003, 01:17 PM
PennylessZ28 PennylessZ28 is offline
 
Join Date: Mar 2002
Location: North America
Posts: 737
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Megabit
Minifreunde...

In testing, I was able to get this working with Vbindex. Basically here is a method that worked in my test (much of which is contained within this thread)...
[list=1][*]Create a new template called "small_calendar"
[*]Cut and paste the included template from the cal.php.txt file script into the new "small_calendar" template that you created. Save the cal.php.txt file with all of the template text removed (all that should be left is what is between the<?php and ?> on the first and last lines of the text file).
[*]Rename the cal.php.txt to cal.php and copy it to your forums directory.
[*]Run the cal.php file (from your forums directory) in your browser. Make sure that the file works - and displays a calendar. If the calendar does not display here, you'll need to figure out the problem before proceeding (if it doesn't work here, it won't work when you go to display it on your Vbindex home page.
[*]Replace the following text in the cal.php file:
eval("dooutput(\"".gettemplate(small_calendar)."\" );"); with
eval("\$smallcalendar .= \"".gettemplate("small_calendar")."\";");
[*]Remove the following line from cal.php file (for it to work properly): include global.php.
[*]Perform the following edits, based on Jakeman's suggestions, so that the Big VB Calendar will continue to work (this essentially removes the phpinclude template from the calendar pages):

Copy the global.php to a new file called calglobal.php.

Edit the calglobal.php file and remove (or comment out) the line that is just under the Parse PHP include statement.

Edit the calendar.php file (provided by Vbulletin) and change the require statement (on line 7) from global.php to calglobal.php.
[*]Edit the "phpinclude" template (this template comes with VBulletin) - and add the text include 'cal.php'; to it - and be sure to save the template. This will allow the calendar to be used in any of the Vbindex templates.[/list=1]
Now, you need to decide where to display the calendar. I tested it in the "home_right" template that you create as part of the Vbindex installation - but you could easily put it in the "home_left" template as well. You'll need to edit the template and set up the code (you'll need to know a little HTML) to display the calendar. Just put in $smallcalendar wherever you want the calendar to display.

Important Note:
I found that I had to shrink the default calendar down to fit into the right column. To do this, I had to edit the "small_calendar" template (where I added the font face and size specifications, as well as changed the width).

If you need some more specific info on how I edited the "home_right" and "small_calendar" templates to fit it all in, let me know (note that I'd encourage you to play with the settings in these templates to make it look the way that you'd like it - as you could use a variety of choices here).

Hope this helps you to try it out on your Vbindex home page.
Followed your directions to the tooth.... but

I am geting
Quote:
Parse error: parse error, unexpected T_IF in /disk3/home2/web/beginner/fbody/forum/global.php(304) : eval()'d code on line 10
At the top of my forum and vbindex pages.

The cal.php file works fine in /forum/ however outside of the forum page it does not.

Any suggestions?
Reply With Quote
  #69  
Old 02-19-2003, 01:52 PM
PennylessZ28 PennylessZ28 is offline
 
Join Date: Mar 2002
Location: North America
Posts: 737
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright when I removed the include from the phpinclude, my error went away. However I still couldn't get it to show up with vbindex.

I have the most recent version of vbulletin 2.3 and vbindex.

So here is what I did, I opened up the vbindex file and added

require('./cal.php');

right underneath require('./global.php');

Then I inserted $calendar in a spot in my home template.

This of course after already doing some of the things you said to do. for anyone following along, I suggest you go read the vbindex thread as well, I spent some time reading both of these and after tinkering I got it to work.
Reply With Quote
  #70  
Old 03-20-2003, 11:28 AM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool Hack!
Thanks
and thanks to Jakeman, and Megabit for the instruction.
Reply With Quote
  #71  
Old 03-21-2003, 09:11 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I thought I had this one set.
Everything seems to be working great, except when I
try to download attachments. I get these errors...

Code:
Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120) 
in /home/threadwo/public_html/forum/attachment.php on line 54

Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120)
in /home/threadwo/public_html/forum/attachment.php on line 55

Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120)
in /home/threadwo/public_html/forum/attachment.php on line 56

Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120)
in /home/threadwo/public_html/forum/attachment.php on line 57

Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120)
in /home/threadwo/public_html/forum/attachment.php on line 58

Warning: Cannot add header information - headers already sent by 
(output started at /home/threadwo/public_html/forum/cal.php:120)
in /home/threadwo/public_html/forum/attachment.php on line 62
(then some jiggerish, depending on what the file is)

If I disable the minical, the attachments d/l fine.
Also the upload is fine.

Anybody have any ideas?
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 06:45 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.06854 seconds
  • Memory Usage 2,324KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_php
  • (3)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
  • (4)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