Быстрый лёгкий надёжный форумный движок
Вы не вошли.
Вообщем мод ПарамПамПам.
##
##
## 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]
Я кончил.
Редактировался maximum (2008-04-07 09:55:25)
А где скачать мод?
Дык это и есть мод.
Он видать имел ввиду архив с readme.txt
Он видать имел ввиду архив с readme.txt
Конечно! И кстати если он рабочий, почему на главном форуме punBB.ru не применен
Редактировался phpforum (2006-05-19 13:36:03)
Странно всё это, а какой ещё должен быть плагин? В архиве? Ну дык чем вам не инструкция к применению вот этот код?
Только я говорю, его под русский надо адаптировать.. никто вот не хочет помочь в транслитерацией.
Вообщем вот оно как реализуется
<?php
/***********************************************************************
Copyright (C) 2002-2005 Rickard Andersson ([email protected])
This file is part of PunBB.
PunBB 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.
PunBB is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
************************************************************************/
if ($pun_config['o_sef'] != '1')
{
// These are the regular, "non-SEF" URLs (you probably don't want to edit these)
$pun_url = array(
'change_email' => 'profile.php?action=change_email&id=$1',
'change_email_key' => 'profile.php?action=change_email&id=$1&key=$2',
'change_password' => 'profile.php?action=change_pass&id=$1',
'change_password_key' => 'profile.php?action=change_pass&id=$1&key=$2',
'delete' => 'delete.php?id=$1',
'delete_avatar' => 'profile.php?action=delete_avatar&id=$1',
'edit' => 'edit.php?id=$1',
'email' => 'misc.php?email=$1',
'forum' => 'viewforum.php?id=$1',
'help' => 'help.php#$1',
'index' => '',
'login' => 'login.php',
'logout' => 'login.php?action=out&id=$1',
'mark_read' => 'misc.php?action=markread',
'new_topic' => 'post.php?fid=$1',
'new_reply' => 'post.php?tid=$1',
'post' => 'viewtopic.php?pid=$1#p$1',
'profile_essentials' => 'profile.php?section=essentials&id=$1',
'profile_personal' => 'profile.php?section=personal&id=$1',
'profile_messaging' => 'profile.php?section=messaging&id=$1',
'profile_avatar' => 'profile.php?section=avatar&id=$1',
'profile_signature' => 'profile.php?section=signature&id=$1',
'profile_display' => 'profile.php?section=display&id=$1',
'profile_privacy' => 'profile.php?section=privacy&id=$1',
'profile_admin' => 'profile.php?section=admin&id=$1',
'quote' => 'post.php?tid=$1&qid=$2',
'register' => 'register.php',
'report' => 'misc.php?report=$1',
'request_password' => 'login.php?action=forget',
'rules' => 'misc.php?action=rules',
'search' => 'search.php',
'search_results' => 'search.php?search_id=$1',
'search_new' => 'search.php?action=show_new',
'search_24h' => 'search.php?action=show_24h',
'search_unanswered' => 'search.php?action=show_unanswered',
'search_subscriptions' => 'search.php?action=show_subscriptions',
'search_user' => 'search.php?action=show_user&user_id=$1',
'subscribe' => 'misc.php?subscribe=$1',
'topic' => 'viewtopic.php?id=$1',
'topic_new_posts' => 'viewtopic.php?id=$1&action=new',
'topic_last_post' => 'viewtopic.php?id=$1&action=last',
'unsubscribe' => 'misc.php?unsubscribe=$1',
'upload_avatar' => 'profile.php?action=upload_avatar&id=$1',
'user' => 'profile.php?id=$1',
'users' => 'userlist.php',
'users_browse' => 'userlist.php?show_group=$1&sort_by=$2&sort_dir=$3&username=$4',
'page' => '&p=$1'
);
}
else
{
// And these are the pretty ones
$pun_url = array(
'change_email' => 'change/email/$1/',
'change_email_key' => 'change/email/$1/$2/',
'change_password' => 'change/password/$1/',
'change_password_key' => 'change/password/$1/$2/',
'delete' => 'delete/$1/',
'delete_avatar' => 'delete/avatar/$1/',
'edit' => 'edit/$1/',
'email' => 'email/$1/',
'forum' => 'forum/$1/',
'help' => 'help/#$1',
'index' => '',
'login' => 'login/',
'logout' => 'logout/$1',
'mark_read' => 'mark/read/',
'new_topic' => 'new/topic/$1/',
'new_reply' => 'new/reply/$1/',
'post' => 'post/$1/#p$1',
'profile_essentials' => 'user/$1/essentials/',
'profile_personal' => 'user/$1/personal/',
'profile_messaging' => 'user/$1/messaging/',
'profile_avatar' => 'user/$1/avatar/',
'profile_signature' => 'user/$1/signature/',
'profile_display' => 'user/$1/display/',
'profile_privacy' => 'user/$1/privacy/',
'profile_admin' => 'user/$1/admin/',
'quote' => 'new/reply/$1/quote/$2/',
'register' => 'register/',
'request_password' => 'request/password/',
'report' => 'report/$1/',
'rules' => 'rules/',
'search' => 'search/',
'search_results' => 'search/$1/',
'search_new' => 'search/new/',
'search_24h' => 'search/recent/',
'search_unanswered' => 'search/unanswered/',
'search_subscriptions' => 'search/subscriptions/',
'search_user' => 'search/user/$1/',
'subscribe' => 'subscribe/$1/',
'topic' => 'topic/$1/',
'topic_new_posts' => 'topic/$1/new/posts/',
'topic_last_post' => 'topic/$1/last/post/',
'unsubscribe' => 'unsubscribe/$1/',
'upload_avatar' => 'upload/avatar/$1/',
'user' => 'user/$1/',
'users' => 'users/',
'users_browse' => 'users/$1/$2/$3/$4/',
'page' => 'page/$1/'
);
}
Так же и надо реализовать будет транслитерацию.
Вот хочу своим модом позвастасться: forum.kru4e.net
Красивые тайтлы, url-ы топиков, мета-теги
Ты лучше форум в выставку достижений перемести . И переименуй его в какой нибудь Секс-форум :-D
Не ну просто тут про mod_rewrtie - вот и решил похвалиться своими красивыми модриврайтныйми урлами
А кто-нибудь доделал мод до конца?
Дык, 1.3 выйдёт, и будем тогда аботать над русским мод реврайтом, а сейчас нет смысла.
maximum, не все будут переходить на 1.3 потому-что переход будет для некоторых адом из-за наличия множества модов.
Прально, я даж пока не думал и не думаю о переходе, какой бы 1.3 не оказалась, все моды там врятли будут встроены(те что мне надо).
А я вообще перекраиваю форум полностью, чтобы можно было работать с шаблонами, так что никакие новые версии меня уже интересовать не будут
Типа своя ветка развития, да?
Типа да, я подгоняю под CMS, там новости файлы и прочее.
будем посмотреть, когда будет готово
Сделал я за ночь себе мод реврайт, и даже больше чем кто либо. Ради эстетического удовольствия.
Если же кому - то очень хочется ЧПУ, то можно взять за основупервый пост, только выкинуть вся связанное с pun_url.
А зачем переводить в транслит? Если будет по-русски - будет веселее
И какой нафиг мод реврайт тут получится?
Хороший вопрос
Сделал я за ночь себе мод реврайт, и даже больше чем кто либо. Ради эстетического удовольствия.
Если же кому - то очень хочется ЧПУ, то можно взять за основупервый пост, только выкинуть вся связанное с pun_url.
а для тех кто в танке вообще (тоесть неумею ни апач ни пхп)
можешь обьяснить что делать или какой принцип??
Довольно просто, но работы много. Хотя и достаточно в файлах index.php, viewforum.php, viewtopic.php, изменить viewtopic.php?tid= viewtopic.php?fid= viewtopic.php?pid= на то что требуется, и настроить модреврайт.
Тоеть, если ты в танке, смотри первый пост в топике.
ой..
буду пробовать