Wdir with date format setting

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Wdir with date format setting

Post by Tata » Wed Jun 04, 2008 4:21 pm

Sometime the standard date format in wdir plugin disturbs design of a site. "d.m.Y H:i:s" makes the column too wide or it writes the date in two rows.
The solution can be in using config variable

Code: Select all

$plugin_cf['wdir']['show_chaged_date']="d.m.Y";//d.m.Y H:i:s or any other desired format
To use this in config.php there is also necessary to change

Code: Select all

$wdo .= "<td align=\"center\">" . date("d.m.Y", filemtime($fullname)) . "</td>";
to

Code: Select all

$wdo .= "<td>" . date($plugin_cf['wdir']['show_chaged_date'], filemtime($fullname)) . "</td>";
in index.php.
Also the lines

Code: Select all

$wdo .= "<td colspan=\"3\" class=\"wdColHeader\" align=\"center\">" . $plugin_tx['wdir']['txt_size'] . "</td>";
and

Code: Select all

$wdo .= "<td class=\"wdColHeader\" align=\"center\">" . $plugin_tx['wdir']['txt_changed'] . "</td>";
may be changed to

Code: Select all

$wdo .= "<td colspan=\"3\" class=\"wdColHeader\" width=\"80\" align=\"center\">" . $plugin_tx['wdir']['txt_size'] . "</td>";
and

Code: Select all

$wdo .= "<td class=\"wdColHeader\" width=\"80\" align=\"center\">" . $plugin_tx['wdir']['txt_changed'] . "</td>";
.
Similar way the variables for columns width can be defined in the confoig.php, so the user can set them directly after needs.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply