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)
-   -   [RELEASE v2] Today's Events on Main Forum Page (https://vborg.vbsupport.ru/showthread.php?t=21232)

mister 11-29-2001 04:28 PM

Don't write anything from the php files.
Use the vbulletin template system.

Put the html you want in 'forumhome_loggedinusers' template.

kyrnel 11-30-2001 02:05 AM

Mister,

What is the purpose of this code:
Code:

if ($caltitlelength != 0 and isset($caltitlelength)!=0)
{
    if (strlen($eventsubject) > $caltitlelength)
    {
          $eventsubject = subst($eventsubject,0,$caltitlelength) . "...";
    }
}

I can't see that $caltitlelength is ever given a value. Is it set in another php file? If so what file?

Also, Im close to finishing my mod to this hack. I have successfully combined member's birthdays to upcoming events using a SQL UNION query. I am going to add the following options to the User CP: "Display Today's Events on Home Page: (Checkbox: Yes/No)", "Display Upcoming Events: (no, one week, two weeks, one month)". These settings will be used to determine if/what to display on the main page. Still trying to make the substr function work.
Anyone have any ideas why it is NOT removing the trailing commas? Is it working for anyone else?

Thanks,
Kyrnel

kyrnel 11-30-2001 02:35 AM

ROFL
I just figured out why the substr function wasn't removing the trailing commas. I had the "Add template name in comments" option set to Yes. So the substr function was trimming the last two characters of the HTML comment showing the template name. This is potentially dangerous becasue the close comment tag was altered expanding how much HTML was commented out.
If you tried this hack with Template names enabled and a section of your page disappeared, now you know why.

heh

Logtenberg 01-03-2002 12:31 AM

Quote:

Originally posted by kyrnel
I dodnt have any trouble only displaying events from a longer period of time. See my first post, all you have to do is modify the SQL SELECT query in todaysevents.php. You can use the number 14 to display the next 2 weeks or change that number to any number of days from today.

What I can;t get it to to is show 2 separate lines of events, one for todays events and another for upcoming events, and this hack does not show birthdays at all, because they are not stored in the calendar_events table but rather just in the user's profile.

I am working on figuring this out. I think I can make it work if I can figure out what $caltitlelength is.

I'm planning on adding some more features to it too, like an option in the user's options to display upcoming events or not and maybe how long into the future they want them to be displayed (just today, 1 week, 2 weeks, 1 month).

I'll post as soon as I have something.


Can you show a screen shot or url of your events hack? I really want to implement this on my site.

Thanks!

Lucky 01-03-2002 09:43 AM

Nice job!

Very useful hack!

kyrnel 01-03-2002 01:20 PM

Quote:

Originally posted by Logtenberg
Can you show a screen shot or url of your events hack? I really want to implement this on my site.
Thanks!

I still havent figured out how to incorporate birthdays into upcoming events. Even though they show up on the calendar, they are not stored in the same place as calendar events.

The rest of it works fine though.
Here are a couple of screenshots and instructions for my modified version of the hack:

This is what happen when there are no upcoming events:
https://vborg.vbsupport.ru/

This is what happens when there are, notice that I can only show todays birthdays and it is separate from the events. I want to combine them:
https://vborg.vbsupport.ru/

I don't want to post instructions until I have finished this hack. I am still planning on incorporating Birthdays into the upcoming events and putting two options in the user control panel: One to select yes/no whether to display upcoming events at all, another to select how far into the future they want events displayed (1week, 2 weeks, 1 month). Once I have those things finished I will post instructions..

SirSteve 01-14-2002 02:44 AM

Progress?

kyrnel 01-14-2002 01:00 PM

none.. I have tried every combination of syntax I can think of to form a UNION query to combine the Events with the Birthdays. No Luck.. and I have been unsuccessful in getting anyone to help.

Im not a php mysql programmer but I do program in SQL so I figured it shouldnt be too difficult... I was wrong I guess..

PLEASE HELP, SOMEONE.... I need to figure out how to combine events from calendar_events with birthdays from the users table. and sort them all by date...

thx

Lucky 01-17-2002 09:24 AM

I wouldn't mind seeing this either.

Anybody?

SirSteve 01-17-2002 12:15 PM

What about showing a weeks worth of "Upcoming Events" ?


All times are GMT. The time now is 10:50 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.01722 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (2)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