// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - A
$vbulletin->userinfo['lang_charset'] = 'windows-1256';
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - V
3 / اضف بلوقن جديد في الهوك
كود:
fetch_userinfo_query
واضف محتوى الكود هذا
كود:
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - A
if (THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'showpost' OR THIS_SCRIPT == 'newreply') {
$Phrases = '3';
$Forumid = '63';
$Pregsdo = @preg_replace('#([^\?]*)(f|t|p)=([\d]+)(.*)#si', '\\2', $_SERVER['QUERY_STRING']);
$Pregsid = @preg_replace('#([^\?]*)(f|t|p)=([\d]+)(.*)#si', '\\3', $_SERVER['QUERY_STRING']);
if (@is_numeric($Pregsid)) {
if ($Pregsdo == 'p') {
$Getinfo = @fetch_postinfo($Pregsid);
$Pregsid = $Getinfo['threadid'];
$Getinfo = @fetch_threadinfo($Pregsid);
$Pregsid = $Getinfo['forumid'];
} else
if ($Pregsdo == 't') {
$Getinfo = @fetch_threadinfo($Pregsid);
$Pregsid = $Getinfo['forumid'];
}
if (THIS_SCRIPT != 'newreply') {}
if (@in_array($Pregsid, @preg_split('#\s*,\s*#s', $Forumid, -1, @PREG_SPLIT_NO_EMPTY))) { $languageid = $Phrases; }
}
}
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - V
بعد تعديل المتغير
كود:
$Phrases = '3';
الى رقم اللغة المخصصّة
ايضاً وتغيير المتغير
كود:
$Forumid = '63';
الى رقم الاقسام المراد تخصيص اللغة الخاصة لها ويمكنك اضافة أكثر من قسم وفصل الأرقام بـ فاصلة
منها انه لا يحول اللغه عند اضافة موضوع جديد في نفس القسم الذي قمت بتحديد اللغه له
ثاني شئ ظهر مشكلة داتا بيز ايرور عند البعض عند اضافة رد وهذا المصدر
كود PHP:
Invalid SQL: SELECT IF(visible = 2, 1, 0) AS isdeleted,
NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed, emailupdate, folderid, thread.*
FROM thread AS thread
LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = AND subscribethread.canview = 1)
WHERE thread.threadid = 4823; MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND subscribethread.canview = 1)
WHERE thread.threadid = 4823' at line 10 Error Number : 1064 Request Date : Saturday, April 4th 2009 @ 09:35:36 AM Error Date : Saturday, April 4th 2009 @ 09:35:36 AM Script : http://www.mad3om.com/newreply.php?do=postreply&t=4823 Referrer : http://www.mad3om.com/t4823.html
منها انه لا يحول اللغه عند اضافة موضوع جديد في نفس القسم الذي قمت بتحديد اللغه له
ثاني شئ ظهر مشكلة داتا بيز ايرور عند البعض عند اضافة رد وهذا المصدر
كود PHP:
Invalid SQL:
SELECT IF(visible = 2, 1, 0) AS isdeleted,
NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed, emailupdate, folderid,
thread.*
FROM thread AS thread
LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = AND subscribethread.canview = 1)
WHERE thread.threadid = 4823;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND subscribethread.canview = 1)
WHERE thread.threadid = 4823' at line 10
Error Number : 1064
Request Date : Saturday, April 4th 2009 @ 09:35:36 AM
Error Date : Saturday, April 4th 2009 @ 09:35:36 AM
Script : http://www.mad3om.com/newreply.php?do=postreply&t=4823
Referrer : http://www.mad3om.com/t4823.html
تحياتي لك ويارب يكون فيه حل واسفين تعبناك والله
طيب يالغالي امسح البلوقن السابق اللي اضفته
وجرب الطريقة هذي
افتح ملف
كود:
includes/init.php
ابحث عن
كود:
// build the session and setup the environment
اضف أعلاه بسطر
كود:
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - A
if (THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'showpost' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'newreply') {
$Phrases = '3';
$Forumid = '63';
$Pregsdo = @preg_replace('#([^\?]*)(f|t|p)=([\d]+)(.*)#si', '\\2', $_SERVER['QUERY_STRING']);
$Pregsid = @preg_replace('#([^\?]*)(f|t|p)=([\d]+)(.*)#si', '\\3', $_SERVER['QUERY_STRING']);
if (@is_numeric($Pregsid)) {
if ($Pregsdo == 'p') {
$Getinfo = @fetch_postinfo($Pregsid);
$Pregsid = $Getinfo['threadid'];
$Getinfo = $vbulletin->db->query_first_slave("SELECT forumid FROM thread WHERE threadid = $Pregsid");
$Pregsid = $Getinfo['forumid'];
} else
if ($Pregsdo == 't') {
$Getinfo = $vbulletin->db->query_first_slave("SELECT forumid FROM thread WHERE threadid = $Pregsid");
$Pregsid = $Getinfo['forumid'];
}
if (@in_array($Pregsid, @preg_split('#\s*,\s*#s', $Forumid, -1, @PREG_SPLIT_NO_EMPTY))) {
@header('(anti-spam-content-type:) text/html; charset=windows-1256');
$languageid = $Phrases;
}
}
} else {
$languageid = $vbulletin->options['languageid'];
}
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ADD BY MGHOOL - FOR LANGUAGES - V