Тема: mod_rewrite
Вообщем мод ПарамПамПам.
##
##
## Mod title: ParamPamPam
##
## Mod version: v0.1
## Works on PunBB: 1.2.10
## Release date: 2008-01-04
## Author:
##
## Description:
## http://yebsite/viewtopic.php?id=16
## http://yebsite/forum16.html
## http://yebsite/profile.php?id=4
## http://yebsite/profile4.html
##
## Affected files: index.php
## viewforum.php
## viewtopic.php
## search.php
## userlist.php
## footer.php
## include/functions.php
##
## Affects DB: No
##
## Notes: Licence GPL. You must use Apache with mod_rewrite enabled.
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
##
#
#---------[ 1. UPLOAD ]-------------------------------------------------------
#
.htaccess to /
#
#---------[ 2. OPEN ]---------------------------------------------------------
#
include/function.php
#
#---------[ 3. FIND (line: 244) ]---------------------------------------------
#
$links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
$links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';
if ($pun_config['o_rules'] == '1')
$links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';
if ($pun_user['is_guest'])
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';
$links[] = '<li id="navlogin"><a href="login.php">'.$lang_common['Login'].'</a>';
$info = $lang_common['Not logged in'];
}
else
{
if ($pun_user['g_id'] > PUN_MOD)
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
}
else
{
$links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
}
}
#
#---------[ 4. REPLACE WITH ]-------------------------------------------------
#
$links[] = '<li id="navindex"><a href="index.html">'.$lang_common['Index'].'</a>';
$links[] = '<li id="navuserlist"><a href="userlist.html">'.$lang_common['User list'].'</a>';
if ($pun_config['o_rules'] == '1')
$links[] = '<li id="navrules"><a href="rules.html">'.$lang_common['Rules'].'</a>';
if ($pun_user['is_guest'])
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"><a href="search.html">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navregister"><a href="register.html">'.$lang_common['Register'].'</a>';
$links[] = '<li id="navlogin"><a href="login.html">'.$lang_common['Login'].'</a>';
$info = $lang_common['Not logged in'];
}
else
{
if ($pun_user['g_id'] > PUN_MOD)
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"><a href="search.html">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navprofile"><a href="profile'.$pun_user['id'].'.html">'.$lang_common['Profile'].'</a>';
$links[] = '<li id="navlogout"><a href="logout'.$pun_user['id'].'.html">'.$lang_common['Logout'].'</a>';
}
else
{
$links[] = '<li id="navsearch"><a href="search.html">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navprofile"><a href="profile'.$pun_user['id'].'.html">'.$lang_common['Profile'].'</a>';
$links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
$links[] = '<li id="navlogout"><a href="logout'.$pun_user['id'].'.html">'.$lang_common['Logout'].'</a>';
}
}
#
#---------[ 5. FIND (line: 525) ]---------------------------------------------
#
$pages[] = '<a href="'.$link_to.'&p=1">1</a>';
#
#---------[ 6. REPLACE WITH ]-------------------------------------------------
#
$pages[] = '<a href="'.$link_to.'-1.html">1</a>';
#
#---------[ 7. FIND (line: 537) ]---------------------------------------------
#
$pages[] = '<a href="'.$link_to.'&p='.$current.'">'.$current.'</a>';
#
#---------[ 8. REPLACE WITH ]-------------------------------------------------
#
$pages[] = '<a href="'.$link_to.'-'.$current.'.html">'.$current.'</a>';
#
#---------[ 8B. FIND (line #548) ]-------------------------------------------------
#
$pages[] = '<a href="'.$link_to.'&p='.$num_pages.'">'.$num_pages.'</a>';
#
#---------[ 8B. REPLACE WITH ]-------------------------------------------------
#
$pages[] = '<a href="'.$link_to.'-'.$num_pages.'.html">'.$num_pages.'</a>';
#
#---------[ 8C. FIND (line #641) ]-------------------------------------------------
#
function confirm_referrer($script)
{
global $pun_config, $lang_common;
if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
message($lang_common['Bad referrer']);
}
#
#---------[ 8C. REPLACE WITH ]-------------------------------------------------
#
function confirm_referrer($script)
{
global $pun_config, $lang_common;
$url = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$tab = explode("/",$url);
$newurl = $tab[count($tab)-1];
if ($script == "viewtopic.php") {
if ((!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '')))) and (substr($newurl, 0, strpos($newurl,"-"))!="sujet") and (substr($newurl, 0, strpos($newurl,"-"))!="message"))
message($lang_common['Bad referrer']);
} else {
if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
message($lang_common['Bad referrer']);
}
}
#
#---------[ 9. OPEN ]---------------------------------------------------------
#
footer.php
#
#---------[ 9. FIND (line: 53) ]---------------------------------------------
#
echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";
#
#---------[ 10. REPLACE WITH ]-------------------------------------------------
#
echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="24h.html">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
echo "\t\t\t\t".'<dd><a href="unanswered.html">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";
#
#---------[ 11. FIND (line: 57) ]---------------------------------------------
#
echo "\t\t\t\t".'<dd><a href="search.php?action=show_subscriptions">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";
#
#---------[ 12. REPLACE WITH ]-------------------------------------------------
#
echo "\t\t\t\t".'<dd><a href="subscriptions.html">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";
#
#---------[ 13. FIND (line: 59) ]---------------------------------------------
#
echo "\t\t\t\t".'<dd><a href="search.php?action=show_user&user_id='.$pun_user['id'].'">'.$lang_common['Show your posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
#
#---------[ 14. REPLACE WITH ]-------------------------------------------------
#
echo "\t\t\t\t".'<dd><a href="your'.$pun_user['id'].'.html">'.$lang_common['Show your posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
#
#---------[ 15. FIND (line: 65) ]---------------------------------------------
#
echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
#
#---------[ 16. REPLACE WITH ]-------------------------------------------------
#
echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="24h.html">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
echo "\t\t\t\t".'<dd><a href="unanswered.html">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
#
#---------[ 17. FIND (line: 109) ]---------------------------------------------
#
<p class="conr">Powered by <a href="http://www.punbb.org/">PunBB</a><?php if ($pun_config['o_show_version'] == '1') echo ' '.$pun_config['o_cur_version']; ?><br />© Copyright 2002–2005 Rickard Andersson</p>
#
#---------[ 18. REPLACE WITH ]-------------------------------------------------
#
<p class="conr">Powered by <a href="http://www.punbb.org/" rel="nofollow">PunBB</a><a href="http://www.punbb.ru/">.ru</a> & <?php if ($pun_config['o_show_version'] == '1') echo ' '.$pun_config['o_cur_version']; ?><a href="http://maxm.ru/">maximum</a><br />© Copyright 2002–2005 Rickard Andersson</p>
#
#---------[ 19. OPEN ]---------------------------------------------------------
#
index.php
#
#---------[ 20. FIND (line: 100) ]---------------------------------------------
#
$forum_field = '<h3><a href="viewforum.php?id='.$cur_forum['fid'].'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</a></h3>';
#
#---------[ 21. REPLACE WITH ]-------------------------------------------------
#
$forum_field = '<h3><a href="forum'.$cur_forum['fid'].'.html">'.pun_htmlspecialchars($cur_forum['forum_name']).'</a></h3>';
#
#---------[ 22. FIND (line: 111) ]---------------------------------------------
#
$last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
#
#---------[ 23. REPLACE WITH ]-------------------------------------------------
#
$last_post = '<a href="message'.$cur_forum['last_post_id'].'.html#p'.$cur_forum['last_post_id'].'" rel="nofollow">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
#
#---------[ 24. FIND (line: 121) ]---------------------------------------------
#
$moderators[] = '<a href="profile.php?id='.$mod_id.'">'.pun_htmlspecialchars($mod_username).'</a>';
#
#---------[ 25. REPLACE WITH ]-------------------------------------------------
#
$moderators[] = '<a href="profile'.$mod_id.'.html">'.pun_htmlspecialchars($mod_username).'</a>';
#
#---------[ 26. FIND (line: 174) ]---------------------------------------------
#
<dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>
#
#---------[ 27. REPLACE WITH ]-------------------------------------------------
#
<dd><?php echo $lang_index['Newest user'] ?>: <a href="profile<?php echo $stats['last_user']['id'] ?>.html"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>
#
#---------[ 28. FIND (line: 187) ]---------------------------------------------
#
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
#
#---------[ 29. REPLACE WITH ]-------------------------------------------------
#
$users[] = "\n\t\t\t\t".'<dd><a href="profile'.$pun_user_online['user_id'].'.html">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
#
#---------[ 30. OPEN ]---------------------------------------------------------
#
search.php
#
#---------[ 31. FIND (line: 423) ]---------------------------------------------
#
header('Location: search.php?search_id='.$search_id);
#
#---------[ 32. REPLACE WITH ]-------------------------------------------------
#
header('Location: search'.$search_id.'.html');
#
#---------[ 33. FIND (line: 479) ]---------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'search.php?search_id='.$search_id);
#
#---------[ 34. REPLACE WITH ]-------------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'search'.$search_id);
#
#---------[ 35. FIND (line: 544) ]---------------------------------------------
#
$forum = '<a href="viewforum.php?id='.$temp[0].'">'.pun_htmlspecialchars($temp[1]).'</a>';
#
#---------[ 36. REPLACE WITH ]-------------------------------------------------
#
$forum = '<a href="forum'.$temp[0].'.html">'.pun_htmlspecialchars($temp[1]).'</a>';
#
#---------[ 37. FIND (line: 544) ]---------------------------------------------
#
$subject = '<a href="viewtopic.php?id='.$search_set[$i]['tid'].'">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a>';
#
#---------[ 38. REPLACE WITH ]-------------------------------------------------
#
$subject = '<a href="topic'.$search_set[$i]['tid'].'.html">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a>';
#
#---------[ 39. FIND (line: 567) ]---------------------------------------------
#
$pposter = '<strong><a href="profile.php?id='.$search_set[$i]['poster_id'].'">'.$pposter.'</a></strong>';
#
#---------[ 40. REPLACE WITH ]-------------------------------------------------
#
$pposter = '<strong><a href="profile'.$search_set[$i]['poster_id'].'.html">'.$pposter.'</a></strong>';
#
#---------[ 41. FIND (line: 581) ]---------------------------------------------
#
<h2><?php echo $forum ?> » <?php echo $subject ?> » <a href="viewtopic.php?pid=<?php echo $search_set[$i]['pid'].'#p'.$search_set[$i]['pid'] ?>"><?php echo format_time($search_set[$i]['pposted']) ?></a></h2>
#
#---------[ 42. REPLACE WITH ]-------------------------------------------------
#
<h2><?php echo $forum ?> » <?php echo $subject ?> » <a href="message<?php echo $search_set[$i]['pid'].'.html#p'.$search_set[$i]['pid'] ?>" rel="nofollow"><?php echo format_time($search_set[$i]['pposted']) ?></a></h2>
#
#---------[ 43. FIND (line: 589) ]---------------------------------------------
#
<dd><p class="clearb"><a href="viewtopic.php?pid=<?php echo $search_set[$i]['pid'].'#p'.$search_set[$i]['pid'] ?>"><?php echo $lang_search['Go to post'] ?></a></p></dd>
#
#---------[ 44. REPLACE WITH ]-------------------------------------------------
#
<dd><p class="clearb"><a href="message<?php echo $search_set[$i]['pid'].'.html#p'.$search_set[$i]['pid'] ?>" rel="nofollow"><?php echo $lang_search['Go to post'] ?></a></p></dd>
#
#---------[ 45. FIND (line: 613) ]---------------------------------------------
#
$subject = '<a href="viewtopic.php?id='.$search_set[$i]['tid'].'">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['poster']).'</span>';
#
#---------[ 46. REPLACE WITH ]-------------------------------------------------
#
$subject = '<a href="topic'.$search_set[$i]['tid'].'.html">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['poster']).'</span>';
#
#---------[ 47. FIND (line: 635) ]---------------------------------------------
#
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$search_set[$i]['tid']).' ]';
#
#---------[ 48. REPLACE WITH ]-------------------------------------------------
#
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'topic'.$search_set[$i]['tid']).' ]';
#
#---------[ 49. FIND (line: 658) ]---------------------------------------------
#
<td class="tcr"><?php echo '<a href="viewtopic.php?pid='.$search_set[$i]['last_post_id'].'#p'.$search_set[$i]['last_post_id'].'">'.format_time($search_set[$i]['last_post']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?></td>
#
#---------[ 50. REPLACE WITH ]-------------------------------------------------
#
<td class="tcr"><?php echo '<a href="message'.$search_set[$i]['last_post_id'].'.html#p'.$search_set[$i]['last_post_id'].'" rel="nofollow">'.format_time($search_set[$i]['last_post']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?></td>
#
#---------[ 51. FIND (line: 692) ]---------------------------------------------
#
<form id="search" method="get" action="search.php">
#
#---------[ 52. REPLACE WITH ]-------------------------------------------------
#
<form id="search" method="get" action="search.html">
#
#---------[ 53. OPEN ]---------------------------------------------------------
#
userlist.php
#
#---------[ 54. FIND (line: 166) ]---------------------------------------------
#
<td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
#
#---------[ 55. REPLACE WITH ]-------------------------------------------------
#
<td class="tcl"><?php echo '<a href="profile'.$user_data['id'].'.html">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
#
#---------[ 56. OPEN ]---------------------------------------------------------
#
viewforum.php
#
#---------[ 57. FIND (line: 76) ]---------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewforum.php?id='.$id);
#
#---------[ 58. REPLACE WITH ]-------------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'forum'.$id);
#
#---------[ 59. FIND (line: 88) ]---------------------------------------------
#
<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
#
#---------[ 60. REPLACE WITH ]-------------------------------------------------
#
<ul><li><a href="index.html"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
#
#---------[ 61. FIND (line: 148) ]---------------------------------------------
#
$last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
#
#---------[ 62. REPLACE WITH ]-------------------------------------------------
#
$last_post = '<a href="message'.$cur_topic['last_post_id'].'.html#p'.$cur_topic['last_post_id'].'" rel="nofollow">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
#
#---------[ 63. FIND (line: 156) ]---------------------------------------------
#
$subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else if ($cur_topic['closed'] == '0')
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else
{
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
#
#---------[ 64. REPLACE WITH ]-------------------------------------------------
#
$subject = $lang_forum['Moved'].': <a href="topic'.$cur_topic['id'].'.html">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else if ($cur_topic['closed'] == '0')
$subject = '<a href="topic'.$cur_topic['id'].'.html">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else
{
$subject = '<a href="topic'.$cur_topic['id'].'.html">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
#
#---------[ 65. FIND (line: 196) ]---------------------------------------------
#
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
#
#---------[ 66. REPLACE WITH ]-------------------------------------------------
#
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'topic'.$cur_topic['id']).' ]';
#
#---------[ 67. OPEN ]---------------------------------------------------------
#
viewtopic.php
#
#---------[ 68. FIND (line: 135) ]---------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewtopic.php?id='.$id);
#
#---------[ 69. REPLACE WITH ]-------------------------------------------------
#
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'topic'.$id);
#
#---------[ 70. FIND (line: 172) ]---------------------------------------------
#
<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
#
#---------[ 71. REPLACE WITH ]-------------------------------------------------
#
<ul><li><a href="index.html"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="forum<?php echo $cur_topic['forum_id'] ?>.html"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
#
#---------[ 72. FIND (line: 200) ]---------------------------------------------
#
$username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
#
#---------[ 73. REPLACE WITH ]-------------------------------------------------
#
$username = '<a href="profile'.$cur_post['poster_id'].'.html">'.pun_htmlspecialchars($cur_post['username']).'</a>';
#
#---------[ 2. OPEN ]---------------------------------------------------------
#
.htaccess
#
#---------[ 3. ADD ]---------------------------------------------
#
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.upolovnikov.ru$ //301 редирект с www, меняем на своё
RewriteRule ^(.*)$ http://upolovnikov.ru/$1 [R=301,L]
RewriteRule ^index.html$ index.php [L] //а может ну его нах?
RewriteRule ^forum([0-9]+)-([0-9]+).html$ viewforum.php?id=$1&p=$2 [L]
RewriteRule ^forum([0-9]+).html$ viewforum.php?id=$1 [L]
RewriteRule ^topic([0-9]+)-([0-9]+).html$ viewtopic.php?id=$1&p=$2 [L]
RewriteRule ^topic([0-9]+).html$ viewtopic.php?id=$1 [L]
RewriteRule ^message([0-9]+).html$ viewtopic.php?pid=$1 [L]
RewriteRule ^profile([0-9]+).html$ profile.php?id=$1 [L]
RewriteRule ^register.html$ register.php [L]
RewriteRule ^login.html$ login.php [L]
RewriteRule ^logout([0-9]+)(.*).html$ login.php?action=out&id=$1 [L]
RewriteRule ^search.html$ search.php [L]
RewriteRule ^search([0-9]+).html$ search.php?search_id=$1 [L]
RewriteRule ^search([0-9]+)-([0-9]+).html$ search.php?search_id=$1&p=$2 [L]
RewriteRule ^24h.html$ search.php?action=show_24h [L]
RewriteRule ^unanswered.html$ search.php??action=show_unanswered [L]
RewriteRule ^subscriptions.html$ search.php?action=show_subscriptions [L]
RewriteRule ^rules.html$ misc.php?action=rules [L] //панбб рулез!
RewriteRule ^your([0-9]+).html$ search.php?action=show_user&user_id=$1 [L]
RewriteRule ^userlist.html$ userlist.php [L]Я кончил. ![]()