HomePage :: Categories :: RecentChanges :: RecentlyCommented :: Search:

XyzzyB DateDiff Wordpress Plugin

A wordpress plugin to display the difference in days between the current date and specified dates (either upcoming or previous).

Current version: 1.6

Changelog

1.5 -> 1.6

Bugfix

Note

1.4 -> 1.5

Features Added

UI Changes

Bugfixes


Installation

Plugin Setup

Sidebar Setup

<li>
<?php
if (function_exists('xyzzyb_datediff_display')) xyzzyb_datediff_display();
?>
</li>

Of course the "li" tags are only necessary if you are placing the the function within the sidebar list.

Style Setup

/* XyzzyB Datediff */
/* classes:
    * xyzzyb_datediff_list : the ul list that contains all the events
    * xyzzyb_datediff_current_event : the event text for an event occuring on the current date
    * xyzzyb_datediff_upcoming_event : the event text for an upcoming event
    * xyzzyb_datediff_past_event : the event text for a past event
    * xyzzyb_datediff_days_until : the number of days until an upcoming event
    * xyzzyb_datediff_days_since : the number of days since a past event
*/

 
.xyzzyb_datediff_list {
    font-size: .8em;
}
 
.xyzzyb_datediff_current {
    background-color: #3eb938;
    padding: 4px;
    font-weight: 600;
    color: white;
}
 
.xyzzyb_datediff_current_event {
}
 
.xyzzyb_datediff_days_until {
    border: 1px solid black;
    padding-right: .2em;
    padding-left: .2em;
    padding-bottom: .1em;
    font-weight: 600;
    font-size: 1.3em;
    background-color: #abeeaa;
    color: #000;
}

.xyzzyb_datediff_days_since {
    border: 1px solid black;
    padding-right: .2em;
    padding-left: .2em;
    padding-bottom: .1em;
    font-weight: 600;
    font-size: 1.3em;
    background-color: #ff6200;
    color: #000;
}

.xyzzyb_datediff_upcoming_event {
    color: #548239;
    font-weight: 600;
}

.xyzzyb_datediff_past_event {
    color: #c35226;
    font-weight: 600;
}

Adding Dates

Styling

Here are the css classes built into the plugin. Modify your css file (usually style.css) to theme how the plugin displays its data.

Uninstallation

Code

Source code for XyzzyB DateDiff.


CategoryProgrammingPHP CategoryProgrammingSQL

There are 7 comments on this page. [Display comments]

Powered by Wikka Wakka Wiki 1.1.6.2[ext]
Page was generated in 0.6008 seconds