-
AuthorPosts
-
VisiGod Friend
VisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
September 14, 2010 at 10:36 pm #154318I have two general suggestions to Joomlart in improving some of the usability of the templates:
1. When calling a date to appear in the template, please use the Joomla! API (getDate) in order the template to show the relevant time offset. In the case of ja_social, it will be replacing:
<?php
echo "<span class="day">".date ('l')."</span>";
echo "<span class="date">, ".date ('M')." ".date ('d').date ('S')."</span>";
?>
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 %B %Y</span>');
?>
That way, the date will not only use the Joomla! offsetting, but will also be translatable into other languages automatically, without the need of hacks (you can see a lot of them in the forum).
It is a very minor change, but it will save a lot of time to Joomlart members.2. Replace the current link on the logo (goes to index.php) to go to the root directly. Google doesn’t like duplicated content and this link over the logo creates two pages (with and without index.php) to be exactly the same.
You can replace the index.php link with:
<?php echo JURI::base(); ?>
It is also a very minor change, but will improve the templates in general.14 users say Thank You to VisiGod for this useful post
hilfiger Friendhilfiger
- Join date:
- September 2010
- Posts:
- 76
- Downloads:
- 0
- Uploads:
- 11
- Thanks:
- 17
- Thanked:
- 6 times in 1 posts
September 14, 2010 at 10:59 pm #355537hi
I dont know much css or any webdesign :), can u tell me in which files should i replace the codes?
VisiGod FriendVisiGod
- Join date:
- January 2006
- Posts:
- 538
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 76
- Thanked:
- 138 times in 18 posts
September 14, 2010 at 11:08 pm #355538This was basically targeting the Joomlart stuff, but however.
In 1. Go to templates/ja_social/blocks/ and download the topbar.php – make the changes there. Then in order to not hack the template go to templates/ja_social/core/themes/THE_COLOR_YOU_USE/ create there a new folder named blocks and upload the file there.
In 2. Go to templates/ja_social/blocks and download header.php – make the changes there. Then upload the changed file in templates/ja_social/core/themes/THE_COLOR_YOU_USE/blocks (it already should exist as you crated it in point 1).
hilfiger Friendhilfiger
- Join date:
- September 2010
- Posts:
- 76
- Downloads:
- 0
- Uploads:
- 11
- Thanks:
- 17
- Thanked:
- 6 times in 1 posts
September 14, 2010 at 11:09 pm #355539thanx for the quick reply
Urszula Dziki FriendUrszula Dziki
- Join date:
- September 2014
- Posts:
- 221
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 34
- Thanked:
- 20 times in 1 posts
September 24, 2010 at 2:54 am #356512Thank you for that! and changed for doublicate page that is brilliant!
goldorakiller Friendgoldorakiller
- Join date:
- July 2010
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 10
- Thanked:
- 6 times in 1 posts
September 24, 2010 at 7:16 am #356527I’m sorry but where i put the code for the index.php in header.php ?
Here my code :
[PHP]<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>[/PHP]and i replace with this :
[PHP]<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo JURI::base(); ?></span></a>
</h1>[/PHP]Is this correct ?
Urszula Dziki FriendUrszula Dziki
- Join date:
- September 2014
- Posts:
- 221
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 34
- Thanked:
- 20 times in 1 posts
September 24, 2010 at 7:53 am #356533replace first code with this:
<h1 class=”logo”>
<a href=”<?php echo JURI::base(); ?>” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
3 users say Thank You to Urszula Dziki for this useful post
Urszula Dziki FriendUrszula Dziki
- Join date:
- September 2014
- Posts:
- 221
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 34
- Thanked:
- 20 times in 1 posts
September 27, 2010 at 12:42 am #356734oops sorry wrong post
knightofthenight Friendknightofthenight
- Join date:
- September 2010
- Posts:
- 25
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 8
September 29, 2010 at 5:27 pm #357086Wow.
Great Works fine..
BR
Knight
gabbya Friendgabbya
- Join date:
- August 2010
- Posts:
- 13
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 2
- Thanked:
- 1 times in 2 posts
October 21, 2010 at 2:33 pm #359859Workinng 100% hebrew
Thanx Champzorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
December 9, 2010 at 11:02 pm #366049how to translate this to right format?
<?phpecho “<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>”;
?>
//TELINE IV
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
December 9, 2010 at 11:26 pm #366052zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
December 9, 2010 at 11:34 pm #366053<em>@tcraw1010 207651 wrote:</em><blockquote>Am I the only one who thinks zorroh looks like Nick Lachey?
;)</blockquote>
hahahhaha, maybe littlebit similar
fabiolima Friendfabiolima
- Join date:
- January 2010
- Posts:
- 13
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
sushismb Friendsushismb
- Join date:
- October 2008
- Posts:
- 370
- Downloads:
- 59
- Uploads:
- 24
- Thanks:
- 86
- Thanked:
- 8 times in 1 posts
March 2, 2011 at 6:31 am #379217Hello,
I’d like to clarify if this is the right thing to do.
Thanks!
<em>@goldorakiller 195296 wrote:</em><blockquote>I’m sorry but where i put the code for the index.php in header.php ?
Here my code :
[PHP]<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>[/PHP]and i replace with this :
[PHP]<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo JURI::base(); ?></span></a>
</h1>[/PHP]Is this correct ?</blockquote>
AuthorPostsThis topic contains 16 replies, has 11 voices, and was last updated by yvan01 13 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum