Youjoomla Support Forums (
-   Youjoomla Date (
-   -   [SOLVED] My Yootheme and language fixes (

lanfan 12-28-2009 05:09 PM

[SOLVED] My Yootheme and language fixes
I really like the style of this plugin so I decided to make it work for myself. Looking around here I saw that serveral ppl have the same issues.

Language fix:
At the very end just before the ending "?>" add this function:
PHP Code:

function translateDateSE($string) {
$date = array("/January/""/February/""/March/""/May/""/June/""/July/""/August/""/October/""/May/""/Oct/""/Monday/""/Tuesday/""/Wednesday/""/Thursday/""/Friday/""/Saturday/""/Sunday/""/Mon/""/Tue/""/Wed/""/Thu/""/Fri/""/Sat/""/Sun/");
$dateSE = array( "Januari""Februari""Mars""Maj""Juni""Juli""Augusti""Oktober""Maj""Okt""Måndag""Tisdag""Onsdag""Torsdag""Fredag""Lördag""Söndag""Mån""Tis""Ons""Tor""Fre""Lör""Sön");

It is an ugly way to translate but it works. Please make you own language changes in the second array, $dateSE.
Then you need to call this function just before the "$final_date".
PHP Code:

=  translateDateSE($format_date);//NEW, added by YOU.
$final_date     explode("-",$format_date);//Original appr. line 50. 

Secondly, the break of many Yoothemes. You need to get rid of the ugly tables. Here's what I did:
PHP Code:

                $display "<div class=\"date\" style=\"float:left;\" >
                            <div class=\"date_month\">"
                            <div class=\"date_day\">"
                            <div class=\"date_year\">"
//$yj_date .= '<table width="100%" border="0"><tr valign="top">';
                            //$yj_date .= '<td class="yj_date">';
                            //$yj_date .= $display.'</td><td  style="width:100%;">';
                              //echo $yj_date;
echo $display;
//$row->text = '</td></tr></table> </td></tr></table> <table width="100%"><tr><td>'.$row->text; 

You can remove the "//" commented code. I kept it so you can see where I am. Note the first line, I added som style to the div in order to place it where I wanted it. There are a lot more style attributes you can use. Seconly you need to add the "echo $display" to show all div's without the tables.

And yeah, the file is in \plugins\content\yj_date.php.

Hope it helps, cheers, \\LF

SomeoneHere 12-29-2009 04:39 AM

This will be usefull for others i think.
Thanks for the information.

All times are GMT -4. The time now is 03:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.