-
AuthorPosts
-
December 8, 2010 at 11:54 pm #157234
Hello:
How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….
Thanks
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 9, 2010 at 1:50 am #365868you open the file: templatesja_teline_ivblockstopbar.php and find:
[PHP]
<?php
echo “<span class=”day”>”.date (‘D’).”</span>”;
echo “<span class=”month”>”.date (‘m’).”</span>”;
echo “<span class=”date”>”.date (‘d’).”</span>”;
echo “<span class=”year”>”.date (‘Y’).”</span>”;
?>
[/PHP]
replace:
[PHP]
<?php
echo “<span class=”day”>”.date (‘D’).”</span>”;
echo “<span class=”month”>”.date (‘M’).”</span>”;
echo “<span class=”date”>”.date (‘D’).”</span>”;
echo “<span class=”year”>”.date (‘Y’).”</span>”;
?>
[/PHP]VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
December 9, 2010 at 8:08 am #365934<em>@josehenriquesnet 207413 wrote:</em><blockquote>Hello:
How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….
Thanks</blockquote>
See this:
http://www.joomlart.com/forums/topic/suggestions-to-joomlart/
It might not be 1:1, but the logic is the same.December 9, 2010 at 8:02 pm #366030Still not working 🙁
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
December 9, 2010 at 10:36 pm #366048<em>@josehenriquesnet 207620 wrote:</em><blockquote>Still not working :(</blockquote>
which advise did you use?
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
December 9, 2010 at 11:19 pm #366051i did this way..
before:
<?php
echo "<span class="day">".date ('D')."</span>";
echo "<span class="month">".date ('m')."</span>";
echo "<span class="date">".date ('d')."</span>";
echo "<span class="year">".date ('Y')."</span>";
?>
after:
<?php
$app =& JFactory::getApplication();
$date = JFactory::getDate();
$date->setOffset($app->getCfg('offset'));
echo $date->toFormat('<span class="day">%D</span><span class="date">%d</span><span class="month">%m</span><span class="year">%Y</span></span>');
?>now when i go with mouse to year, then day name not shown?? what i did wrong? (in our country i need day, month, year format)
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 10, 2010 at 3:24 am #366078<em>@josehenriquesnet 207620 wrote:</em><blockquote>Still not working :(</blockquote>
If think that you should provide us snapshot with your illustrations defining your requirement. I can then give you the solution.
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
December 10, 2010 at 10:29 am #366151Can you try with:
<?php
$app =& JFactory::getApplication();
$date = JFactory::getDate();
$date->setOffset($app->getCfg('offset'));
echo $date->toFormat('<span class="day">%a</span><span class="date">%d</span><span class="month">%m</span><span class="year">%Y</span></span>');
?>
2 users say Thank You to VisiGod for this useful post
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
December 10, 2010 at 2:41 pm #366175juhhuuu, your are the Man! 🙂 thats working! 🙂
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
December 10, 2010 at 3:10 pm #366183yep, i hope that too!
December 11, 2010 at 3:25 am #366244<em>@josehenriquesnet 207413 wrote:</em><blockquote>Hello:
How can I translate the date and in the month, instead of number, put DEC | JAN | FEB….
Thanks</blockquote>
Open the file: templatesja_teline_ivblockstopbar.php and find:[PHP] <?php
echo “<span class=”day”>”.date (‘D’).”</span>”;
echo “<span class=”month”>”.date (‘m’).”</span>”;
echo “<span class=”date”>”.date (‘d’).”</span>”;
echo “<span class=”year”>”.date (‘Y’).”</span>”;
?>[/PHP]
and replace with this code:
[PHP]<?php
$month = date(“m”);
switch($month)
{
case “1”: $month = “Jan”; break;
case “2”: $month = “Feb”; break;
case “3”: $month = “Mar”; break;
case “4”: $month = “Apr”; break;
case “5”: $month = “May”; break;
case “6”: $month = “Jun”; break;
case “7”: $month = “Jul”; break;
case “8”: $month = “Aug”; break;
case “9”: $month = “Sep”; break;
case “10”: $month = “Oct”; break;
case “11”: $month = “Nov”; break;
case “12”: $month = “Dec”; break;
}
echo “<span class=”day”>”.date(“D”).”</span>”;
echo “<span class=”date”>”.date (‘d’).”</span>”;
echo “<span class=”month”>”.$month.”</span>”;
echo “<span class=”year”>”.date (‘Y’).”</span>”;[/PHP]
This is result:
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
December 11, 2010 at 11:15 am #366317Come on, stop spreading this solution. It is a bad one, as it totally ignores the time offsetting and doesn’t work on multilingual sites.
AuthorPostsViewing 13 posts - 1 through 13 (of 13 total)This topic contains 13 replies, has 5 voices, and was last updated by VisiGod 14 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum