/**
* Switch between different types of forum list containers
* @param $data
* @param $i
*/
function render_forum_item($data, $i) {
global $locale;
if ($i > 0) {
echo "<div id='forum_".$data['forum_id']."' class='forum-container'>\n";
} else {
echo "<div id='forum_".$data['forum_id']."' class='panel panel-default'>\n";
echo "<div class='panel-body'>\n";
}
echo "<div class='pull-left forum-thumbnail'>\n";
if ($data['forum_image'] && file_exists(FORUM."images/".$data['forum_image'])) {
echo thumbnail(FORUM."images/".$data['forum_image'], '50px');
} else {
echo "<div class='forum-icon'>".$data['forum_icon_lg']."</div>\n";
}
echo "</div>\n";
echo "<div class='overflow-hide'>\n";
echo "<div class='row m-0'>\n";
switch ($data['forum_type']) {
case '3':
echo "<div class='col-xs-12 col-sm-12'>\n";
echo "<a class='display-inline-block forum-link' href='".$data['forum_link']['link']."'>".$data['forum_link']['title']."</a>\n<span class='m-l-5'>".$data['forum_new_status']."</span><br/>";
echo $data['forum_description'] ? "<div class='forum-description'>".$data['forum_description']."</div>\n" : '';
echo ($data['forum_moderators'] ? "<span class='forum-moderators text-smaller'><strong>".$locale['forum_0007']."</strong>".$data['forum_moderators']."</span>\n" : "")."\n";
if (isset($data['child'])) {
echo "<div class='clearfix sub-forum'>\n";
foreach ($data['child'] as $cdata) { // <---------- THIS IS LOOP ALL CHILD OUT
// CHANGE THIS PART
echo "CHANGE THIS PART";
echo "<i class='entypo level-down'></i>\n";
echo "<span class='nowrap'>\n";
if (isset($cdata['forum_type'])) {
echo $data['forum_icon'];
}
echo "<a href='".INFUSIONS."forum/index.php?viewforum&forum_id=".$cdata['forum_id']."&parent_id=".$cdata['forum_cat']."' class='forum-subforum display-inline-block m-r-10'>".$cdata['forum_name']."</a></span>";
echo "<br/>\n";
// END CHANGE;
}
echo "</div>\n";
}
echo "</div>\n";
break;
default:
echo "<div class='col-xs-12 col-sm-6'>\n";
echo "
<a class='display-inline-block forum-link' href='".$data['forum_link']['link']."'>".$data['forum_link']['title']."</a>\n<span class='m-l-5'>".$data['forum_new_status']."</span><br/>";
echo $data['forum_description'] ? "<div class='forum-description'>".$data['forum_description']."</div>\n" : '';
echo ($data['forum_moderators'] ? "<span class='forum-moderators text-smaller'><strong>".$locale['forum_0007']."</strong>".$data['forum_moderators']."</span>\n" : "")."\n";
if (isset($data['child'])) {
echo "<div class='clearfix sub-forum'>\n";
echo "<div class='pull-left'>\n";
echo "<i class='entypo level-down'></i>\n";
echo "</div>\n";
echo "<div class='overflow-hide'>\n";
foreach ($data['child'] as $cdata) {
if (isset($cdata['forum_type'])) {
echo $data['forum_icon'];
}
echo "<a href='".INFUSIONS."forum/index.php?viewforum&forum_id=".$cdata['forum_id']."&parent_id=".$cdata['forum_cat']."' class='forum-subforum display-inline-block m-r-10'>".$cdata['forum_name']."</a><br/>";
}
echo "</div>\n";
echo "</div>\n";
}
echo "</div>\n";
echo "<div class='hidden-xs col-sm-3 col-md-2 p-l-0 text-right'>\n";
echo "<div class='text-lighter count'>".$data['forum_postcount_word']."</div>\n";
echo "<div class='text-lighter count'>".$data['forum_threadcount_word']."</div>\n";
echo "</div><div class='forum-lastuser hidden-xs hidden-sm col-md-4'>\n";
if ($data['forum_lastpostid'] == 0) {
echo $locale['forum_0005'];
} else {
echo "<div class='clearfix'>\n";
if (!empty($data['last_post']['avatar'])) echo "<div class='pull-left lastpost-avatar m-t-5'>".$data['last_post']['avatar']."</div>";
echo "<div class='overflow-hide'>\n";
echo "<span class='forum_profile_link'>".$data['last_post']['profile_link']." ".$data['last_post']['time']."</span>\n";
echo "<a class='lastpost-goto' href='".$data['last_post']['post_link']."' title='".$data['thread_subject']."'><i class='fa fa-external-link-square'></i></a><br />\n";
echo fusion_first_words(strip_tags($data['last_post']['message']), 10);
echo "</div>\n</div>\n";
}
echo "</div>\n";
}
echo "</div>\n"; // end row
echo "</div>\n"; // end overflow-hide
if ($i > 0) {
echo "</div>\n";
} else {
echo "</div>\n</div>\n";
}
}
// Declare custom codes functions here
include THEME."templates/custom_news.php";
include THEME."templates/custom_forum_item.php";
const THEME_BULLET = "<img src='".THEME."images/bullet.png' class='bullet' alt='»' />";
echo THEME."folder/";
echo "<a href=' ".THEME."/folder/me.gif '> ". THEME ." </a>";
echo $string; // is ok
echo "I am not a php $string is ok";
Quote
Upgrade your server PHP Version? Latest is 7.0 now
- by Chan
Quote
This is fixed too?
- by Chan
Category Forum
Modifications and Requests - 9Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions