Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vbTimelines LITE - (User Calendars) Details »»
vbTimelines LITE - (User Calendars)
Version: 1.00, by Geographic2 Geographic2 is offline
Developer Last Online: Apr 2007 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-26-2004 Last Update: Never Installs: 4
 
No support by the author.

vbTimelines LITE for VB 3.0 gold

(Not Counting the required hack by kentaurus)
New Files: 1
Files to Edit: 1
Templates to Add: 4


Requirements and Credits-


Go add the attachments in calendar events by kentaurus hack now. it is worth it.
and required. and worth it. Remember to click install.

https://vborg.vbsupport.ru/showthread.php?t=62264

A variation of the recent attachments hack by Mindtrix was used in this hack so please click install over there
and use the standard version as well to display recent attachments to the posts
in your forum. Don't forget to click install there too.

https://vborg.vbsupport.ru/showthread.php?t=61244



Features

The following are the features that are presently avalible in vBTimelines LITE,

Users create their own calendar.
Users become the calendar moderator for their calendar.
(Only they (and mods/admins of course) can add/edit/delete events from/to their calendar.)
Recently Added Images from user calendars.
most recently added updates are listed.
Users get Create Calendar or Jump to Your Calendar link based on if they have a calendar yet.


Why this makes sense.../What the hell would I do with that?

Users can write their own "diary" style entries.
They can input both past and future events.
Therefore it's not only a diary but a planner of sorts.
I am running a garden site. Users add entries into their "egarden"
where they can show pictures and write about their plants, veggies, and flowers.
Keep track of weather events, fertilization etc... So this is a record for them
and the community to view and learn from. You may have a similar or different use for
this so be creative. The Vbulletin calendar is the most underutilized part of VB and has exciting possibilities. I could easily see this being useful in many community's. Car modders/racers can keep a timelined gallery of their projects/acheivements, Lots of communities would enjoy a diary style utility.


Installation-

Upload vbtimelines.php to your forum directory

PHP Code:
<?php 
error_reporting
(E_ALL & ~E_NOTICE); 
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''vbtimelines'); 
$phrasegroups = array( 
); 
$specialtemplates = array( 
); 
$globaltemplates = array( 
    
'vbtimelines'
); 
$actiontemplates = array( 

); 

require_once(
'./global.php'); 


$navbits = array(); 
$navbits[$parent] = 'vbTimelines Index'

$navbits construct_navbits($navbits); 


$allgardens=$DB_site->query("SELECT description, dateline, lupdatemonth, lupdateday, lupdateyear, calendarid, title FROM calendar 
WHERE displayorder=999 ORDER BY dateline DESC LIMIT 20"
); 

$temp="SELECT calendarid FROM calendar WHERE title='".$bbuserinfo['username']."'";
$value=$DB_site->query($temp);

if(
$gardens $DB_site->fetch_array($value))
{
$newlink='<img src="./images/misc/menu_open.gif"><a href="calendar.php?c='.$gardens['calendarid'].'"> Jump to your vbTimeline</a>';
}
else
{
$newlink='<img src="./images/misc/menu_open.gif"><a href="calendar.php?add=true"> Create your new vbTimeline</a>';
}

// Start recent attachments CODE BY MINDTRIX modified by GEO
$trix $DB_site->query("SELECT calendar, counter, attachmentid,
             dateline, filename FROM attachment WHERE
             calendar>0 AND dateline < " 
TIME() ." ORDER BY dateline DESC LIMIT 4");

while (
$recentattachment $DB_site->fetch_array($trix))
{
    eval(
'$latestattachments .= "' fetch_template('recent_attachments2') . '";');
}
//End recent attachments



while($gardens $DB_site->fetch_array($allgardens))
{
$recentattachment $DB_site->fetch_array($trix);
eval(
'$vbtimelinesbits .= "' fetch_template('vbtimelinesbits') . '";');
}

eval(
'$navbar = "' fetch_template('navbar') . '";'); 
eval(
'print_output("' fetch_template('vbtimelines').$stringy'");'); 
?>

Create 4 new fields in the calendar table of your DB

lupdatemonth as char(2)
lupdateyear as VARCHAR(4)
lupdateday as char(2)
dateline as INT(10)


Edit In calendar.php-

Find:
PHP Code:
$idname $vbphrase['event']; 
Add after:

PHP Code:
if ($_REQUEST['add'] == 'true'
{
    if(
$bbuserinfo['username']!="Unregistered")
    {
    
    }
    else
    {
    
print_no_permission();
    }

// ### NAVBAR #################################################
$navbits = array();
  
$ltr='Add New Calendar';
  
$navtext $ltr;
  
$navurl  "add?=true";


if (
$navtext && $navurl) {
  
$navbits = array("calendar.php" => 'Calendar',
             
"calendar.php?$navurl=> $navtext);
}
$navbits      construct_navbits($navbits);
eval(
'$navbar = "'.fetch_template('navbar').'";');


eval(
'print_output("' fetch_template('calendar_add') . '");');

}




if (
$_POST['do'] == 'doaddcalendar')
{
    
globalize($_POST, array(
            
'title' => STR,
            
'description' => STR,
            
'year' => STR)
    );

$name=$bbuserinfo['username'];

$today getdate(TIMENOW $vboptions['hourdiff']);


$dateliner gmmktime(000$today['mon'], $today['day'], $today['year']);
$q1="INSERT INTO calendar (`title`, `description`, `displayorder`,
 `neweventemail`, `moderatenew`, `startofweek`, `options`,
 `cutoff`, `eventcount`, `startyear`, `endyear`,
 `holidays`, `lupdatemonth`, `lupdateyear`, `lupdateday`, `dateline`)
VALUES ('"
.$name."', '".$description."', 2, 0, 1, 116, 40,
4, 4, 1970, 2037, 0, "
.$today['mon'].", ".$today['year'].", ".$today['mday'].",".$dateliner.")";


$DB_site->query($q1);


$num=$DB_site->query_first("SELECT calendarid AS cid FROM calendar 
WHERE title='
$name' AND description='$description'"); 

$temp="INSERT INTO `calendarmoderator` 
(`userid`, `calendarid`, `neweventemail`, `permissions`)
VALUES ('"
.$bbuserinfo['userid']."', ".$num['cid'].", '".$bbuserinfo['email']."', 7);";
$DB_site->query($temp);

$temp1=$num['cid'];

$DB_site->query("INSERT INTO `calendarpermission`
(`calendarid`, `usergroupid`, `calendarpermissions`)
VALUES (
$temp1, 2, 17)");

$DB_site->query("INSERT INTO `calendarpermission`
 (`calendarid`, `usergroupid`, `calendarpermissions`)
 VALUES (
$temp1, 1, 17)");

$DB_site->query("INSERT INTO `calendarpermission`
 (`calendarid`, `usergroupid`, `calendarpermissions`)
 VALUES (
$temp1, 3, 17)");


// ### NAVBAR #################################################
$navbits = array();
  
$ltr='Added New Calendar';
  
$navtext $ltr;
  
$navurl  "";


if (
$navtext && $navurl) {
  
$navbits = array("calendar.php" => 'Calendar',
             
"calendar.php?$navurl=> $navtext);
}
$navbits      construct_navbits($navbits);
$errormessage="Your Calendar has been added.";
$url="vbtimelines.php";

eval(
'$navbar = "'.fetch_template('navbar').'";');


        eval(
'print_output(" ' fetch_template('STANDARD_REDIRECT') . '");');
}

/*END ADD ENTRY CODE*/ 


Find:
PHP Code:

            $DB_site
->query("
                INSERT INTO " 
TABLE_PREFIX "event (calendarid, userid, event, recurring, recuroption,dateline_to,dateline_from,    title, allowsmilies, customfields, dateline, visible, utc)
                VALUES (
$calendarid$bbuserinfo[userid], '" addslashes($message) . "', '" addslashes($pattern) . "', '" addslashes($patoptions) . "', '$dateline_to', '$dateline_from', '" addslashes($title) . "', '$allowsmilies', '" addslashes($customfields) . "', " TIMENOW ", $visible, '" addslashes($timezoneoffset) . "')
            "
);
            
$eventid $DB_site->insert_id(); 
Add after:
PHP Code:
$today getdate(TIMENOW $vboptions['hourdiff']);
$name=$bbuserinfo[username];
$month=$today['mon'];
$day=$today['mday'];
$year=$today['year'];
$DB_site->query("UPDATE calendar
        SET dateline = "
.TIMENOW."
        WHERE title = '
$bbuserinfo[username]'
        "
);
$DB_site->query("UPDATE calendar
        SET lupdatemonth = 
$month
        WHERE title = '
$name'
        "
);
$DB_site->query("UPDATE calendar
        SET lupdateday = 
$day
        WHERE title = '
$name'
        "
);
$DB_site->query("UPDATE calendar
        SET lupdateyear = 
$year
        WHERE title = '
$name'
        "
); 


Create Templates



Add template calendar_add:

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle]</title>
$headinclude
</head>
<
body>
$header

$navbar

<form action="calendar.php" method="post">
<
input type="hidden" name="title" value="$bbuserinfo[username]">
<
input type="hidden" name="do" value="doaddcalendar">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr align="center">

    <
td class="tcat" align="center" colspan="2">
    <
span class="smallfont"><b>Add New Calendar</b></span>
    </
td>
</
tr>

<
tr valign="top">
<
td align=center>
<
textarea name="description" rows="4" cols="60" class="bginput"></textarea>
</
td>
</
tr>


<
tr valign="top">
<
td align=center>
<
input type="submit" class="button" value="$vbphrase[save_changes]accesskey="s" />
        <
input type="reset" class="button" value="$vbphrase[reset_fields]accesskey="r" />
</
td>
</
tr>



</
form>

$footer
</body>
</
html

Add template vbtimelinesbits:

PHP Code:
<tr>
<
td class=alt2>
<
a href="calendar.php?c=$gardens[calendarid]&month=$gardens[lupdatemonth]&year=$gardens[lupdateyear]">$gardens[title]</a></td>
<
td width="60%" class=alt1 align=left>
$gardens[description]
</
td>
<
td class=alt2 align=right>Latest Update: <a href="calendar.php?c=$gardens[calendarid]&month=$gardens[lupdatemonth]&year=$gardens[lupdateyear]">$gardens[lupdatemonth]/$gardens[lupdateday]/$gardens[lupdateyear]</a>
</
tr


Add template vbtimelines:

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle]</title>
$headinclude
</head>
<
body>
$header

$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%">
<
tr>
<
td class="tcat">Recent Calendar Images:</td>
</
tr>
<
tr><td class="tcat" align=center>
$latestattachments
</td></tr></table>


<
table align="center" width="100%">
<
tr>
<
td align ="center" width="100%">

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
<
td class="tcat">Latest Calendar Updates:</td>
<
td class="tcat"></td>
<
td class="tcat" align="right">$newlink</td>
</
tr>
$vbtimelinesbits
</table>

</
td>
</
tr>
</
table>

$footer
</body>
</
html



Add template recent_attachments2: (ORIGINAL CODE BY MINDTRIX - Modified by Geo)

PHP Code:
<a href="calendar.php?do=getinfo&e=$recentattachment[calendar]target="_blank">
<
img src="attachment.php?attachmentid=$recentattachment[attachmentid]&thumb=1" alt="$recentattachment[filename]width="150" border="0"></a> <img src="./spacer.gif" height="0" width="10" border="0"

This hack is released as is, with a promise of zero support.
Not to say you'll get no reply but I have no time for support,
I'm getting married etc... so I'm too busy.


Please reply if this installation text has errors.



Screenshots

Here is the basic vbtimelines interface.

4 recent images from your users calendars, followed by a listing of 20 or so calendars with the latest updates.

Clicking an image of the recent attachments will bring you to the corresponding calendar event.

Show Your Support

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

Comments
  #2  
Old 03-27-2004, 02:40 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you make a TXT install file for this?
Reply With Quote
  #3  
Old 03-27-2004, 03:57 AM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To whoever just installed this make sure you have the latest version.
I made a few changes to the code @ 5:34 board time.

If you add a new calendar you should see the standard redirect page and then
be taken to vbtimelines.php.

If you instead get no redirect page with really ugly incomplete output then you should
redo the changes made to calendar.php.
Reply With Quote
  #4  
Old 03-27-2004, 10:04 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It could have some RSS as well in the future?
Reply With Quote
  #5  
Old 03-27-2004, 02:38 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tel us how to Create 4 new fields in the calendar table of your DB

lupdatemonth as char(2)
lupdateyear as VARCHAR(4)
lupdateday as char(2)
dateline as INT(10)


I don;t know how??

Thanks
Reply With Quote
  #6  
Old 03-27-2004, 03:46 PM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use these queries or use PhpMyAdmin:


PHP Code:
ALTER TABLE calendar ADD lupdatemonth char(2NOT NULL
ALTER TABLE calendar ADD lupdateyear VARCHAR
(4NOT NULL
ALTER TABLE calendar ADD lupdateday char
(2NOT NULL
ALTER TABLE calendar ADD dateline int
(10NOT NULL DEFAULT 
Quote:
I don;t know how??
Get a book/Take a class/Code some VBstuff and learn
Guess I should have provided it though
Reply With Quote
  #7  
Old 05-25-2004, 05:37 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Before I install this and modify it into a journal system ...

Can you limit the amount of calendars that a member can create? Or is it limited to one by default?

Is there any way that members can choose who has access to them?

Is there a URL of a site using this ... the screenshots give me an idea of what to expect but I'd like to see the users side as well
Reply With Quote
  #8  
Old 07-26-2004, 01:31 PM
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Location: Vienna
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont get it. whats that for?
Reply With Quote
  #9  
Old 09-19-2004, 03:39 PM
nexialys
Guest
 
Posts: n/a
Default

!ping... looks like we have no support and no updates for this good hack...

someone ?!

and this is a LITE version.. where is the FULL one ?
Reply With Quote
  #10  
Old 09-19-2004, 03:47 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Geographic2
This hack is released as is, with a promise of zero support.
Not to say you'll get no reply but I have no time for support,
I'm getting married etc... so I'm too busy.
The author said they couldn't offer support. You're on your own
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 05:55 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.06677 seconds
  • Memory Usage 2,418KB
  • Queries Executed 23 (?)
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
  • (10)bbcode_php
  • (2)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)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