phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

[url=http://www.phpbbturkey.com/mods.html:34cnv4ga]phpBB 2.0.x MOD Veritabanımızda[/url:34cnv4ga] yayınlanan ve tarafınızca eklenen tüm yeni phpBB 2.0.x sürümleri için MODların duyuruları buradan yapılmaktadır. MODlar hakkında ihtiyacınız olan desteği lütfen [b:34cnv4ga]2.0.x MOD Destek[/b:34cnv4ga] forumuna başlık açarak sorunuz.
DjSerkanK
Kayıtlı Kullanıcı
Mesajlar: 31
Kayıt: 21.10.2005, 20:48
İletişim:

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen DjSerkanK »

Kod: Tümünü seç

<?php

/***************************************************************************

 *                                index.php

 *                            -------------------

 *   begin                : Saturday, Feb 13, 2001

 *   copyright            : (C) 2001 The phpBB Group

 *   email                : support@phpbb.com

 *

 *   $Id: index.php,v 1.99.2.3 2004/07/11 16:46:15 acydburn Exp $

 *

 *

 ***************************************************************************/



/***************************************************************************

 *

 *   This program is free software; you can redistribute it and/or modify

 *   it under the terms of the GNU General Public License as published by

 *   the Free Software Foundation; either version 2 of the License, or

 *   (at your option) any later version.

 *

 ***************************************************************************/



define('IN_PHPBB', true);

$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');

include($phpbb_root_path . 'common.'.$phpEx);



//

// Start session management

//

$userdata = session_pagestart($user_ip, PAGE_INDEX);

init_userprefs($userdata);

//

// End session management

//



$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;



if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )

{

	$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];

}

else

{

	$mark_read = '';

}



//

// Handle marking posts

//

if( $mark_read == 'forums' )

{

	if( $userdata['session_logged_in'] )

	{

		setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);

	}



	$template->assign_vars(array(

		"META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')

	);



	$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');



	message_die(GENERAL_MESSAGE, $message);

}

//

// End handle marking posts

//



$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();



//

// If you don't use these stats on your index you may want to consider

// removing them

//

$total_posts = get_db_stat('postcount');

$total_users = get_db_stat('usercount');

$newest_userdata = get_db_stat('newestuser');

$newest_user = $newest_userdata['username'];

$newest_uid = $newest_userdata['user_id'];



if( $total_posts == 0 )

{

	$l_total_post_s = $lang['Posted_articles_zero_total'];

}

else if( $total_posts == 1 )

{

	$l_total_post_s = $lang['Posted_article_total'];

}

else

{

	$l_total_post_s = $lang['Posted_articles_total'];

}



if( $total_users == 0 )

{

	$l_total_user_s = $lang['Registered_users_zero_total'];

}

else if( $total_users == 1 )

{

	$l_total_user_s = $lang['Registered_user_total'];

}

else

{

	$l_total_user_s = $lang['Registered_users_total'];

}





//

// Start page proper

//

$sql = "SELECT c.cat_id, c.cat_title, c.cat_order

	FROM " . CATEGORIES_TABLE . " c 

	ORDER BY c.cat_order";

if( !($result = $db->sql_query($sql)) )

{

	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);

}



$category_rows = array();

while( $category_rows[] = $db->sql_fetchrow($result) );

$db->sql_freeresult($result);



if( ( $total_categories = count($category_rows) ) )

{

	//

	// Define appropriate SQL

	//

	switch(SQL_LAYER)

	{

		case 'postgresql':

			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 

				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u

				WHERE p.post_id = f.forum_last_post_id 

					AND u.user_id = p.poster_id  

					UNION (

						SELECT f.*, NULL, NULL, NULL, NULL

						FROM " . FORUMS_TABLE . " f

						WHERE NOT EXISTS (

							SELECT p.post_time

							FROM " . POSTS_TABLE . " p

							WHERE p.post_id = f.forum_last_post_id  

						)

					)

					ORDER BY cat_id, forum_order";

			break;



		case 'oracle':

			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 

				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u

				WHERE p.post_id = f.forum_last_post_id(+)

					AND u.user_id = p.poster_id(+)

				ORDER BY f.cat_id, f.forum_order";

			break;



		default:

			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id

				FROM (( " . FORUMS_TABLE . " f

				LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )

				LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )

				ORDER BY f.cat_id, f.forum_order";

			break;

	}

	if ( !($result = $db->sql_query($sql)) )

	{

		message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);

	}



	$forum_data = array();

	while( $row = $db->sql_fetchrow($result) )

	{

		$forum_data[] = $row;

	}

	$db->sql_freeresult($result);



	if ( !($total_forums = count($forum_data)) )

	{

		message_die(GENERAL_MESSAGE, $lang['No_forums']);

	}



	//

	// Obtain a list of topic ids which contain

	// posts made since user last visited

	//

	if ( $userdata['session_logged_in'] )

	{

		$sql = "SELECT t.forum_id, t.topic_id, p.post_time 

			FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p 

			WHERE p.post_id = t.topic_last_post_id 

				AND p.post_time > " . $userdata['user_lastvisit'] . " 

				AND t.topic_moved_id = 0"; 

		if ( !($result = $db->sql_query($sql)) )

		{

			message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);

		}



		$new_topic_data = array();

		while( $topic_data = $db->sql_fetchrow($result) )

		{

			$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];

		}

		$db->sql_freeresult($result);

	}



	//

	// Obtain list of moderators of each forum

	// First users, then groups ... broken into two queries

	//

	$sql = "SELECT aa.forum_id, u.user_id, u.username 

		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u

		WHERE aa.auth_mod = " . TRUE . " 

			AND g.group_single_user = 1 

			AND ug.group_id = aa.group_id 

			AND g.group_id = aa.group_id 

			AND u.user_id = ug.user_id 

		GROUP BY u.user_id, u.username, aa.forum_id 

		ORDER BY aa.forum_id, u.user_id";

	if ( !($result = $db->sql_query($sql)) )

	{

		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);

	}



	$forum_moderators = array();

	while( $row = $db->sql_fetchrow($result) )

	{

		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';

	}

	$db->sql_freeresult($result);



	$sql = "SELECT aa.forum_id, g.group_id, g.group_name 

		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g 

		WHERE aa.auth_mod = " . TRUE . " 

			AND g.group_single_user = 0 

			AND g.group_type <> " . GROUP_HIDDEN . "

			AND ug.group_id = aa.group_id 

			AND g.group_id = aa.group_id 

		GROUP BY g.group_id, g.group_name, aa.forum_id 

		ORDER BY aa.forum_id, g.group_id";

	if ( !($result = $db->sql_query($sql)) )

	{

		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);

	}



	while( $row = $db->sql_fetchrow($result) )

	{

		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';

	}

	$db->sql_freeresult($result);



	//

	// Find which forums are visible for this user

	//

	$is_auth_ary = array();

	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);



	//

	// Start output of page

	//

	define('SHOW_ONLINE', true);

	$page_title = $lang['Index'];

	include($phpbb_root_path . 'includes/page_header.'.$phpEx);



	$template->set_filenames(array(

		'body' => 'index_body.tpl')

	);



	$template->assign_vars(array(

		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),

		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),

		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 



		'FORUM_IMG' => $images['forum'],

		'FORUM_NEW_IMG' => $images['forum_new'],

		'FORUM_LOCKED_IMG' => $images['forum_locked'],



		'L_FORUM' => $lang['Forum'],

		'L_TOPICS' => $lang['Topics'],

		'L_REPLIES' => $lang['Replies'],

		'L_VIEWS' => $lang['Views'],

		'L_POSTS' => $lang['Posts'],

		'L_LASTPOST' => $lang['Last_Post'], 

		'L_NO_NEW_POSTS' => $lang['No_new_posts'],

		'L_NEW_POSTS' => $lang['New_posts'],

		'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 

		'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 

		'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 



		'L_MODERATOR' => $lang['Moderators'], 

		'L_FORUM_LOCKED' => $lang['Forum_is_locked'],

		'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'], 



		'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))

	);

//------------------------------------------------------------------------ 

// 

// Get forum auth information to insure privacy of hidden topics 

$topics_auth = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata); 

$topics_auth_sql = ''; 

foreach($topics_auth as $k=>$v) 

{ 

if( $v['auth_view'] && $v['auth_read'] ) 

{ 

$topics_auth_sql .= (( empty($topics_auth_sql) ) ? '': ', ') . $k; 

} 

} 

// 

// Okay, let's build the topic recent and popular 

// 

$active_topics_sql = 'SELECT t.topic_id, t.topic_title, t.topic_replies, t.topic_views, t.topic_last_post_id 

FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE. ' f 

WHERE t.forum_id IN (' . $topics_auth_sql . ') 

AND f.forum_id = t.forum_id 

ORDER BY %1$s DESC 

LIMIT 0,10'; 

$active_topics_sql_a = sprintf($active_topics_sql, 'topic_last_post_id'); 

$active_topics_sql_b = sprintf($active_topics_sql, 'topic_replies'); 

$active_topics_sql_c = sprintf($active_topics_sql, 'topic_views'); 

$recent_row = $popular_row = $viewed_row = array(); 



if( !$active_topics_a = $db->sql_query($active_topics_sql_a)) 

{ 

message_die(GENERAL_ERROR, 'Could not retrieve recent topics', '', __LINE__, __FILE__, $active_topics_sql_a); 

} 

$recent_row = $db->sql_fetchrowset($active_topics_a); 

$db->sql_freeresult($active_topics_a); 



if( !$active_topics_b = $db->sql_query($active_topics_sql_b)) 

{ 

message_die(GENERAL_ERROR, 'Could not retrieve popular topics', '', __LINE__, __FILE__, $active_topics_sql_b); 

} 

$popular_row = $db->sql_fetchrowset($active_topics_b); 

$db->sql_freeresult($active_topics_b); 



if( !$active_topics_c = $db->sql_query($active_topics_sql_c)) 

{ 

message_die(GENERAL_ERROR, 'Could not retrieve most viewed topics', '', __LINE__, __FILE__, $active_topics_sql_c); 

} 

$viewed_row = $db->sql_fetchrowset($active_topics_c); 

$db->sql_freeresult($active_topics_c); 



$template->assign_vars(array( 

'L_TOPICSRECENT' => $lang['TopicsRecent'], 

'L_TOPICSPOPULAR' => $lang['TopicsPopular'], 

'L_TOPICSPOPULARVIEW' => $lang['TopicsPopularView']) 

); 



for( $i = 0; $i < 10; $i++ ) 

{ 

$recent_topic_title = $recent_row[$i]['topic_title']; 

$popular_topic_title = $popular_row[$i]['topic_title']; 

$viewed_topic_title = $viewed_row[$i]['topic_title']; 



if( strlen($recent_topic_title) > 40 ) 

{ 

$recent_topic_title = substr($recent_topic_title, 0, 40) . '...'; 

} 



if( strlen($popular_topic_title) > 40 ) 

{ 

$popular_topic_title = substr($popular_topic_title, 0, 40) . '...'; 

} 



if( strlen($viewed_topic_title) > 40 ) 

{ 

$viewed_topic_title = substr($viewed_topic_title, 0, 40) . '...'; 

} 



$recent_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id'] . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>'; 

$popular_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id'] . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>'; 

$popular_total_replies = $popular_row[$i]['topic_replies']; 

$viewed_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id'] . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>'; 

$viewed_total_replies = $viewed_row[$i]['topic_views']; 



$template->assign_block_vars('topicrecentpopular', array( 

'TOPICSPOPULAR' => $popular_post, 

'TOPICSPOPULARC' => $popular_total_replies, 

'TOPICSPOPULARVIEW' => $viewed_post, 

'TOPICSPOPULARVIEWC' => $viewed_total_replies, 

'TOPICSRECENT' => $recent_post) 

); 

} 

// 

//------------------------------------------------------------------------ 

	//

	// Okay, let's build the index

	//

	for($i = 0; $i < $total_categories; $i++)

	{

		$cat_id = $category_rows[$i]['cat_id'];



		//

		// Should we display this category/forum set?

		//

		$display_forums = false;

		for($j = 0; $j < $total_forums; $j++)

		{

			if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )

			{

				$display_forums = true;

			}

		}



		//

		// Yes, we should, so first dump out the category

		// title, then, if appropriate the forum list

		//

		if ( $display_forums )

		{

			$template->assign_block_vars('catrow', array(

				'CAT_ID' => $cat_id,

				'CAT_DESC' => $category_rows[$i]['cat_title'],

				//-- mod : seo urls v2 ---------------------------------------------------------
//-- delete
/*
				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
*/
//-- add
				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id", false, $category_rows[$i]['cat_title']))
//-- fin mod : seo urls v2 -----------------------------------------------------

			);



			if ( $viewcat == $cat_id || $viewcat == -1 )

			{

				for($j = 0; $j < $total_forums; $j++)

				{

					if ( $forum_data[$j]['cat_id'] == $cat_id )

					{

						$forum_id = $forum_data[$j]['forum_id'];



						if ( $is_auth_ary[$forum_id]['auth_view'] )

						{

							if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )

							{

								$folder_image = $images['forum_locked']; 

								$folder_alt = $lang['Forum_locked'];

							}

							else

							{

								$unread_topics = false;

								if ( $userdata['session_logged_in'] )

								{

									if ( !empty($new_topic_data[$forum_id]) )

									{

										$forum_last_post_time = 0;



										while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )

										{

											if ( empty($tracking_topics[$check_topic_id]) )

											{

												$unread_topics = true;

												$forum_last_post_time = max($check_post_time, $forum_last_post_time);



											}

											else

											{

												if ( $tracking_topics[$check_topic_id] < $check_post_time )

												{

													$unread_topics = true;

													$forum_last_post_time = max($check_post_time, $forum_last_post_time);

												}

											}

										}



										if ( !empty($tracking_forums[$forum_id]) )

										{

											if ( $tracking_forums[$forum_id] > $forum_last_post_time )

											{

												$unread_topics = false;

											}

										}



										if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )

										{

											if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )

											{

												$unread_topics = false;

											}

										}



									}

								}



								$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum']; 

								$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts']; 

							}



							$posts = $forum_data[$j]['forum_posts'];

							$topics = $forum_data[$j]['forum_topics'];



							if ( $forum_data[$j]['forum_last_post_id'] )

							{

								$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);



								$last_post = $last_post_time . '<br />';



								$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

								

								$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

							}

							else

							{

								$last_post = $lang['No_Posts'];

							}



							if ( count($forum_moderators[$forum_id]) > 0 )

							{

								$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];

								$moderator_list = implode(', ', $forum_moderators[$forum_id]);

							}

							else

							{

								$l_moderators = '&nbsp;';

								$moderator_list = '&nbsp;';

							}



							$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];

							$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];



							//-- mod : seo urls v2 ---------------------------------------------------------
//-- add
							$forum_name = $forum_data[$j]['forum_name'];
//-- fin mod : seo urls v2 -----------------------------------------------------$template->assign_block_vars('catrow.forumrow',	array(

								'ROW_COLOR' => '#' . $row_color,

								'ROW_CLASS' => $row_class,

								'FORUM_FOLDER_IMG' => $folder_image, 

								'FORUM_NAME' => $forum_data[$j]['forum_name'],

								'FORUM_DESC' => $forum_data[$j]['forum_desc'],

								'POSTS' => $forum_data[$j]['forum_posts'],

								'TOPICS' => $forum_data[$j]['forum_topics'],

								'LAST_POST' => $last_post,

								'MODERATORS' => $moderator_list,



								'L_MODERATOR' => $l_moderators, 

								'L_FORUM_FOLDER_ALT' => $folder_alt, 



								'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))

							);

						}

					}

				}

			}

		}

	} // for ... categories



}// if ... total_categories

else

{

	message_die(GENERAL_MESSAGE, $lang['No_forums']);

}



//

// Generate the page

//

$template->pparse('body');



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



?>
DjSerkanK
Kayıtlı Kullanıcı
Mesajlar: 31
Kayıt: 21.10.2005, 20:48
İletişim:

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen DjSerkanK »

dlxattack yazdı:Hayır arkadaşlar en kolayı bu ve en etkilisi

Kod: Tümünü seç

##############################################################
## MOD Title: 		phpBB SEO keyword URLs
## MOD Author: 		webmedic (bah@webmedic.net) <Brook Humphrey> http://www.webmedic.net
## Original code from:	http://www.webmasterbrain.com/forum/question-static-sef-urls-for-phpbb-vt34.php
## MOD Description: 	This mod makes static URLs for phpBB
## 			Please read the author notes BEFORE using this mod.
## 			Check http://www.webmedic.net/phpbb-google-msn-yahoo-seo-keyword-urls-mod-vt28667.html
## 			for the latest version or to get help with this MOD
##
## MOD Version: 	2.3.0
##
## Installation Level: 	(Advanced)
## Installation Time: 	5 Minutes
## Files To Edit: 	(3)
##			.htaccess,
##			page_header.php,
##			page_footer.php,
##			overall_footer.tpl
## Included Files: n/a
##############################################################
## Author Notes:
## Use this mod together with the manage bots mod already included with integramod
## Make backups and test this on a test forum if you can. This is not a typical mod.
## This version is not like all the other mod rewrite and search engine optimization mods
## out there. It will make your urls into keyword phrases. to do this it rewrites the url
## to look like the topic or forum title.
## To see this mod in action please goto:
## http://www.webmedic.net/index.php
##
## LICENSE:
## Due to some issues with others taking my work and not offering proper credit
## (in as much as they have removed my credits and added their own) I have added
## a LICENSE.TXT. I have decided to license this under the RPL which states you can not
## remove my credits and if you make any modifications you have to resubmit the modifications
## to me for includion into this toolkit again. You can read the license for yourself for
## further info. It is also an open source license that has been deemed ok by osi.
##
## Along with this I now require a link to use this mod. If you don't want to have the
## linkback I will remove the requirement for a linkback for a small fee. If you are
## interested in removing the link please contact me at bah@webmedic.net
##
## All previous versions are licensed under the rpl from 6/29/2005
##
##############################################################
## MOD History:
##
##   2005-08-14 - Version 2.3.0
##	- Fixes for header errors and code clean up
##	- Added new characters to make url friendly function
##	- I went up a whole revision number as there were quite a few little bug fixes.
##	  I also want to start a new thread for this.
##
##   2005-07-15 - Version 2.2.3
##	- small fix for some header issues.
##
##   2005-07-03 - Version 2.2.2
##	- Dissabled some of the page optimizations to fix issues with some javascripts
##	  and css.
##	- Added keyword meta tags to the zip.
##
##   2005-06-29 - Version 2.2.1
##	- Added LICENSE.TXT after finding a few other sites taking credit for this mod.
## 	- Added footer text for usage of this mod.
##	- Changed order of the install to help with any errors that may occur durring install.
##	- Fixed a few issues with overly optimizing the pages.
##
##   2005-06-24 - Version 2.2.0
##	- Rewrote some of the code for the smartor album again. This time it is more
##	   comprehensive and should fix even unforeseen issues.
##	- Added new features so that when the page is being gziped it also removes
##	   Unwanted comments, spaces, tabs, line feeds, and carriage returns. This also
##	   makes the page smaller and helps to speed things up.
##
##   TODO: Fix forward and back links as well as links within threads that have multiple pages.
##
##   2005-06-21 - Version 2.1.0
##	- Rewrote a good portion of the smartor album code so that it works better.
##	- Added support for categories hierarchy thanks to 993ti at the
##	   www.webmedic.net forums.
##	- Fixed major bug with phpbb were gzip was not working properly at all ever.
##	   This mod fixes that issue so that gzip encoding now works properly.
##
##   2005-06-19 - Version 2.0.2
##	- Fixed small issue with " showing up in the url as -quot-
##	  This was due to phpbb changing " to " which is correct
##	  but still does not look good in a url. So now it is completely removed.
##
##   2005-06-14 - Version 2.0.1
##	- Fixed small issue with url's not being rewritten if the site was using gzip compression.
##	- Fixed some of the string replace entries to not look for more than one space
##	- added < and > to the string replace functions
##
##   2005-06-07 - Version 2.0.0
##	- Added ability to use with pafiledb mod
##	- Added ability to use with kb mod (NOT WORKING YET)
##	- Added ability to use with Smartor album mod
##	- Added German umlauts & special characters (thanks to m³)
##	- Modified the way links are generated somewhat.
##	  Hopefully the new method will catch a few things the old one did not.
##
##   2004-11-03 - Version 1.1.0
##	- Added replacements for /, \, and foreign character sets.
##
##   2004-08-22 - Version 1.0.0
##      - Initial public release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#

.htaccess

#
#-----[ ADD  ]------------------------------------------
#

RewriteEngine On
#this may cause issues with subdirs and so I have not enabled it.
RewriteBase /

RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest

#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
   $phpver = phpversion();

   if($phpver >= "4.0.4pl1")
      {
         if(extension_loaded("zlib"))
      {
   if (headers_sent() != TRUE)
      {
         $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]);
         if ($gz_possible) ob_start("ob_gzhandler");
      }
   }
      }
         else if($phpver > "4.0")
      {
         if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
         {
            if(extension_loaded("zlib"))
         {
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);

            header("Content-Encoding: gzip");
         }
      }
   }
}

#
#-----[ REPLACE, WITH  ]------------------------------------------
#

//-- [+] MOD: phpBB SEO keyword URLs -------------------------------------
//-- replace
//
/*
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
   $phpver = phpversion();

   if($phpver >= "4.0.4pl1")
      {
         if(extension_loaded("zlib"))
      {
   if (headers_sent() != TRUE)
      {
         $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]);
         if ($gz_possible) ob_start("ob_gzhandler");
      }
   }
      }
         else if($phpver > "4.0")
      {
         if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
         {
            if(extension_loaded("zlib"))
         {
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);

            header("Content-Encoding: gzip");
         }
      }
   }
}
*/
//
//while (@ob_end_flush());
ob_start();


function make_url_friendly($url)
{
	$url = trim($url);
	$url = strtolower($url);

	$find = array('<b>', '</b>');
	$url = str_replace ($find, '', $url);

	$url = preg_replace('/<(\/{0,1})img(.*?)(\/{0,1})\>/', 'image', $url);

	$find = array(' ', '"', '&', '&', '\r\n', '\n', '/', '\\', '+', '<', '>');
	$url = str_replace ($find, '-', $url);

	$find = array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ë', 'Ê');
	$url = str_replace ($find, 'e', $url);

	$find = array('í', 'ı', 'ì', 'î', 'ï', 'I', 'İ', 'Í', 'Ü', 'ÃŽ', 'Ï');
	$url = str_replace ($find, 'i', $url);

	$find = array('ó', 'ö', 'Ö', 'ò', 'ô', 'Ó', 'Ã’', 'Ô');
	$url = str_replace ($find, 'o', $url);

	$find = array('á', 'ä', 'â', 'à', 'â', 'Ä', 'Â', 'Á', 'À', 'Â');
	$url = str_replace ($find, 'a', $url);

	$find = array('ú', 'ü', 'Ü', 'ù', 'û', 'Ú', 'Ù', 'Û');
	$url = str_replace ($find, 'u', $url);

	$find = array('ç', 'Ç');
	$url = str_replace ($find, 'c', $url);

	$find = array('ş', 'Ş');
	$url = str_replace ($find, 's', $url);

	$find = array('ğ', 'Ğ');
	$url = str_replace ($find, 'g', $url);

	$find = array('/[^a-z0-9\-<>]/', '/[\-]+/', '/<[^>]*>/');

	$repl = array('', '-', '');

	$url = preg_replace ($find, $repl, $url);
	$url = str_replace ('--', '-', $url);

	return $url;
}

function rewrite_urls($content)
{

	function if_query($amp)
	{

		if($amp != '')
		{
			return '?';
		}

	}

        $url_in = array('/(?<!\/)viewforum.php\?f=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)\.\/viewforum.php\?f=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)viewtopic.php\?p=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)viewtopic.php\?t=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

//-- [+] ******* ---------------------------------------------------------
//-- add
//
                        '/(?<!\/)index.php\?c=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
//
//-- [-] ******* ---------------------------------------------------------

                        '/(?<!\/)album_cat.php\?cat_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)album_thumbnail.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)album_pic.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)album_picm.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        //'/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(<img .*?)<\/a>/e',
                        '/(?<!\/)album_showpage.php\?full=&pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)album_personal.php\?user_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)dload.php\?action=category&cat_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)dload.php\?action=file&file_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)kb.php\?mode=cat&cat=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)kb.php\?mode=article&k=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)kb.php\?mode=stats&stats=mostpopular((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)kb.php\?mode=stats&stats=toprated((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)kb.php\?mode=stats&stats=latest((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)press.php\?mode=cat&cat=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)press.php\?mode=article&k=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)press.php\?mode=stats&stats=mostpopular((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)press.php\?mode=stats&stats=toprated((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
                        '/(?<!\/)press.php\?mode=stats&stats=latest((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e');

        $url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",

//-- [+] ******* ---------------------------------------------------------
//-- add
//
                        "make_url_friendly('\\6') . '-vc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
//
//-- [-] ******* ---------------------------------------------------------

                        "make_url_friendly('\\6') . '-ac\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-at\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-apic\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-apm\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        //"'show-pic-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "'image-full-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-aper\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-dc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-df\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-kbc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-kba\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\5') . '-kbsmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
                        "make_url_friendly('\\5') . '-kbstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
                        "make_url_friendly('\\5') . '-kbsl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
                        "make_url_friendly('\\6') . '-pc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\6') . '-pa\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
                        "make_url_friendly('\\5') . '-psmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
                        "make_url_friendly('\\5') . '-pstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
                        "make_url_friendly('\\5') . '-psl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'");

	$content = preg_replace($url_in, $url_out, $content);

	return $content;

}
//
//-- [-] MOD: phpBB SEO keyword URLs -------------------------------------

#
#-----[ OPEN ]------------------------------------------
#

includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#

if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}

#
#-----[ REPLACE, WITH  ]------------------------------------------
#

//-- [+] MOD: phpBB SEO keyword URLs -------------------------------------
//-- replace
//
/*
if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}
*/
//
if( function_exists(ob_gzhandler) && $board_config['gzip_compress'] == 1)
{
	$gzip_contents = rewrite_urls(ob_get_contents());
	ob_end_clean();
	ob_start('ob_gzhandler');
	echo $gzip_contents;
	ob_end_flush();
}
else
{
	$contents = rewrite_urls(ob_get_contents());
	ob_end_clean();
	echo $contents;
	global $dbg_starttime;
}
//
//-- [-] MOD: phpBB SEO keyword URLs -------------------------------------


#
#-----[ OPEN ]------------------------------------------
#

/templates/THE TEMPLATE YOUR USING/overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group

#
#-----[ REPLACE WITH]------------------------------------------
#

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group <a href="http://www.webmedic.net/seo-toolkit-vf46.html">SEO toolkit &copy; 2004-2005 webmedic</a>


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
bunuda yaptım ancak
konular html ye cevrıldı ancak konuları acmak ıstedıgımde
Not Found
The requested URL /viewtopic.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7f mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/4.4.7 mod_perl/2.0.4 Perl/v5.8.8 Server at www.......net Port 80

yazıyor
yanchuchi
Kayıtlı Kullanıcı
Mesajlar: 1
Kayıt: 29.11.2008, 09:07

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen yanchuchi »

I'm working on a new Website system, based on phpBB3, and would like to add Icy Phoenix BBcode, does anyone known how to make it work with phpBB3? also are there any site were I can find good looking, free icons for things like RSS, User Agents, etc. And any sites were I could learn to build my own catacp Image code, as I don't like what phpBB3 has very much, and want to replace it. Oh and also I'm having problems creating admin pages. Thanks for any help you can provide.
mgutt
Kayıtlı Kullanıcı
Mesajlar: 1
Kayıt: 11.09.2008, 03:21
İletişim:

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen mgutt »

Please remove my email address. I have written this mod and I'm receiving spam because of sharing my address.

regards
Kullanıcı avatarı
VSaBaH
Kayıtlı Kullanıcı
Mesajlar: 2493
Kayıt: 09.02.2006, 16:58
Konum: Denizli
İletişim:

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen VSaBaH »

mgutt yazdı:Please remove my email address. I have written this mod and I'm receiving spam because of sharing my address.

regards
Your email address has been removed.
Caner28
Kayıtlı Kullanıcı
Mesajlar: 9
Kayıt: 26.07.2008, 12:56

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen Caner28 »

Arkadaşlar ßu Modu Kurdumda Sayfalarım Html Oldu fakat Konulara girinCe Not Found Diyor.. Acaßa Sorun nedir ? ßi Söylermisiniz..
Kullanıcı avatarı
VSaBaH
Kayıtlı Kullanıcı
Mesajlar: 2493
Kayıt: 09.02.2006, 16:58
Konum: Denizli
İletişim:

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen VSaBaH »

Caner28 yazdı:Arkadaşlar ßu Modu Kurdumda Sayfalarım Html Oldu fakat Konulara girinCe Not Found Diyor.. Acaßa Sorun nedir ? ßi Söylermisiniz..
Merhaba,

.htaccess dosyasını attınız mı?
Caner28
Kayıtlı Kullanıcı
Mesajlar: 9
Kayıt: 26.07.2008, 12:56

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen Caner28 »

Evet Atmıştım..
Kullanıcı avatarı
I3arbar
Kayıtlı Kullanıcı
Mesajlar: 7
Kayıt: 06.12.2008, 11:29

Re: phpBB SEO URLs V2-Tüm Sayfaları Html Dosyasına Çevirir

Mesaj gönderen I3arbar »

türkçe karakter sorunu var!
Kilitli

“2.0.x MOD Duyuruları” sayfasına dön

Kimler çevrimiçi

Bu forumu görüntüleyen kullanıcılar: Bing [Bot] ve 4 misafir