-
AuthorPosts
-
Adrien GEORGE Friend
Adrien GEORGE
- Join date:
- September 2014
- Posts:
- 49
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 25
- Thanked:
- 2 times in 1 posts
January 16, 2009 at 5:11 pm #137180Hello,
I have a problem with the templates JA Rutile on my site http://www.gueuledefoot.com
It appears on the top of the site :Warning: Invalid argument supplied for foreach() in /home.44/g/u/e/gueulede/www/templates/ja_rutile/ja_menus/Base.class.php on line 62
I am on joomla 1.5.9,
thanks in advance,
AdrienAnonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
January 19, 2009 at 7:04 am #287047Hi,
Please open file templates/ja_rutile/ja_menus/Base.class.php, at about line 62, find following script:
[PHP]foreach ($rows as $index => $v) {
if ($v->access <= $user->get(‘aid’,0)) {
$pt = $v->parent;
$list = @ $children[$pt] ? $children[$pt] : array ();switch ($v->type)
{
case ‘url’ :
if ((strpos($v->link, ‘index.php?’) !== false) && (strpos($v->link, ‘Itemid=’) === false)) {
$v->url = $v->link.’&Itemid=’.$v->id;
} else {
$v->url = $v->link;
}
break;default :
$router = JSite::getRouter();
$v->url = $router->getMode() == JROUTER_MODE_SEF ? ‘index.php?Itemid=’.$v->id : $v->link.’&Itemid=’.$v->id;
break;}
// Handle SSL links
$iParams = $this->createParameterObject($v->params);
$iSecure = $iParams->def(‘secure’, 0);
if ($v->home == 1) {
$v->url = JURI::base();
} elseif (strcasecmp(substr($v->url, 0, 4), ‘http’) && (strpos($v->link, ‘index.php?’) !== false)) {
$v->url = JRoute::_($v->url, true, $iSecure);
} else {
$v->url = str_replace(‘&’, ‘&’, $v->url);
}$v->_idx = count($list);
array_push($list, $v);
$children[$pt] = $list;
}
$cacheIndex[$v->id] = $index;
$this->items[$v->id] = $v;
}[/PHP]and change to:
[PHP]
if (sizeof($rows) > 0) {
foreach ($rows as $index => $v) {
if ($v->access <= $user->get(‘aid’,0)) {
$pt = $v->parent;
$list = @ $children[$pt] ? $children[$pt] : array ();switch ($v->type)
{
case ‘url’ :
if ((strpos($v->link, ‘index.php?’) !== false) && (strpos($v->link, ‘Itemid=’) === false)) {
$v->url = $v->link.’&Itemid=’.$v->id;
} else {
$v->url = $v->link;
}
break;default :
$router = JSite::getRouter();
$v->url = $router->getMode() == JROUTER_MODE_SEF ? ‘index.php?Itemid=’.$v->id : $v->link.’&Itemid=’.$v->id;
break;}
// Handle SSL links
$iParams = $this->createParameterObject($v->params);
$iSecure = $iParams->def(‘secure’, 0);
if ($v->home == 1) {
$v->url = JURI::base();
} elseif (strcasecmp(substr($v->url, 0, 4), ‘http’) && (strpos($v->link, ‘index.php?’) !== false)) {
$v->url = JRoute::_($v->url, true, $iSecure);
} else {
$v->url = str_replace(‘&’, ‘&’, $v->url);
}$v->_idx = count($list);
array_push($list, $v);
$children[$pt] = $list;
}
$cacheIndex[$v->id] = $index;
$this->items[$v->id] = $v;
}
}[/PHP]Hope it helps.
1 user says Thank You to JA Developer for this useful post
Adrien GEORGE FriendAdrien GEORGE
- Join date:
- September 2014
- Posts:
- 49
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 25
- Thanked:
- 2 times in 1 posts
January 21, 2009 at 2:30 pm #287471It worked ! Thanks again
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by Adrien GEORGE 15 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum