Version: , by wajones
Developer Last Online: Apr 2014
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.
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.
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.
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.