ThreadsDev FusionBB Greeting Cards FusionBBDev.com Measurection.com VertexHost NASCAR Racing MouseFunFacts.com Myrtle Beach Info UBB.Threads Modifications threadsdev.net
FusionBB

Trans-D Tropin
Use Coupon Code '1004' to Save $20 Off Your Initial Order of Trans-D Tropin®
V6 Threads Development >> Modifications

bostongio
Lurker


Reged: 09/30/04
Posts: 8
Beta-[6.4] Today and Yesterday
      06/20/05 06:16 PM

Mod Name / Version: Today and Yesterday

Description: You know how some forums list posts with the date showing "Today" or "Yesterday" as the post date (instead of or in addition to the actual dates)?

This mod makes a simple change to ubbt.inc.php to add this functionality.



Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites:

Author(s): bostongio

Date: 06/20/05

Credits: Other forum software

Files Altered: ubbt.inc.php

New Files:

Database Altered: No

Info/Instructions:
In ubbt.inc.php

Find (under Convert the time):

Code:

if ($timeformat == "short1") {
$time = @date("m/d/y h:i a", $time);
}
elseif ($timeformat == "short2") {
$time = @date("d/m/y h:i a", $time);
}
elseif ($timeformat == "short3") {
$time = @date("y/m/d h:i a", $time);
}
elseif ($timeformat == "short4") {
$time = @date("d/m/Y H:i", $time);
}
elseif ($timeformat == "short5") {
$time = @date("H:i d/m/Y", $time);
}
elseif ($timeformat == "long") {
$time = @date("D M d Y h:i a", $time);
}



Replace with:

Code:

// Still show the date in addition to the words "Today" and "Yesterday"? 1 = Yes, 0 = No

$j_show_moddate = 1;


$j_today = date("m/d/y");
$j_yesterday = date("m/d/y", strtotime("-1 day"));
$j_tdate = @date("m/d/y", $time);
$j_time = @date("h:i a", $time);

if ($j_show_moddate) {
$j_showdate = "($j_today)";
$j_showyester = "($j_yesterday)";
}

if ($j_tdate == $j_today) {
$time = "Today $j_showdate at ".$j_time;
}
elseif ($j_tdate == $j_yesterday) {
$time = "Yesterday $j_showyester at ".$j_time;
}
else {

if ($timeformat == "short1") {
$time = @date("m/d/y h:i a", $time);
}
elseif ($timeformat == "short2") {
$time = @date("d/m/y h:i a", $time);
}
elseif ($timeformat == "short3") {
$time = @date("y/m/d h:i a", $time);
}
elseif ($timeformat == "short4") {
$time = @date("d/m/Y H:i", $time);
}
elseif ($timeformat == "short5") {
$time = @date("H:i d/m/Y", $time);
}
elseif ($timeformat == "long") {
$time = @date("D M d Y h:i a", $time);
}
}






Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Beta-[6.4] Today and Yesterday bostongio 06/20/05 06:16 PM
. * * Re: Beta-[6.4] Today and Yesterday ScriptZ Man   06/21/05 06:57 PM
. * * Re: Beta-[6.4] Today and Yesterday bostongio   06/22/05 07:17 AM
. * * Re: Beta-[6.4] Today and Yesterday ScriptZ Man   06/22/05 07:40 AM
. * * Re: Beta-[6.4] Today and Yesterday bostongio   06/22/05 09:11 AM
. * * Re: Beta-[6.4] Today and Yesterday AllenAyres   06/21/05 12:14 AM

Extra information
0 registered and 22 anonymous users are browsing this forum.

Moderator:  JoshPet, Gardener, Ian_W, Anno 



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 4040

Rate this thread

Jump to
 
Hot Topic
No posts have caught fire as of yet.

Developers for Hire
Are you looking for custom modifications? Upgrades? Installs?
We have developers who can help!
View Our Services Page for information.

Login
Enter your username and password to login. If you do not have a username you can register one HERE.
username:
password:

Send Password
Remember Me

Online
112 guests have been online with in the last 90 minutes.

ThreadsDev.com
Trans-D Tropin

Current Threads
No current threads found...

Modifications
Recently Added:
· View Private Messages v0.9.3
· Stop Guests from seeing "Who's Online." [6.5.5]
· User List Display Limited by Post Count 1.0
· Paginate PMs 1.0
· Today and Yesterday

Most Downloaded:
· Inline Images 3.1
· Quote Username 1.0
· Games Arcade Deluxe v1.8
· UbbThreads and Photopost Total Integration Version 4
· Tool Tip Body Preview 3.0

Highest Rated:
· Mass Threads Move for 6.3
· Update Last Posts 1.0
· Update B_Parent User 1.0
· Integrated Index Page (IIP) 5.3.1
· IIP SideBarPal 1.1

Recent Stylesheets:
· Mix-Colors_2-0_3D for UBBT v6.3 - 6.5
· Mix-Colors_2-0 for UBBT v6.3 - 6.5
· Dark-Grey_3-0 for UBBT v6.3 - 6.5
· Green-Orange_1-0 for UBBT v6.3 - 6.5
· ebay_1-0 for UBBT v6.3 - 6.5

Recent Template Mods:
· Postlist modification - line separates new topics and replies
· I need some help with my postlist.tmpl file
· Edit, reply, and quote buttons mod for Facelift 6.5
· Google Add Sense add on for Threads 6.5
· Article templates for Thread 6.5

Shout Box

Short Stats
New Members:
4 Last 24 hours
20 Last 7 days
107 Last 31 days

Boards:
11676 Total topics
73324 Total replies

Totals:
5728 Members
85000 Posts

Max Online:
814 Total
(06/01/06 09:46 AM)


Web Hosting Provided by
VertexHost Web Hosting

Content ©2003-2006 ThreadsDev.NET
Powered By UBB.threads™ 6.5.5

 .: IIP 5.5 by David Lozier ©2003 :. 
Distributed by ThreadsDev.net

Visit Our Sister Sites!
JoshuaPettit.com and ThreadsAddons.com
Web Hosting Provided by
VertexHost Web Hosting

Generated in 0.655 seconds in which 0.603 seconds were spent on a total of 26 queries. Zlib compression enabled.


Whiplash Claims - Handmade Jewellery - Jewellery - Whiplash