Hello there! Welcome to Youjoomla Support Forums

We are Web Development Company specializing in Joomla Templates , Joomla Extensions and WordPress Themes development . You are not able to see some forum threads due to your memberhip level. To unlock all forums and special customer support please take few moments to signup . If you are just searching for free joomla templates , or free joomla extension support simply head to our Free Joomla Support forums and open a new thread. Our moderators will help you as soon as possible. To spead up the response time please take few seconds and go over forum rules

Have fun!

[SOLVED] My Yootheme and language fixes

12-28-2009, 06:09 PM
# 1 (permalink)
lanfan
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");
    return 
preg_replace($date$dateSE$string);} 
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:


$format_date    
=  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\">"
.$final_date[1]."</div>
                            <div class=\"date_day\">"
.$final_date[0]."</div>
                            <div class=\"date_year\">"
.$final_date[2]."</div>
                            </div>"
;
                            
//$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
12-29-2009, 05:39 AM
# 2 (permalink)
SomeoneHere
This will be usefull for others i think.
Thanks for the information.
Thread Tools
Display Modes

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

Members Login

Username
Password