9
   

phpBB Search Engine Optimization - Sessions, static ( SEO )

 
 
eshu
 
  1  
Tue 18 May, 2004 07:28 am
Thanks!
I just check the code again, and now I know why I can't find the code slice, for I install the split topic type Mod.

The new viewforum.php has the following part code:
Code:
.....
// Okay, lets dump out the page ...
//
// adjust the item id
for ($i=0; $i < count($topic_rowset); $i++)
{
$topic_rowset[$i]['topic_id'] = POST_TOPIC_URL . $topic_rowset[$i]['topic_id'];
}

// set the bottom sort option
$footer = $lang['Display_topics'] . ': ' . $select_topic_days . ' ' . ( !empty($s_display_order) ? $s_display_order : '') . '<input type="submit" class="liteoption" value="' . $lang['Go'] . '" name="submit" />';

// send the list
$allow_split_type = true;
$display_nav_tree = false;
topic_list('TOPICS_LIST_BOX', 'topics_list_box', $topic_rowset, '', $allow_split_type, $display_nav_tree, $footer);

//---------------------------------------
//
// Note : all the code that was standing there stands now in functions_topics_list.php, topic_list() func
//
//---------------------------------------
$topics_count -= $total_announcements;

$template->assign_vars(array(
'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),

'L_GOTO_PAGE' => $lang['Goto_page'])
);

//
// Parse the page and print
//
$template->pparse('body');

//
// Page footer
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>


and the topic_list() func in the functions_topics_list.php is:


Code:

function topic_list($box, $tpl='', $topic_rowset, $list_title='', $split_type=false, $display_nav_tree=true, $footer='', $inbox=true, $select_field='', $select_type=0, $select_formname='', $select_values=array())
{
global $db, $template, $board_config, $userdata, $phpEx, $lang, $images, $HTTP_COOKIE_VARS;
global $tree;
static $box_id;

// save template state
$sav_tpl = $template->_tpldata;

// init
if (empty($tpl))
{
$tpl = 'topics_list_box';
}
if (empty($list_title))
{
$list_title = $lang['Topics'];
}
if (!empty($select_values) && !is_array($select_values) )
{
$s_values = $select_values;
$select_values = array();
$select_values[] = $s_values;
}

// selections
$select_multi = false;
$select_unique = false;
if (!empty($select_field) && ($select_type > 0) && !empty($select_formname) )
{
switch ($select_type)
{
case 1:
$select_multi = true;
break;
case 2:
$select_unique = true;
break;
}
}

// get split params
$switch_split_global_announce = (isset($board_config['split_global_announce']) && isset($lang['Post_Global_Announcement'])) ? intval($board_config['split_global_announce']) : false;
$switch_split_announce = isset($board_config['split_announce']) ? intval($board_config['split_announce']) : false;
$switch_split_sticky = isset($board_config['split_sticky']) ? intval($board_config['split_sticky']) : false;

// set in separate table
$split_box = $inbox && (isset($board_config['split_topic_split']) ? intval($board_config['split_topic_split']) : false);

// take care of the context
if (!$split_type)
{
$split_box = false;
$switch_split_global_announce = false;
$switch_split_announce = false;
$switch_split_sticky = false;
}

if (!$switch_split_global_announce && !$switch_split_announce && !$switch_split_sticky)
{
$split_type = false;
$split_box = false;
}

// Define censored word matches
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);

// read the user cookie
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
$tracking_all = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) ? intval($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) : NULL;

// categories hierarchy v 2 compliancy
$cat_hierarchy = function_exists(get_auth_keys);
if (!$cat_hierarchy)
{
// standard read
$is_auth = array();
$is_auth = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata);
}

// topic icon present
$icon_installed = function_exists(get_icon_title);

// get a default title
if (empty($list_title))
{
$list_title = $lang['forum'];
}

// choose template
$template->set_filenames(array(
$tpl => $tpl . '.tpl')
);

// check if user replied to the topics
$user_topics = array();
if ($userdata['user_id'] != ANONYMOUS)
{
// get all the topic ids to display
$topic_ids = array();
for ($i = 0; $i < count($topic_rowset); $i++)
{
$topic_item_type = substr($topic_rowset[$i]['topic_id'], 0, 1);
$topic_id = intval(substr($topic_rowset[$i]['topic_id'], 1));
if ( $topic_item_type == POST_TOPIC_URL )
{
$topic_ids[] = $topic_id;
}
}
// check if the user replied to
if (!empty($topic_ids))
{
// check the posts
$s_topic_ids = implode(', ', $topic_ids);
$sql = "SELECT DISTINCT topic_id FROM " . POSTS_TABLE . "
WHERE topic_id IN ($s_topic_ids)
AND poster_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post information', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$user_topics[POST_TOPIC_URL . $row['topic_id']] = true;
}
}
}

// initiate
$template->assign_block_vars($tpl, array(
'FORMNAME' => $select_formname,
'FIELDNAME' => $select_field,
)
);

// spanning of the first column (list name)
$span_left = 1;
if ( count($topic_rowset) > 0 )
{
// add folder image
$span_left++;
}
if ( $icon_installed )
{
// add topic icon
$span_left++;
}
if ( $select_unique )
{
// selection in front is asked
$span_left++;
}
// spanning of the whole line (bottom row and/or empty list)
$span_all = $span_left + 4;
if ( $select_multi && (count($topic_rowset) >0) )
{
$span_all++;
}

// display topics
$color = false;
$prec_topic_type = '';
$header_sent = false;
if (!isset($box_id)) $box_id = -1;
for ($i=0; $i < count($topic_rowset); $i++)
{
$topic_item_type = substr($topic_rowset[$i]['topic_id'], 0, 1);
$topic_id = intval(substr($topic_rowset[$i]['topic_id'], 1));
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
$replies = $topic_rowset[$i]['topic_replies'];
$topic_type = $topic_rowset[$i]['topic_type'];
$user_replied = ( !empty($user_topics) && isset($user_topics[$topic_rowset[$i]['topic_id']]) );
$force_type_display = false;
$forum_id = $topic_rowset[$i]['forum_id'];

if ( defined('POST_BIRTHDAY') && ($topic_type == POST_BIRTHDAY) )
{
$topic_type = $lang['Birthday'] . ': ';
}
else if( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = $lang['Topic_Global_Announcement'] . ' ';
}
else if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
else
{
$topic_type = '';
}
if( $topic_rowset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
$force_type_display = true;
}
if (defined('POST_BIRTHDAY') && ($topic_rowset[$i]['topic_type'] == POST_BIRTHDAY))
{
$folder_image = $images['folder_birthday'];
$folder_alt = $lang['Happy_birthday'];
$newest_post_img = '';
}
else if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . ' ';
$topic_id = $topic_rowset[$i]['topic_moved_id'];
$folder_image = $images['folder'];
$folder_alt = $lang['Topics_Moved'];
$newest_post_img = '';
$force_type_display = true;
}
else
{
if( defined('POST_BIRTHDAY') && ($topic_rowset[$i]['topic_type'] == POST_BIRTHDAY) )
{
$folder = $images['folder_birthday'];
$folder_new = $images['folder_birthday'];
}
else if( $topic_rowset[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_global_announce_own'] : $images['folder_global_announce'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_global_announce_new_own'] : $images['folder_global_announce_new'];
}
else if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_announce_own'] : $images['folder_announce'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_announce_new_own'] : $images['folder_announce_new'];
}
else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_own'] : $images['folder_sticky'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_new_own'] : $images['folder_sticky_new'];
}
else if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_locked_own'] : $images['folder_locked'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_locked_new_own'] : $images['folder_locked_new'];
}
else
{
if($replies >= $board_config['hot_threshold'])
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_hot_own'] : $images['folder_hot'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_hot_new_own'] : $images['folder_hot_new'];
}
else
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_own'] : $images['folder'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_new_own'] : $images['folder_new'];
}
}
$newest_post_img = '';
if ( $userdata['session_logged_in'] && ($topic_item_type == POST_TOPIC_URL) )
{
if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
if( !empty($tracking_topics) || !empty($tracking_forums) || !empty($tracking_all) )
{
$unread_topics = true;
if( !empty($tracking_topics[$topic_id]) )
{
if( $tracking_topics[$topic_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if( !empty($tracking_forums[$forum_id]) )
{
if( $tracking_forums[$forum_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if( !empty($tracking_all) )
{
if( $tracking_all >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
}
}
if ( $unread_topics )
{
$folder_image = $folder_new;
$folder_alt = $lang['New_posts'];
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder_new;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['New_posts'];
$newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}
else
{
$folder_image = $folder;
$folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
$newest_post_img = '';
}
}

// generate list of page for the topic
$goto_page = '';
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
$total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
$times = 1;
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
$goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>';
if( $times == 1 && $total_pages > 4 )
{
$goto_page .= ' ... ';
$times = $total_pages - 3;
$j += ( $total_pages - 4 ) * $board_config['posts_per_page'];
}
else if ( $times < $total_pages )
{
$goto_page .= ', ';
}
$times++;
}
$goto_page .= ' ] ';
}

$topic_author = '';
$first_post_time = '';
$last_post_time = '';
$last_post_url = '';
$views = '';
switch ($topic_item_type)
{
case POST_USERS_URL:
$view_topic_url = append_sid("profile.$phpEx?" . POST_USERS_URL . "=$topic_id");
break;
default:
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
$first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
$last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>';
$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
$views = $topic_rowset[$i]['topic_views'];
break;
}

// categories hierarchy v 2 compliancy
$nav_tree = '';
if ( $display_nav_tree && !empty($topic_rowset[$i]['forum_id']) )
{
if ($cat_hierarchy)
{
if ($tree['auth'][POST_FORUM_URL . $topic_rowset[$i]['forum_id']]['tree.auth_view'])
{
$nav_tree = make_cat_nav_tree(POST_FORUM_URL . $topic_rowset[$i]['forum_id'], '', 'gensmall');
}
}
else
{
if ($is_auth[ $topic_rowset[$i]['forum_id'] ]['auth_view'])
{
$nav_tree = '<a href="' . append_sid("viewforum.$phpEx?f=" . $topic_rowset[$i]['forum_id']) . '" class="gensmall">' . $topic_rowset[$i]['forum_name'] . '</a>';
}
}
}
if (!empty($nav_tree))
{
$nav_tree = '[ ' . $nav_tree . ' ]';
}

// get the type for rupture
$topic_real_type = $topic_rowset[$i]['topic_type'];

// if no split between global and standard announcement, group them with standard announcement
if ( !$switch_split_global_announce && ($topic_real_type == POST_GLOBAL_ANNOUNCE) ) $topic_real_type = POST_ANNOUNCE;

// if no split between announce and sticky, group them with sticky
if ( !$switch_split_announce && ($topic_real_type == POST_ANNOUNCE) ) $topic_real_type = POST_STICKY;

// if no split between sticky and normal, group them with normal
if ( !$switch_split_sticky && ($topic_real_type == POST_STICKY) ) $topic_real_type = POST_NORMAL;

// check if rupture
$rupt = false;

// split
if ( ($i == 0) || $split_type )
{
if ($i == 0)
{
$rupt = true;
}

// check the rupt
if ($prec_topic_type != $topic_real_type)
{
$rupt = true;
}
}
$prec_topic_type = $topic_real_type;

// header
if ($rupt)
{
// close the prec box
if ($split_box && ($i != 0))
{
// footer
$template->assign_block_vars($tpl . '.row', array(
'COLSPAN' => $span_all,
)
);

// table closure
$template->assign_block_vars($tpl . '.row.footer_table', array());

// spacing
$template->assign_block_vars($tpl . '.row', array());
$template->assign_block_vars($tpl . '.row.spacer', array());

// unset header
$header_sent = false;
}

// get box title
$main_title = $list_title;
$sub_title = $list_title;
switch ($topic_real_type)
{
case POST_BIRTHDAY:
$sub_title = $lang['Birthday'];
break;
case POST_GLOBAL_ANNOUNCE:
$sub_title = $lang['Post_Global_Announcement'];
break;
case POST_ANNOUNCE:
$sub_title = $lang['Post_Announcement'];
break;
case POST_STICKY:
$sub_title = $lang['Post_Sticky'];
break;
case POST_CALENDAR:
$sub_title = $lang['Calendar_event'];
break;
case POST_NORMAL:
$sub_title = $lang['Topics'];
break;
}
$template->assign_block_vars($tpl . '.row', array(
'L_TITLE' => (!$split_box) ? $main_title : $sub_title,
'L_REPLIES' => $lang['Replies'],
'L_AUTHOR' => $lang['Author'],
'L_VIEWS' => $lang['Views'],
'L_LASTPOST' => $lang['Last_Post'],
'COLSPAN' => $span_all,
)
);

// open a new box
if ($split_box || ($i == 0))
{
$box_id++;
$template->assign_block_vars($tpl . '.row.header_table', array(
'COLSPAN' => $span_left,
'BOX_ID' => $box_id,
)
);

// selection fields
if ($select_multi)
{
$template->assign_block_vars($tpl . '.row.header_table.multi_selection', array());
}

// set header
$header_sent = true;
}

// not in box, send a row title
if ($split_type && !$split_box)
{
$template->assign_block_vars($tpl . '.row', array(
'L_TITLE' => $sub_title,
'COLSPAN' => $span_all,
)
);
$template->assign_block_vars($tpl . '.row.header_row', array());
}
}

// erase the type before the title if split
if ( $split_type && ($topic_real_type == $topic_rowset[$i]['topic_type']) && !$force_type_display)
{
$topic_type = '';
}

// get the announces dates
$topic_announces_dates = '';
if (function_exists(get_announces_title) && in_array( $topic_rowset[$i]['topic_type'], array(POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE)))
{
$topic_announces_dates = get_announces_title($topic_rowset[$i]['topic_time'], $topic_rowset[$i]['topic_announce_duration']);
}

// get the calendar dates
$topic_calendar_dates = '';
if (function_exists(get_calendar_title))
{
$topic_calendar_dates = get_calendar_title($topic_rowset[$i]['topic_calendar_time'], $topic_rowset[$i]['topic_calendar_duration']);
}

// get the topic icons
$icon = '';
if ($icon_installed)
{
$type = $topic_rowset[$i]['topic_type'];
if ($type == POST_NORMAL)
{
if ( defined('POST_CALENDAR') && !empty($topic_rowset[$i]['topic_calendar_time']) )
{
$type = POST_CALENDAR;
}
if ( defined('POST_PICTURE') && !empty($topic_rowset[$i]['topic_pic_url']) )
{
$type = POST_PICTURE;
}
}
$icon = get_icon_title($topic_rowset[$i]['topic_icon'], 1, $type);
}

// send topic to template
$selected = (!empty($select_values) && in_array($topic_rowset[$i]['topic_id'], $select_values));
$color = !$color;
$template->assign_block_vars( $tpl . '.row', array(
'ROW_CLASS' => ($color || !defined('TOPIC_ALTERNATE_ROW_CLASS')) ? 'row1' : 'row2',
'ROW_FOLDER_CLASS' => ($user_replied && defined('USER_REPLIED_CLASS')) ? USER_REPLIED_CLASS : ( ($color || !defined('TOPIC_ALTERNATE_ROW_CLASS')) ? 'row1' : 'row2' ),
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_FOLDER_IMG' => $folder_image,
'TOPIC_AUTHOR' => $topic_author,
'GOTO_PAGE' => !empty($goto_page) ? '<br />' . $goto_page : '',
'TOPIC_NAV_TREE' => !empty($nav_tree) ? (empty($goto_page) ? '<br />' : '') . $nav_tree : '',
'REPLIES' => $replies,
'NEWEST_POST_IMG' => $newest_post_img,
'ICON' => $icon,
'TOPIC_TITLE' => $topic_title,
'TOPIC_ANNOUNCES_DATES' => $topic_announces_dates,
'TOPIC_CALENDAR_DATES' => $topic_calendar_dates,
'TOPIC_TYPE' => $topic_type,
'VIEWS' => $views,
'FIRST_POST_TIME' => $first_post_time,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_AUTHOR' => $last_post_author,
'LAST_POST_IMG' => $last_post_url,
'L_TOPIC_FOLDER_ALT' => $folder_alt,
'U_VIEW_TOPIC' => $view_topic_url,
'BOX_ID' => $box_id,
'FID' => $topic_rowset[$i]['topic_id'],
'L_SELECT' => ($selected && ($select_multi || $select_unique)) ? 'checked="checked"' : '',
)
);
$template->assign_block_vars( $tpl . '.row.topic', array());

// selection fields
if ($select_multi)
{
$template->assign_block_vars($tpl . '.row.topic.multi_selection', array());
}
if ($select_unique)
{
$template->assign_block_vars($tpl . '.row.topic.single_selection', array());
}

// icons
if ($icon_installed)
{
$template->assign_block_vars( $tpl . '.row.topic.icon', array());
}

// nav tree asked
if ($display_nav_tree && !empty($nav_tree))
{
$template->assign_block_vars( $tpl . '.row.topic.nav_tree', array());
}
} // end for topic_rowset read

// send an header if missing
if (!$header_sent)
{
$template->assign_block_vars($tpl . '.row', array(
'L_TITLE' => $list_title,
'L_REPLIES' => $lang['Replies'],
'L_AUTHOR' => $lang['Author'],
'L_VIEWS' => $lang['Views'],
'L_LASTPOST' => $lang['Last_Post'],
'COLSPAN' => $span_all,
)
);

// open a new box
$template->assign_block_vars($tpl . '.row.header_table', array(
'COLSPAN' => $span_left,
)
);
}

// no data
if (count($topic_rowset) == 0)
{
// send no topics notice
$template->assign_block_vars( $tpl . '.row', array(
'L_NO_TOPICS' => $lang['No_search_match'],
'COLSPAN' => $span_all,
)
);
$template->assign_block_vars( $tpl . '.row.no_topics', array());
}

// bottom line
if (!empty($footer))
{
$template->assign_block_vars( $tpl . '.row', array(
'COLSPAN' => $span_all,
'FOOTER' => $footer,
)
);
$template->assign_block_vars( $tpl . '.row.bottom', array());
}

// table closure
$template->assign_block_vars( $tpl . '.row', array(
'COLSPAN' => $span_all,
)
);
$template->assign_block_vars( $tpl . '.row.footer_table', array());

// spacing
if (empty($footer))
{
// spacing
$template->assign_block_vars($tpl . '.row', array());
$template->assign_block_vars($tpl . '.row.spacer', array());
}

// transfert to a var
$template->assign_var_from_handle('_box', $tpl);
$res = $template->_tpldata['.'][0]['_box'];

// restore template saved state
$template->_tpldata = $sav_tpl;

// assign value to the main template
$template->assign_vars(array($box => $res));
}


Hope you could help me for the change, Thanks a lot!
0 Replies
 
Craven de Kere
 
  1  
Tue 18 May, 2004 09:29 am
eshu,

I don't support other author's modifications. I can try to help you to a limited degree if you post the exact changes you need help with and the complete code for the files you need them applied on.
0 Replies
 
eshu
 
  1  
Tue 18 May, 2004 10:12 am
Ok, Thanks!
Thank you Craven .I'll try to change the code myself, since I installed lots Mods:)

I learned a lot of methods about the phpbb's SEO here, thank you very much!
0 Replies
 
khisanthax
 
  1  
Thu 20 May, 2004 06:00 pm
just out of curiousity, and I may have missed this, but for the mod rewrite what's your reason for making it for guests only instead of everyone?
0 Replies
 
AlpineZone
 
  1  
Fri 21 May, 2004 09:56 am
khisanthax wrote:
just out of curiousity, and I may have missed this, but for the mod rewrite what's your reason for making it for guests only instead of everyone?

You want to retain SIDs in order to provide a fully functional user experience. SIDs won't work with HTML pages. The point of the mod rewrite is to generate pages that look like static HTML pages to the SE spiders.
0 Replies
 
Craven de Kere
 
  1  
Fri 21 May, 2004 09:58 am
AlpineZone has it.

Basically, users who block cookies have to log in every time they load a static one so I made it for guests only.
0 Replies
 
celcom
 
  1  
Fri 21 May, 2004 08:28 pm
scriptwiz-phpbb-html-archiver.zip
at scriptwiz.com together with Able2know SEO ? Will it corrupt both mod_rewrite .
0 Replies
 
Craven de Kere
 
  1  
Fri 21 May, 2004 09:52 pm
There's no point in using html archiver together with this mod, it would be the antithesis to SEO as it is all just duplicate content. Don't use mirrors and such, that's just horrid SEO and the HTML archive is a terrible way of doing it. You should optimize the real pages, not create pseudo-pages just for search engines.
0 Replies
 
Chosos
 
  1  
Sat 22 May, 2004 09:16 pm
I can't get this to work right. My forums are in the subdomain "forums" and when i try to add in the rewrite portion, it kills my gfx, and wont link to nay of the html files. every link on the forum just fails to work.

Howeve, that is only the rewrite portion that does not work. The rest went in perfectly.

But i am stumpped. Am i not putting robots.txt in the right place? I threw it into the /html foler which is my room.
my other folder is ../forums with respect to the html one.

My dir structure is as follows.
/forums <-- forum content
/html <-- web content


Any help would be great.
0 Replies
 
Chosos
 
  1  
Sat 22 May, 2004 09:50 pm
Also... my index.php is now reporting my page title as YOUR SITE NAME. all the other forum pages work fine.
0 Replies
 
Chosos
 
  1  
Sat 22 May, 2004 10:48 pm
fixed my site index.. it was a value in lang_main that i fixed.
0 Replies
 
Chosos
 
  1  
Sat 22 May, 2004 11:58 pm
I fixed it...
the problem was that i am on a sub domain, and it needed to have the entire url for my site.

Code:RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) http://forums.fix-it.org/viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* http://forums.fix-it.org/viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* http://forums.fix-it.org/viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) http://forums.fix-it.org/viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest http://forums.fix-it.org/viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* http://forums.fix-it.org/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* http://forums.fix-it.org/viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* http://forums.fix-it.org/viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html http://forums.fix-it.org/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* http://forums.fix-it.org/viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* http://forums.fix-it.org/viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* http://forums.fix-it.org/viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html http://forums.fix-it.org/viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* http://forums.fix-it.org/viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* http://forums.fix-it.org/viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* http://forums.fix-it.org/viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* http://forums.fix-it.org/viewtopic.php?t=$1&view=next [L,NC]


this should help some of you with the same problem.
0 Replies
 
Shroom
 
  1  
Sun 23 May, 2004 07:51 am
easy as pie, yay pie
Thanks to everyone involved in writing the mod_rewrite modification and the SEO modification. It took me 10 minutes or less to install and had no problems whatsoever!
0 Replies
 
Tile
 
  1  
Mon 24 May, 2004 01:06 am
robots.txt
Hello Craven de Kere and thank you for a very nice and useful mod Smile

I have one little question for you:

Can I continue to use my robots.txt file just as it is:

User-agent: *
Disallow:

or I must change it to:

User-agent: *
Disallow:
Disallow: forum/post-*.html$
Disallow: forum/updates-topic.html*$
Disallow: forum/stop-updates-topic.html*$
Disallow: forum/ptopic*.html$
Disallow: forum/ntopic*.html$

or:

User-agent: *
Disallow:
Disallow: /forum/post-*.html$
Disallow: /forum/updates-topic.html*$
Disallow: /forum/stop-updates-topic.html*$
Disallow: /forum/ptopic*.html$
Disallow: /forum/ntopic*.html$

(I have "forum" folder, not "forums")

BR:

Tile
0 Replies
 
Farmernate
 
  1  
Mon 24 May, 2004 07:29 am
You should go ahead and change the "forums" to "forum" because your forum is configured differently then this one is. This one uses a forums folder but if you use phpBB, forum, or something else, just do a little editing and you should be fine.
0 Replies
 
Tile
 
  1  
Mon 24 May, 2004 09:11 am
My whole "forum" directory was cached by Google. Since I changed my robots.txt file from:

User-agent: *
Disallow:

to:

User-agent: *
Disallow:
Disallow: forum/post-*.html$
Disallow: forum/updates-topic.html*$
Disallow: forum/stop-updates-topic.html*$
Disallow: forum/ptopic*.html$
Disallow: forum/ntopic*.html$

index page is gone from the cache. What's wrong Question
0 Replies
 
Craven de Kere
 
  1  
Mon 24 May, 2004 10:19 am
Tile,

Remove this line:

Disallow:
0 Replies
 
Joe Belmaati
 
  1  
Mon 24 May, 2004 10:44 am
Installed 4 weeks ago
I installed this mod 4 weeks ago. Still no listings in Google
0 Replies
 
Craven de Kere
 
  1  
Mon 24 May, 2004 10:48 am
Joe,

Please do not use this thread to give updates or ask about Google listings, it's for support for specific code.
0 Replies
 
Tile
 
  1  
Mon 24 May, 2004 11:01 am
Craven de Kere wrote:
Tile,

Remove this line:

Disallow:


Thanks :wink:

BR

Tile
0 Replies
 
 

Related Topics

SEO - Going from 0 PR on up - Discussion by jespah
How Rich Pins work ??? - Question by OnceUponAtime
Need a bit of Google advice - Question by bible quizzer
Google Indexing Issue - Question by brainstudioz
Bing Search results - Discussion by iankyra
What is best way for Off-Page seo in 2017? - Question by honesttravel1
 
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.07 seconds on 11/27/2024 at 11:45:49