ناصر مهدى
2006/10/23, 11:37 PM
vB3 [you] Code Hack
Version 1.1
(By Boofo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
تم التعريب بواسطه
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
نابليـــون
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ماهو عمل هذا الهاك ؟
عند كتابه [you] في احد المواضيع او الردود سيقوم بستبدالها الى اسم المستخدم الذي يشاهد الموضوع.
التعديلات:
--includes/functions.php
--includes/functions_newpost.php
--archive/index.php (اختياري)
--archive/global.php (اختياري)
زمن التركيب: 15 دقيقه
لنبدأ العمــل :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في includes/functions.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function process_replacement_vars($new****, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!empty($style['replacements']))
{
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
// this is WAY too slow!
//$new**** = strtr($new****, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$new**** = str_replace(array_keys($replacementvars), $replacementvars, $new****);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$new**** = preg_replace(array_keys($replacementvars), $replacementvars, $new****);
}
return $new****;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
استبدلها الى:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function process_replacement_vars($new****, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
// this is WAY too slow!
//$new**** = strtr($new****, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$new**** = str_replace(array_keys($replacementvars), $replacementvars, $new****);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$new**** = preg_replace(array_keys($replacementvars), $replacementvars, $new****);
return $new****;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ننتقل الى
includes/functions_newpost.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$touser['languageid'] = iif($touser['languageid'] == 0, $vboptions['languageid'], $touser['languageid']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
بعده مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$temp**** = $page****;
$page**** = preg_replace('/\[you\]/i', $touser['username'], $page****);
$threadinfo['title'] = preg_replace('/\[you\]/i', $touser['username'], $threadinfo['title']);
$foruminfo['title'] = preg_replace('/\[you\]/i', $touser['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا في نفس الملف ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vbmail($touser['email'], $subject, $message);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ثم اضف بعد ذلك:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$page**** = $temp****;
$threadinfo['title'] = $temptitle;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = unhtmlspecialchars($threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ثم اضف بعده مباشرة:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$temptitle = $threadinfo['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهى العمل في هذا الملف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في archive/index.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo print_archive_navigation($foruminfo);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
اضف فوقها:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$foruminfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $foruminfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "\t<li><a href=\"t-$thread[threadid]\" d=\"$thread[lastpost]\">$thread[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
فوقها مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$thread['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $thread['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo print_archive_navigation($foruminfo, $threadinfo);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
فوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$post['page****'] = strip_bbcode($post['page****']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
بعده مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$post['page****'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $post['page****']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهى العمل في هذا الملف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في archive/global.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global $vboptions, $forumcache;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
استبدلها بــ:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global $vboptions, $forumcache, $bbuserinfo;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li><a href=\"$forum[link]\">$forum[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li><a href=\"f-$forumid\">$forum[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li>$forum[title]</li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = $forumcache["$forumid"]['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forumcache["$forumid"]['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forumcache["$forumid"]['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = "<a href=\"f-$forumid\">" . $forumcache["$forumid"]['title'] . "</a>";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forumcache["$forumid"]['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forumcache["$forumid"]['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = $threadinfo['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهـــــى
Version 1.1
(By Boofo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
تم التعريب بواسطه
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
نابليـــون
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ماهو عمل هذا الهاك ؟
عند كتابه [you] في احد المواضيع او الردود سيقوم بستبدالها الى اسم المستخدم الذي يشاهد الموضوع.
التعديلات:
--includes/functions.php
--includes/functions_newpost.php
--archive/index.php (اختياري)
--archive/global.php (اختياري)
زمن التركيب: 15 دقيقه
لنبدأ العمــل :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في includes/functions.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function process_replacement_vars($new****, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!empty($style['replacements']))
{
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
// this is WAY too slow!
//$new**** = strtr($new****, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$new**** = str_replace(array_keys($replacementvars), $replacementvars, $new****);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$new**** = preg_replace(array_keys($replacementvars), $replacementvars, $new****);
}
return $new****;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
استبدلها الى:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function process_replacement_vars($new****, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
// this is WAY too slow!
//$new**** = strtr($new****, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$new**** = str_replace(array_keys($replacementvars), $replacementvars, $new****);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$new**** = preg_replace(array_keys($replacementvars), $replacementvars, $new****);
return $new****;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ننتقل الى
includes/functions_newpost.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$touser['languageid'] = iif($touser['languageid'] == 0, $vboptions['languageid'], $touser['languageid']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
بعده مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$temp**** = $page****;
$page**** = preg_replace('/\[you\]/i', $touser['username'], $page****);
$threadinfo['title'] = preg_replace('/\[you\]/i', $touser['username'], $threadinfo['title']);
$foruminfo['title'] = preg_replace('/\[you\]/i', $touser['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا في نفس الملف ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vbmail($touser['email'], $subject, $message);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ثم اضف بعد ذلك:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$page**** = $temp****;
$threadinfo['title'] = $temptitle;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = unhtmlspecialchars($threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ثم اضف بعده مباشرة:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$temptitle = $threadinfo['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهى العمل في هذا الملف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في archive/index.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo print_archive_navigation($foruminfo);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
اضف فوقها:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$foruminfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $foruminfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ايضا ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "\t<li><a href=\"t-$thread[threadid]\" d=\"$thread[lastpost]\">$thread[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
فوقها مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$thread['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $thread['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo print_archive_navigation($foruminfo, $threadinfo);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
فوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$post['page****'] = strip_bbcode($post['page****']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
بعده مباشرة اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$post['page****'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $post['page****']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهى العمل في هذا الملف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
في archive/global.php
ابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global $vboptions, $forumcache;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
استبدلها بــ:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global $vboptions, $forumcache, $bbuserinfo;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li><a href=\"$forum[link]\">$forum[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li><a href=\"f-$forumid\">$forum[title]</a></li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "$indent<li>$forum[title]</li>\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forum['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forum['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = $forumcache["$forumid"]['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forumcache["$forumid"]['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forumcache["$forumid"]['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = "<a href=\"f-$forumid\">" . $forumcache["$forumid"]['title'] . "</a>";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$forumcache["$forumid"]['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $forumcache["$forumid"]['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وابحث عن
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$navarray[] = $threadinfo['title'];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
وفوقها اضف
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$threadinfo['title'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $threadinfo['title']);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
انتهـــــى