well what i did was install a unmoded version of nuke evo basic then add the advaced topic type and it worked then i add the display_first_message_as_hover_title_111 and it stoped working so i tryed it the other way rouned installed display_first_message_as_hover_title_111 then the advanced topics and advanced topics did not work again.
i think i narrowed it down to the viewforum.php but i dont understand code one bit lol here is the instuctions for display_first_message_as_hover_title_111 and dvaced topic type for viewforum can u see anything there ?
| Quote:
|
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/viewforum.php
#
#----[ FIND ]------------------------------------------
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Display First Message as Hover Title v1.1.1 ]
******************************************************/
if ( $is_auth['auth_read'] )
{
//
// character limit for hover title
//
$chr_limit = '1000';
$sql = "SELECT p.*, pt.post_text, pt.post_id, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
AND pt.post_id = p.post_id
ORDER BY p.post_time
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$first_post = $row['post_text'];
$first_post_bbcode_uid = $row['bbcode_uid'];
//
// if message is longer than character limit break message
// and add "..." at the last of message
//
if (strlen($first_post) > $chr_limit)
{
$first_post = substr($first_post, 0, $chr_limit);
$first_post .= '...';
}
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] )
{
if ( $row['enable_html'] )
{
$first_message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $first_post);
}
}
//
// Parse message for BBCode if required
//
if ( $board_config['allow_bbcode'] )
{
if ( $first_post_bbcode_uid != '' )
{
$first_post = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($first_post, $first_post_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $first_post);
}
}
//
// Parse smilies
//
if ( $board_config['allow_smilies'] )
{
if ( $row['enable_smilies'] )
{
$first_post = smilies_pass($first_post);
}
}
//
// replace \n with <br />
//
$first_post = preg_replace("/[\n\r]{1,2}/", '<br />', $first_post);
//
// escape from double and/or single quotes
//
$first_post = str_replace(array('"', '\''), array('"', '\\\''), $first_post);
//
// if message have [hide] [/hide] tags
// there will be an error message instead of normal message
//
if ( preg_match("/\[hide\]/i", $first_post) && preg_match("/\[\/hide\]/i", $first_post))
{
$first_post = '<strong>Protected message:</strong><br />If you are a <strong>*registered user*</strong> :<br />you must post a reply to this topic to see the message';
}
} // end of if auth read
else
{
$first_post = 'You are not authorized to view this message';
}
/*****[END]********************************************
[ Mod: Display First Message as Hover Title v1.1.1 ]
******************************************************/
#
#----[ FIND ]------------------------------------------
#
'TOPIC_FOLDER_IMG' => $folder_image,
'TOPIC_AUTHOR' => $topic_author,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Display First Message as Hover Title v1.1.1 ]
******************************************************/
'FIRST_POST' => $first_post,
/*****[END]********************************************
[ Mod: Display First Message as Hover Title v1.1.1 ]
******************************************************/
|
| Quote:
|
#
#-----[ FIND ]----------------------------------------------
#
AND t.topic_type <> " . POST_ANNOUNCE . "
#
#-----[ REPLACE WITH ]----------------------------------------------
#
AND t.topic_type = " . POST_STICKY . "
#-----[ FIND ]----------------------------------------------
#
$total_topics++;
}
$db->sql_freeresult($result);
#
#-----[ AFTER, ADD ]----------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
//
// All topic types added
//
$sql = "SELECT t.*, u.username, u.user_id, u.user_color_gc, u2.username as user2, u2.user_id as id2, u2.user_color_gc as color2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type > " . POST_GLOBAL_ANNOUNCE . "
AND t.topic_type_active = 1
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$total_add_types = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_add_types++;
}
$db->sql_freeresult($result);
//
// All normal posts and inactive topic types
//
$sql = "SELECT t.*, u.username, u.user_id, u.user_color_gc, u2.username as user2, u2.user_id as id2, u2.user_color_gc as color2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND ( (t.topic_type > ". POST_GLOBAL_ANNOUNCE ." AND t.topic_type_active = 0 ) OR t.topic_type = " . POST_NORMAL . " )
$limit_topics_time
ORDER BY t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$total_non_active = 0;
while( $row = $db->sql_fetchrow($result) )
{
$topic_rowset[] = $row;
$total_non_active++;
}
$db->sql_freeresult($result);
/*****[END]********************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
#-----[ FIND ]----------------------------------------------
#
$total_topics += $total_announcements;
#
#-----[ AFTER, ADD ]----------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
$total_topics += $total_add_types;
$total_topics += $total_non_active;
/*****[END]********************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
#-----[ FIND ]----------------------------------------------
#
//
// Okay, lets dump out the page ...
//
#
#-----[ AFTER, ADD ]----------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
$sql = "SELECT t.*, t1.topic_type_color AS announce_color, t2.topic_type_color AS sticky_color, t3.topic_type_color AS global_color
FROM ". TOPIC_ADD_TYPE_TABLE ." t,". TOPIC_ADD_TYPE_TABLE ." t1, ". TOPIC_ADD_TYPE_TABLE ." t2, ". TOPIC_ADD_TYPE_TABLE . " t3
WHERE t1.topic_type_name = 'announce'
AND t2.topic_type_name = 'sticky'
AND t3.topic_type_name = 'global'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
while ($tt_row = $db->sql_fetchrow($result))
{
$row[] = $tt_row;
$announce_color = '#'.$tt_row['announce_color'];
$sticky_color = '#'.$tt_row['sticky_color'];
$global_color = '#'.$tt_row['global_color'];
}
/*****[END]********************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
#
#-----[ FIND ]----------------------------------------------
#
$topic_type = '';
#
#-----[ REPLACE WITH ]----------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = '<span style="color:'. $announce_color .'">'. $lang['Topic_Announcement'] . ' </span>';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = '<span style="color:'. $sticky_color .'">'. $lang['Topic_Sticky'] . ' </span>';
}
else if ( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = '<span style="color:'. $global_color .'">'. $lang['Topic_global_announcement'] . ' </span>';
}
else if( $topic_type > POST_GLOBAL_ANNOUNCE )
{
for($j = 0; $j < count($row); $j++ )
{
if( intval($topic_rowset[$i]['topic_type'] - POST_ADD_TYPE) == $row[$j]['topic_type_order'] )
{
$topic_type = '<span style="color:#'. $row[$j]['topic_type_color'] .'">'. $row[$j]['topic_type_name'] .':</span> ';
}
}
}
/*****[END]********************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
else
{
$topic_type = '';
}
#
#-----[ FIND AND REMOVE ]----------------------------------------------
#
$topic_title = "" . $board_config['global_view_open'] . " " . $topic_title . "" . $board_config['global_view_close'] . "";
#
#-----[ FIND AND REMOVE ]----------------------------------------------
#
$topic_title = "" . $board_config['announce_view_open'] . " " . $topic_title . "" . $board_config['announce_view_close'] . "";
#
#-----[ FIND AND REMOVE ]----------------------------------------------
#
$topic_title = "" . $board_config['sticky_view_open'] . " " . $topic_title . "" . $board_config['sticky_view_close'] . "";
#
#-----[ FIND AND REMOVE ]----------------------------------------------
#
$topic_title = "" . $board_config['locked_view_open'] . " " . $topic_title . "" . $board_config['locked_view_close'] . "";
#
#-----[ FIND ]----------------------------------------------
#
if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
#
#-----[ AFTER, ADD ]----------------------------------------------
#
/*****[BEGIN]******************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
else if( $topic_rowset[$i]['topic_type'] > POST_GLOBAL_ANNOUNCE )
{
if( $row[$i]['topic_type_image'] != '' )
{
$folder = $row[$i]['topic_type_image'];
$folder_new = $row[$i]['topic_type_image_new'];
}
else
{
$folder = $images['folder'];
$folder_new = $images['folder_new'];
}
}
/*****[END]********************************************
[ Mod: Advanced Topic Types v1.0.1 ]
******************************************************/
|
|