function tab5($authors, $course, $config, $course_config) { $authors_config = json_decode($config->st_authorspage); $detect = new Mobile_Detect(); $deviceType = $detect->isMobile() ? $detect->isTablet() ? 'tablet' : 'phone' : 'computer'; if ($deviceType == "phone") { $class_th_links = "class='teacher_links2'"; } else { $class_th_links = "class='well teacher_links'"; } ?> <div class="course_view_teacher"> <div id="teacherdetail" class="clearfix com-cont-wrap"> <?php if (isset($authors) && count($authors) > 0) { foreach ($authors as $key => $author) { ?> <!-- Author Name --> <div class="name_guru page_title"> <h2 class="gru-page-title"><?php echo $author->name; ?> </h2> </div> <div class="teacher_row_guru"> <div class="teacher_cell_guru"> <?php if (trim($author->show_email) == "" || $author->show_email == 0 && trim($author->show_website) == "http://" || $author->show_website == 0 && trim($author->show_blog) == "" || $author->show_blog == 0 && trim($author->show_twitter) == "" || $author->show_twitter == 0 && trim($author->show_facebook) == "http://" || $author->show_facebook == 0) { // do nothing } else { ?> <div class = 'weblinks'> <div> <div class="teacher_links clearfix g_toolbar"> <?php if (trim($author->show_email) != "" && $author->show_email == 1) { ?> <div class="teacher_links-item"> <span class="teacher_email_guru"> <a href="mailto:<?php echo $author->email; ?> "> <i class="fa fa-envelope"></i> <?php echo JText::_('GURU_EMAIL'); ?> </a> </span> </div> <?php } if (trim($author->show_website) != "http://" && $author->show_website == 1) { ?> <div class="teacher_links-item"> <span class="guru_teacher_site"> <a href="<?php echo $author->website; ?> " target="_blank"> <i class="fa fa-globe"></i> <?php echo JText::_('GURU_SITE'); ?> </a> </span> </div> <?php } if (trim($author->show_blog) != "http://" && $author->show_blog == 1) { ?> <div class="teacher_links-item"> <span class="guru_teacher_blog"> <a href="<?php echo $author->blog; ?> " target="_blank"> <i class="fa fa-pencil"></i> <?php echo JText::_('GURU_BLOG'); ?> </a> </span> </div> <?php } if (trim($author->show_twitter) != "" && $author->show_twitter == 1) { ?> <div class="teacher_links-item"> <span class="guru_teacher_twitter"> <a href="http://www.twitter.com/<?php echo $author->twitter; ?> " target="_blank"> <i class="fa fa-twitter"></i> <?php echo JText::_('GURU_TWITTER'); ?> </a> </span> </div> <?php } if (trim($author->show_facebook) != "http://" && $author->show_facebook == 1) { ?> <div class="teacher_links-item"> <span class="guru_teacher_facebook"> <a href="<?php echo $author->facebook; ?> " target="_blank"> <i class="fa fa-facebook"></i> <?php echo JText::_('GURU_FACEBOOK'); ?> </a> </span> </div> <?php } ?> </div> </div> </div> <?php } ?> <div> <div> <div class="description_guru uk-grid" style="text-align:left"> <div class='uk-width-2-10'> <?php $config_author = json_decode($config->authorpage); $img_align = $config_author->author_image_alignment; //0-left, 1-right if ($img_align == 0) { $align = "left"; } else { $align = "right"; } $guruHelper = new guruHelper(); if (trim($author->images) != "") { $type = $course_config->course_image_size_type == "0" ? "w" : "h"; $guruHelper->createThumb(@$author->imageName, $config->imagesin . "/authors", $course_config->course_image_size, $type); ?> <a href="<?php echo JRoute::_('index.php?option=com_guru&view=guruauthor&layout=view&task=author&cid=' . $author->id . "-" . JFilterOutput::stringURLSafe($author->name)); ?> "> <img class="thumbnail pull-left" src='<?php echo JURI::root() . $author->images; ?> ' alt='author image' align='<?php echo $align; ?> ' /></a> <?php } ?> </div> <div class='uk-width-8-10 padding-left-10'> <?php echo $author->full_bio; ?> </div> </div> <div class="teacher_info"> <h4 class="gru-page-subtitle"><?php echo JText::_("GURU_TAB_AUTHOR_COURSES"); ?> </h4> <div class="clearfix"> <div class="g_table_wrap"> <div class="table_container columns"> <table class="uk-table uk-table-striped"> <tr> <th class="" ><?php echo JText::_("GURU_TAB_AUTHOR_COURSES_NAME"); ?> </th> <th class="uk-text-center"><?php echo JText::_("GURU_TAB_AUTHOR_COURSES_LEVEL"); ?> </th> <th class="uk-text-center"><?php echo JText::_("GURU_TAB_AUTHOR_COURSES_RELEASE"); ?> </th> </tr> <?php $k = 0; $guruModelguruProgram = new guruModelguruProgram(); $course = $guruModelguruProgram->getAuthorCoursesById($author); if (count($course) > 0) { $itemid = JRequest::getVar("Itemid", "0"); for ($i = 0; $i < count($course); $i++) { $class = "odd"; if ($k % 2 != 0) { $class = "even"; } ?> <tr class="<?php echo $class; ?> "> <td> <?php /***$alias = trim($course[$i]->alias) == "" ? JFilterOutput::stringURLSafe($course[$i]->name) : trim($course[$i]->alias); $courseLink = JRoute::_('index.php?option=com_guru&view=guruPrograms&layout=view&cid='.$course[$i]->id."-".$alias."&Itemid=".$itemid);***/ if (isset($course[$i]->alias)) { if (trim($course[$i]->alias) == "") { $alias = JFilterOutput::stringURLSafe($course[$i]->name); } else { $alis = trim($course[$i]->alias); } $courseLink = JRoute::_('index.php?option=com_guru&view=guruPrograms&layout=view&cid=' . $course[$i]->id . "-" . $alias . "&Itemid=" . $itemid); } else { $courseLink = JRoute::_('index.php?option=com_guru&view=guruPrograms&layout=view&cid=' . $course[$i]->id . "&Itemid=" . $itemid); } ?> <a href='<?php echo $courseLink; ?> '> <?php echo $course[$i]->name; ?> </a> </td> <td class="uk-text-center"><img src='<?php echo JURI::root() . "components/com_guru/images/" . $course[$i]->level . ".png"; ?> '/></td> <?php $int_date = strtotime($course[$i]->startpublish); $date = date($config->datetype, $int_date); ?> <td class="uk-text-center"><?php echo $date; ?> </td> </tr> <?php $k++; } } ?> </table> </div> </div> </div> </div> </div> </div> </div> </div> <?php } } ?> </div> </div> <?php }