Habe Probleme beim Einbau des recent linkz on portal Mod (Adaption für linlz Mod pro von snailsource).
http://www.hohenau.net/forum/portal.php
Siehe topic http://www.snailsource.com/forum/viewto ... sc&start=0
Da keinerlei Werte im Portal ausgegeben werden, hapert es vielelicht in folgendem Code:
Code: Alles auswählen
//
// Recent Links (Mod'd for use with Linkz Pro @ Snailsource.com)
//
if(!defined('LINKS_COMMON')) {
define('LINKS_COMMON', $table_prefix.'linkz_common');
define('LINKS_CONFIG', $table_prefix.'linkz_config');
define('LINKS_CAT', $table_prefix.'linkz_cat');
define('LINKS_URL', $table_prefix.'linkz_url');
define('LINKS_URL_CAT', $table_prefix.'linkz_url2cat');
define('LINKS_URL_GROUP', $table_prefix.'linkz_url2group');
}
// Default number of recent links to show.
$board_config['recent_links'] = (isset($board_config['recent_links'])) ? $board_config['recent_links'] : 10;
// Set language field if not already done
$lang['Recent_links'] = isset($lang['Recent_links']) ? $lang['Recent_links'] : 'Recent Links';
// Get group array
if(!function_exists('get_groups')) {
require('./includes/linkz/links_functions.'.$phpEx);
}
$groups = get_groups($userdata['user_id']);
$sql = "SELECT com.common_id, l.url_link, com.url_name, com.url_desc, c.cat_name, c.cat_id, u.username, u.user_id
FROM " . LINKS_URL . " l, " .
LINKS_COMMON . " com, " .
LINKS_CAT . " c, " .
LINKS_URL_CAT . " uc, " .
LINKS_URL_GROUP . " lg, " .
USERS_TABLE . " u
WHERE l.valid = 1
AND l.common_ref = com.common_id
AND com.common_id = uc.common_ref
AND uc.cat_ref = c.cat_id
AND com.sub_user_ref = u.user_id AND ";
// START Find any relevant group restricted events
if($groups) {
unset($sql_groups);
// If the user is member of 1+ usegroups then check for these results too.
reset($groups);
while(list(,$group) = each($groups)) {
if(count($groups > 1) && isset($sql_groups)) {
$sql_groups .= " OR ";
}
$sql_groups .= "lg.group_ref = ".$group['group_id'];
}
$sql_access = '(com.access_level = 2 AND ('.$sql_groups.' OR lg.group_ref IS NULL OR lg.group_ref = 0))';
}
$sql .= ($sql_access) ? '('.$sql_access.' OR com.access_level = 0) ' : 'com.access_level = 0';
// Find any group only events
$sql .= " ORDER BY com.date_add DESC, com.date_mod DESC
LIMIT 0,".$board_config['recent_links'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query links information', '', __LINE__, __FILE__, $sql);
}
$rows = array();
$prev_link = 0;
while($row = $db->sql_fetchrow($result)) {
if($row['common_id'] != $prev_link) {
$rows[] = $row;
}
$prev_link = $row['common_id'];
}
foreach($rows AS $row) {
$template->assign_block_vars('recent_links', array(
'LINK_URL' => '<a href="'.append_sid("links.$phpEx?func=show&id=" . $row['common_id']).'" target="_blank" onMouseOver="document.all.recent_links.stop()" onMouseOut="document.all.recent_links.start()"><b>'.$row['url_name'].'</b></a>',
'LINK_CAT' => '<a href="'.append_sid("links.$phpEx?id=" . $row['cat_id']).'" onMouseOver="document.all.recent_links.stop()" onMouseOut="document.all.recent_links.start()"><i>'.$row['cat_name'].'</i></a>',
'LINK_DESC' => $row['url_desc'],
'LINK_AUTHOR' => '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']).'" onMouseOver="document.all.recent_links.stop()" onMouseOut="document.all.recent_links.start()">'.$row['username'].'</a>')
);
}
$template->assign_vars(array(
'L_RECENT_LINKS' => $lang['Recent_links'])
);