$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", $view_topic_url_params); $topic_unapproved = !$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'] ? $row['forum_id'] : $forum_id) ? true : false; $posts_unapproved = $row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'] ? $row['forum_id'] : $forum_id) ? true : false; $u_mcp_queue = $topic_unapproved || $posts_unapproved ? append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=queue&mode=' . ($topic_unapproved ? 'approve_details' : 'unapproved_posts') . "&t={$topic_id}", true, $user->session_id) : ''; // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe if (@$phpbb_seo->seo_opt['no_dupe']['on']) { if ($replies + 1 > $phpbb_seo->seo_opt['topic_per_page']) { $phpbb_seo->seo_opt['topic_last_page'][$topic_id] = floor($replies / $phpbb_seo->seo_opt['topic_per_page']) * $phpbb_seo->seo_opt['topic_per_page']; } } // www.phpBB-SEO.com SEO TOOLKIT END -> no dupe // BEGIN Topic Preview Mod if (!empty($row['first_post_preview_text']) && $auth->acl_get('f_read', $forum_id)) { // strip all bbcode include $phpbb_root_path . 'includes/topic_preview.' . $phpEx; $first_post_preview_text = bbcode_strip($row['first_post_preview_text']); if (utf8_strlen($first_post_preview_text) >= $config['topic_preview_limit']) { $first_post_preview_text = utf8_strlen($first_post_preview_text) > $config['topic_preview_limit'] ? utf8_substr($first_post_preview_text, 0, $config['topic_preview_limit']) : $first_post_preview_text; // use last space before the character limit as the break-point, if one exists $new_char_limit = utf8_strrpos($first_post_preview_text, ' ') != false ? utf8_strrpos($first_post_preview_text, ' ') : $config['topic_preview_limit']; $first_post_preview_text = utf8_substr($first_post_preview_text, 0, $new_char_limit) . '...'; } } // END Topic Preview Mod // Send vars to template $template->assign_block_vars('topicrow', array('SOLVED_TOPIC' => $row['topic_solved'] && $row['topic_type'] != POST_GLOBAL ? $forum_data['forum_solve_text'] ? $forum_data['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED') : '', 'U_SOLVED_TOPIC' => $row['topic_solved'] && $row['topic_type'] != POST_GLOBAL ? $view_topic_url . '&p=' . $row['topic_solved'] . '#p' . $row['topic_solved'] : '', 'SOLVED_STYLE' => $forum_data['forum_solve_color'] ? ' style="color: #' . $forum_data['forum_solve_color'] . '"' : '', 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'), 'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt], 'TOPIC_FOLDER_IMG_WIDTH' => $user->img($folder_img, '', false, '', 'width'), 'TOPIC_FOLDER_IMG_HEIGHT' => $user->img($folder_img, '', false, '', 'height'), 'TOPIC_PREVIEW_TEXT' => isset($first_post_preview_text) ? censor_text($first_post_preview_text) : '', 'TOPIC_ICON_IMG' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['img'] : '', 'TOPIC_ICON_IMG_WIDTH' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['width'] : '', 'TOPIC_ICON_IMG_HEIGHT' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['height'] : '', 'ATTACH_ICON_IMG' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment'] ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'UNAPPROVED_IMG' => $topic_unapproved || $posts_unapproved ? $user->img('icon_topic_unapproved', $topic_unapproved ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '', 'S_TOPIC_TYPE' => $row['topic_type'], 'S_USER_POSTED' => isset($row['topic_posted']) && $row['topic_posted'] ? true : false, 'S_UNREAD_TOPIC' => $unread_topic, 'S_TOPIC_REPORTED' => !empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id) ? true : false, 'S_TOPIC_UNAPPROVED' => $topic_unapproved, 'S_POSTS_UNAPPROVED' => $posts_unapproved, 'S_HAS_POLL' => $row['poll_start'] ? true : false, 'S_POST_ANNOUNCE' => $row['topic_type'] == POST_ANNOUNCE ? true : false, 'S_POST_GLOBAL' => $row['topic_type'] == POST_GLOBAL ? true : false, 'S_POST_STICKY' => $row['topic_type'] == POST_STICKY ? true : false, 'S_TOPIC_LOCKED' => $row['topic_status'] == ITEM_LOCKED ? true : false, 'S_TOPIC_MOVED' => $row['topic_status'] == ITEM_MOVED ? true : false, 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", $view_topic_url_params . '&view=unread') . '#unread', 'U_LAST_POST' => @$phpbb_seo->seo_opt['no_dupe']['on'] ? append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . ($row['forum_id'] ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id . '&start=' . @intval($phpbb_seo->seo_opt['topic_last_page'][$topic_id])) . '#p' . $row['topic_last_post_id'] : append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_VIEW_TOPIC' => $view_topic_url, 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", 'i=reports&mode=reports&f=' . $forum_id . '&t=' . $topic_id, true, $user->session_id), 'U_MCP_QUEUE' => $u_mcp_queue, 'S_TOPIC_TYPE_SWITCH' => $s_type_switch == $s_type_switch_test ? -1 : $s_type_switch_test)); $s_type_switch = $row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL ? 1 : 0; if ($unread_topic) { $mark_forum_read = false; } unset($rowset[$topic_id]);
?> </h3> </div> <div class="thumbnail"> <img class="avatar" src="<?php echo $n->Users->getAvatar(50); ?> " alt="<?php echo $n['Users']['username']; ?> " /> </div> <p><?php echo mb_substr(bbcode_strip($n['description']), 0, 220, 'UTF-8'); ?> ...</p> <hr class="clrfx" /> </a> <?php } ?> </div> <div id="droite" class="span6"> <div class="well"> <?php if (isset($form)) { ?> <?php
function _sendPMSuddeimMSG($udde_toid,$udde_fromid,$to,$from,$sub,$msg) { global $_CB_database, $_CB_framework; $params = $this->params; $pmsType = $params->get('pmsType', '1'); $udde_sysm = "System"; $config_realnames = "0"; $config_cryptmode = 0; $config_cryptkey = 'uddeIMcryptkey'; if ($pmsType==4) { // uddeIM 1.0+ require_once( $_CB_framework->getCfg('absolute_path') . "/components/com_uddeim/crypt.class.php"); if(file_exists( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/config.class.php")) { include_once( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/config.class.php"); } $config = new uddeimconfigclass(); if(isset($config->sysm_username)) { $udde_sysm = $config->sysm_username; } if (isset($config->realnames)) { $config_realnames = $config->realnames; } if (isset($config->cryptmode)) { $config_cryptmode = $config->cryptmode; } if (file_exists( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/uddeim_crypt.php" )) { require_once ( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/uddeim_crypt.php" ); } if (isset($config->cryptkey)) { $config_cryptkey = $config->cryptkey; } } else { if(file_exists( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/uddeim_config.php")) { include_once( $_CB_framework->getCfg('absolute_path') . "/administrator/components/com_uddeim/uddeim_config.php"); } if(isset($config_sysm_username)) { $udde_sysm = $config_sysm_username; } } // format the message if($sub) { // is actually impossible $udde_msg = "[b]".$sub."[/b]\n\n".$msg; } else { $udde_msg = $msg; } // strip any bb code that might be present, but only in 0.4 if($pmsType==3) { require_once ( $_CB_framework->getCfg('absolute_path') . '/components/com_uddeim/bbparser.php' ); $udde_msg=bbcode_strip($udde_msg); } // now strip the remaining html tags $udde_msg = strip_tags($udde_msg); // escape dangerous stuff // not necessary, already escaped before this internal function gets called // get current time but recognize time offset $currentTime=time(); $udde_time=$this->_pmsUddeGetTime($currentTime); // set the udde systemmessage username to the virtual sender $udde_sysm=$from; if ($config_cryptmode==1) { if (function_exists('uddeIMencrypt')) { // this added for uddeIM 1.4+ $cm = uddeIMencrypt($udde_msg,$config_cryptkey,CRYPT_MODE_BASE64); } else { $cm = Encrypt($udde_msg,$config_cryptkey,CRYPT_MODE_BASE64); } $sql="INSERT INTO #__uddeim (fromid, toid, message, datum, cryptmode, crypthash) VALUES (".$udde_fromid.", ".$udde_toid.", '".$cm."', ".$udde_time.",1,'".md5($config_cryptkey)."')"; } else { $sql="INSERT INTO #__uddeim (fromid, toid, message, datum) VALUES (".$udde_fromid.", ".$udde_toid.", '".$udde_msg."', ".$udde_time.")"; } // now insert the message if($udde_fromid && $udde_toid) { $_CB_database->SetQuery($sql); if (!$_CB_database->query()) { die("SQL error" . $_CB_database->stderr(true)); } } $udde_msgid = $_CB_database->insertid(); // E-Mail notification code $udde_sysm=""; $this->_pmsUddeNotify($udde_msgid, $udde_fromid, $udde_toid, $udde_msg, $udde_sysm); }
$next_img = '<img src="' . $phpbb_root_path . "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/images/next_line.gif" height="9px" width="11px" alt="" />'; } else { $next_img = '<img src="' . $phpbb_root_path . 'images/next_line.gif" height="9px" width="11px" alt="" />'; } for ($i = 0; $i < $display_this_many; $i++) { $unique = $row[$i]['forum_id'] == $last_forum ? false : true; //echo 'Forum ID = ' . $row[$i]['forum_id'] . ' Compare to: '; echo $row[$i - $number_of_topics_per_forum]['forum_id'] . '<br />'; if ($i >= $number_of_topics_per_forum && $row[$i]['forum_id'] == $row[$i - $number_of_topics_per_forum]['forum_id']) { continue; } // reduce length and pad with ... if too long // $my_title = smilies_pass($row[$i]['topic_title']); if (strlen($my_title) > 25) { sgp_checksize($my_title, 25); } // reduce length and pad with ... if too long // $forum_name = smilies_pass($row[$i]['forum_name']); if (strlen($forum_name) > 25) { sgp_checksize($forum_name, 25); } //$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row[$i]['forum_id']) ? $row[$i]['forum_id'] : $forum_id) ); $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.{$phpEx}", 'f=' . $row[$i]['forum_id']); if ($row[$i]['post_edit_time'] > $row[$i]['topic_last_post_time']) { $this_post_time = '*<span style="font-style:italic">' . $user->format_date($row[$i]['post_edit_time']) . '</span>'; } else { $this_post_time = $user->format_date($row[$i]['topic_last_post_time']); } $template->assign_block_vars($style_row . 'recent_topic_row', array('LAST_POST_IMG_W' => $user->img('icon_topic_newest', 'VIEW_LATEST_POST'), 'LAST_POST_IMG_W' => $next_img, 'FORUM_W' => $forum_name, 'U_FORUM_W' => append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . '=' . $row[$i]['forum_id']), 'TITLE_W' => censor_text($my_title), 'U_TITLE_W' => $view_topic_url . '&p=' . $row[$i]['topic_last_post_id'] . '#p' . $row[$i]['topic_last_post_id'], 'POSTER_FULL_W' => get_username_string('full', $row[$i]['topic_last_poster_id'], $row[$i]['topic_last_poster_name'], $row[$i]['topic_last_poster_colour']), 'POSTTIME_W' => $this_post_time, 'S_ROW_COUNT_W' => $i, 'S_UNIQUE_W' => $unique, 'S_TYPE_W' => $row[$i]['topic_type'], 'TOOLTIP_W' => bbcode_strip($row[$i]['post_text']), 'TOOLTIP2_W' => bbcode_strip($row[$i]['forum_desc']))); $last_forum = $row[$i]['forum_id']; } $template->assign_vars(array('S_COUNT_RECENT' => $i > 0 ? true : false, 'SEARCH_TYPE' => !$search_days ? $user->lang['FULL_SEARCH'] : $user->lang['SEARCH_DAYS'] . $search_days, 'SEARCH_LIMIT' => $user->lang['T_LIMITS'] . $number_of_topics_per_forum . $user->lang['TOPICS_PER_FORUM_DISPLAY'] . $display_this_many . ' ' . $user->lang['POSTS'], 'RECENT_TOPICS_WIDE_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));