المساعد الرقمي الشخصي

مشاهدة النسخة كاملة : هاك you


مولاني
09-06-2005, 05:46 PM
في احد المواضيع او الردود سيقوم بستبدالها الى اسم المستخدم الذي يشاهد الموضوع

--includes/functions.php
--includes/functions_newpost.php
--archive/index.php (اختياري)
--archive/global.php (اختياري)

في includes/functions.php

ابحث عن:

function process_replacement_vars($newtext, $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!
//$newtext = strtr($newtext, $replacementvars);

// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);

// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);
}

return $newtext;
}


استبدلها ب


function process_replacement_vars($newtext, $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!
//$newtext = strtr($newtext, $replacementvars);

// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);

// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);

return $newtext;
}

ننتقل الى

includes/functions_newpost.php

ابحث عن:

$touser['languageid'] = iif($touser['languageid'] == 0, $vboptions['languageid'], $touser['languageid']);


بعده اضف


$temptext = $pagetext;
$pagetext = preg_replace('/\[you\]/i', $touser['username'], $pagetext);
$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);

ثم اضف بعد ذلك:


$pagetext = $temptext;
$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['pagetext'] = strip_bbcode($post['pagetext']);


بعده مباشرة اضف:


$post['pagetext'] = preg_replace('/\[you\]/i', $bbuserinfo['username'], $post['pagetext']);

انتهى العمل في هذا الملف


في 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']);

انتهـــــى !

الربان
11-06-2005, 07:23 AM
السلام عليكم ورحمة الله وبركاته
اخوي مولاني
تسلم الغالي على هذا الهاك
جزاك الله خير
ولا تبخل علينا بجديدك :)

مولاني
11-06-2005, 12:12 PM
هلا بيك الربان وشكرا للمرور

نبض الامارات
12-06-2005, 11:56 PM
تسلم الغالي على هذا الهاك

مولاني
13-06-2005, 08:56 AM
العفو يا جماعه