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)
-   -   Mini Calendar from vbPortal (https://vborg.vbsupport.ru/showthread.php?t=32087)

Tigga 11-02-2002 03:21 PM

[QUOTE]Originally posted by GamerForums
Any idea how to make this work with vBindex?

FleaBag 11-03-2002 08:50 PM

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.

NTLDR 11-03-2002 09:03 PM

Search the vBindex thread, I know this calendar was talked about there and i think I posted instructions on how to add it.

Tigga 11-03-2002 11:07 PM

Gamerforums - Check your PM's. I sent you the template for the calendar, so hopefully that'll help. :)

lifesourcerec 01-15-2003 06:14 AM

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! :cool:

Now, which file is this referring to?

lifesourcerec 01-15-2003 09:05 AM

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) . "...";
                }
            } 


PennylessZ28 02-19-2003 01:17 PM

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?

PennylessZ28 02-19-2003 01:52 PM

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.

catocom2 03-20-2003 11:28 AM

Cool Hack!
Thanks
and thanks to Jakeman, and Megabit for the instruction. :cool:

catocom2 03-21-2003 09:11 PM

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?


All times are GMT. The time now is 12:04 PM.

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.01190 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)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