- Сообщений: 325
- Спасибо получено: 0
Очень неновая, но по-прежнему эффектная галерея изображений ImageFlow - на новеньком Ruby on Rails 7.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Sergey84 пишет: Deprecated: Function eregi() is deprecated in /home/h44102/data/www/livinggames.ru/administrator/components/com_jawards/admin.jawards.html.php on line 808
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Sergey84 пишет: Я где-то читал, что надо какой-то PHP код вставить...
<?php
// Hack for jAwards integration, displays some medals of the user
$number_medals = 3; // number of medals to show
$query = "SELECT b.image, b.name"
. "\n FROM #__jawards_awards AS a"
. "\n LEFT JOIN #__jawards_medals AS b ON b.id = a.award"
. "\n WHERE a.userid=". $fmessage->userid
. "\n ORDER BY RAND() LIMIT ".$number_medals;
$database->setQuery( $query );
$medals = $database->loadObjectList();
// URL links to the jAwards-Tab for Community Builder which displays all
// medals of the user - change to another URL of needed
$awards_url=sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$fmessage->userid."&tab=getawardstab");
// CSS-class "ja_medals" allows individual styling of medal images and
// container. "nobr" keeps the medals from breaking apart, display them
// in one row.
$msg_jawards = "<div class=\"ja_medals\"><nobr>";
foreach ($medals as $medal){
$msg_jawards.= "<a href=\"$awards_url\" title=\"$medal->name (Click to see more)\">"
. "<img style='border:0px;padding:0px;' src=\"".KUNENA_JLIVEURL."/images/medals/".$medal->image ."\" alt=\"".$medal->name."\" />"
. "</a>";
}
$msg_jawards.="</nobr></div>";
unset($medals);
echo $msg_jawards;
?>
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Sergey84 пишет: Ниче не получается. Может я код не туда вставляю. Куда его надо воткнуть, подскажите?
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Sergey84 пишет: Ниче не получается.
Fortunately, that's easy to fix. Right before the line "$database->setQuery(...)", insert the following line of code:
$database = &JFactory::getDbo();
Just replace "sefRelToAbs" with "JRoute::_" (leave the braces afterwards as they are)!
<?php
$number_medals = 10;
$query = "SELECT b.image, b.name"
. "\n FROM #__jawards_awards AS a"
. "\n LEFT JOIN #__jawards_medals AS b ON b.id = a.award"
. "\n WHERE a.userid=". $this->profile->userid
. "\n ORDER BY RAND() LIMIT ".$number_medals;
$database = &JFactory::getDbo();
$database->setQuery( $query );
$medals = $database->loadObjectList();
$awards_url=JRoute::_('index.php?option=com_comprofiler&task=userProfile&user='.$this->profile->userid."&tab=getawardstab");
$msg_jawards = "<div class=\"ja_medals\">";
foreach ($medals as $med){
$msg_jawards.= "<a href=\"$awards_url\" title=\"$med->name\">"
. "<img style='border:0px;padding:0px;' src=\"".KUNENA_JLIVEURL."/images/medals/".$med->image ."\" alt=\"".$med->name."\" />"
. "</a>";
}
$msg_jawards.="</div>";
unset($medals);
echo $msg_jawards;
?>
Sergey84 пишет: Может я код не туда вставляю. Куда его надо воткнуть, подскажите?
/components/com_kunena/template/default/view/profile.vertical.php
<?php echo $this->profile->profileIcon('email'); ?>
</li>
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
<?php
$number_medals = 10;
$query = "SELECT b.image, b.name"
. "\n FROM #__jawards_awards AS a"
. "\n LEFT JOIN #__jawards_medals AS b ON b.id = a.award"
. "\n WHERE a.userid=". $this->profile->userid
. "\n ORDER BY RAND() LIMIT ".$number_medals;
$database = &JFactory::getDbo();
$database->setQuery( $query );
$medals = $database->loadObjectList();
$awards_url=JRoute::_('index.php?option=com_comprofiler&task=userProfile&user='.$this->profile->userid."&tab=getawardstab");
$msg_jawards = "<div class=\"ja_medals\">";
foreach ($medals as $med){
$msg_jawards.= "<a href=\"$awards_url\" title=\"$med->name\">"
. "<img style='border:0px;padding:0px;' src=\"".KUNENA_JLIVEURL."/images/medals/".$med->image ."\" alt=\"".$med->name."\" />"
. "</a>";
}
$msg_jawards.="</div>";
unset($medals);
echo $msg_jawards;
?>
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.