menu_bgservdownloadthemesdirforumhome
Smf عربى



عرض المشاركات

هنا يمكنك مشاهدة جميع المشاركات التى كتبها هذا العضو . لاحظ انه يمكنك فقط مشاهدة المشاركات التى كتبها فى الاقسام التى يسمح لك بدخولها فقط .


الرسائل - Mr. Anaboussi

صفحات: [1] 2 3
1
قسم الدعم الخاص بالنسخة (Smf (1.1.X / رد: error in karma.php
« في: 14 , يوليو, 2009 - 12:47:53 صباحاً »
الخطأ لما احاول نزل المود المذكور في الاعلى
انا رح ارجع جرب بكرا وانشالله خير

2
قسم الدعم الخاص بالنسخة (Smf (1.1.X / رد: error in karma.php
« في: 13 , يوليو, 2009 - 04:48:14 مسائاً »
أسف انسيت اذكر اسم المود
المود هو
http://custom.simplemachines.org/mods/index.php?mod=1308
الخطأ فقط بالملف
karma.php

3
قسم الدعم الخاص بالنسخة (Smf (1.1.X / error in karma.php
« في: 13 , يوليو, 2009 - 01:28:42 مسائاً »
اكتير جربت بمود الكارمات المحدودة  بس شكلو ما رح يظبط دائما عم يعطي خطأ رغم اني عدلت يدويا عليه بس ماعم يظبط

بتمنى حدا اجربلي ياه وشفلي المشكلة وين

./
Sources/Karma.php
Find:
شفرة: [اختيار]
// The user ID _must_ be a number, no matter what.
$_REQUEST['uid'] = (int) $_REQUEST['uid'];

Add Before:
شفرة: [اختيار]
// Get the PM or Post that we have to record that this Karma has been given to...
if(!empty($_REQUEST['m'])
&& LimitKarma_message_exists((int) $_REQUEST['m'], 'm'))
{
$message_id = (int) $_REQUEST['m'];
$type = 'm';
}
elseif(!empty($_REQUEST['pm'])
&& LimitKarma_message_exists((int) $_REQUEST['pm'], 'pm'))
{
$message_id = (int) $_REQUEST['pm'];
$type = 'pm';
}
// Otherwise, show an error message.
else
fatal_lang_error('LimitKarma_error2', false);



Find:
شفرة: [اختيار]
// They haven't, not before now, anyhow.
if (empty($action) || empty($modSettings['karmaWaitTime']))
{
// Put it in the log.
db_query("
REPLACE INTO {$db_prefix}log_karma
(action, ID_TARGET, ID_EXECUTOR, logTime)
VALUES ($dir, $_REQUEST[uid], $ID_MEMBER, " . time() . ')', __FILE__, __LINE__);

// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+'));
}
else
{
// If you are gonna try to repeat.... don't allow it.
if ($action == $dir)
fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false);

// You decided to go back on your previous choice?
db_query("
UPDATE {$db_prefix}log_karma
SET action = $dir, logTime = " . time() . "
WHERE ID_TARGET = $_REQUEST[uid]
AND ID_EXECUTOR = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);

// It was recently changed the OTHER way... so... reverse it!
if ($dir == 1)
updateMemberData($_REQUEST['uid'], array('karmaGood' => '+', 'karmaBad' => '-'));
else
updateMemberData($_REQUEST['uid'], array('karmaBad' => '+', 'karmaGood' => '-'));
}

Replace With:
شفرة: [اختيار]
// Is the user not limited by the Limit Karma Mod?
if(!is_LimitedByKarma($message_id, $type))
{
// They haven't, not before now, anyhow.
if (empty($action) || empty($modSettings['karmaWaitTime']))
{
// Put it in the log.
db_query("
REPLACE INTO {$db_prefix}log_karma
(action, ID_TARGET, ID_EXECUTOR, logTime)
VALUES ($dir, $_REQUEST[uid], $ID_MEMBER, " . time() . ')', __FILE__, __LINE__);

// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+'));
}
else
{
// If you are gonna try to repeat.... don't allow it.
if ($action == $dir)
fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false);

// You decided to go back on your previous choice?
db_query("
UPDATE {$db_prefix}log_karma
SET action = $dir, logTime = " . time() . "
WHERE ID_TARGET = $_REQUEST[uid]
AND ID_EXECUTOR = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);

// It was recently changed the OTHER way... so... reverse it!
if ($dir == 1)
updateMemberData($_REQUEST['uid'], array('karmaGood' => '+', 'karmaBad' => '-'));
else
updateMemberData($_REQUEST['uid'], array('karmaBad' => '+', 'karmaGood' => '-'));
}
// Finally, increment the karma count.
increment_LimitKarmaCount($message_id, $type);
}
// Well, if they are limited then show the user an error message.
else
fatal_lang_error('LimitKarma_error', false);


Find (at the end of the file):

شفرة: [اختيار]
?>Add Before:
شفرة: [اختيار]

// Function to work out, if the current user can give karma to a specific PM or Post.
// Assume that they are allowed to give karma normally, just find out if they are restricted by the Limit Karma Mod or not.
function is_LimitedByKarma($id, $type)
{
global $db_prefix, $user_info, $ID_MEMBER, $modSettings, $user_settings;

$max_count = 0;
// Go through and check this users membergroups for a higher max count.
foreach($user_info['groups'] as $group_id)
{
// Do we have a supergroup? With no max limit? And a valid group?
if(empty($modSettings['LimitKarma_'.$group_id]) && !(!empty($user_settings['ID_POST_GROUP']) && ($group_id == $user_settings['ID_POST_GROUP']) && empty($modSettings['permission_enable_postgroups'])))
return false;
// Otherwise, check to see if this group has a higher max limit, then previous groups.
elseif(!empty($modSettings['LimitKarma_'.$group_id])
&& ($modSettings['LimitKarma_'.$group_id] > $max_count))
$max_count = $modSettings['LimitKarma_'.$group_id];
}

$count = 0;
// Try to work out the current count of the karma for this post.
$request = db_query("
SELECT count
FROM {$db_prefix}limit_karma
WHERE ID_MSG = $id
AND ID_EXECUTOR = '$ID_MEMBER'
AND type = '$type'
LIMIT 1", __FILE__, __LINE__);

if (mysql_num_rows($request) > 0)
list ($count) = mysql_fetch_row($request);

// Don't forget to free the db request!
mysql_free_result($request);

// Is our count value more than our max count value? If so, then return true.
if($count >= $max_count)
return true;

// Otherwise, we have just let them add some more karma.
return false;
}

// Function to increment the count of Karma for a particular PM/Post.
function increment_LimitKarmaCount($id, $type)
{
global $db_prefix, $ID_MEMBER;

// Try to find an already existing value;
$request = db_query("
SELECT count
FROM {$db_prefix}limit_karma
WHERE ID_EXECUTOR = '$ID_MEMBER'
AND ID_MSG = '$id'
AND type = '$type'
LIMIT 1", __FILE__, __LINE__);

// Try to get the count value.
if (mysql_num_rows($request) > 0)
list ($count) = mysql_fetch_row($request);

// Don't forget to free the db request!
mysql_free_result($request);

// If we have no count value, then assume its 1.
if(empty($count))
$count = 1;
// Otherwise, we can increment the count value.
else
$count++;

// Finally save the new count value, and be happy!!! :D
db_query("
REPLACE INTO {$db_prefix}limit_karma
(ID_EXECUTOR, ID_MSG, count, type)
VALUES
('$ID_MEMBER', '$id', '$count', '$type')", __FILE__, __LINE__);
}
// Function to check if this message actually exists.
function LimitKarma_message_exists($msg_id, $type)
{
global $db_prefix;

if($type == 'pm')
{
$select_var = 'ID_PM';
$table = 'pm_recipients';
}
else
{
$select_var = 'ID_MSG';
$table = 'messages';
}

// Try to find an already existing value;
$request = db_query("
SELECT $select_var
FROM {$db_prefix}$table
WHERE $select_var = '$msg_id'", __FILE__, __LINE__);

// Try to get the count value.
if (mysql_num_rows($request) > 0)
list ($return) = mysql_fetch_row($request);

// Don't forget to free the db request!
mysql_free_result($request);

// If we have a valid message ID.
if(!empty($return))
return true;
// Otherwise, return false.
return false;
}


4
شكرا اخي الكريم لشرحك الطريقة باسم منتدى الدعم العربي
نقطة تميز +1

5
مشي الحال شكرا اسلام بس اسا في مشكلة
انو كل ما دخل على البند تبع المود بلوحة التحكم
بيطلب مني ادخال البيانات
A username and password are being requested by http://prettyurls.googlecode.com. The site says: "Google Code Subversion Repository
username
pass
وبتمنى أتخبروني شو افضل ضبط لهذا المود يعني بيطلع بقسم البورد بقسم بلوحة التحكم بجانب كل قسم اسم
pretty urls
كيف لازم اضبطو

6
طيب شو التصريحات المناسبة
777

7
انا نزلت المود prettyurls وكلو تمام بس لما بدي فعله
دائما بيعطيني الخطأ التالي
Cannot overwrite existing .htaccess file. Please change its write permissions
يعني حابب حدا يشرحلي كيغية عمل المود لانو الدرس ما أكتير واضح بهذا الشأن

8
شكرا للدرس بس حابب أعرف المود كيف يتم تفعيله
يعني لما ادخل عليه بلوحة التحكم بيطلب
بيانات الدخول
A username and password are being requested by http://prettyurls.googlecode.com. The site says: "Google Code Subversion Repository"
وبس بدي فعل المود بيعطيني خطأ
Cannot overwrite existing .htaccess file. Please change its write permissions

شو رايك الحل مع انو التجريب بتم على نسخة اجنبية

9
الحقيقة صري فترة عم فكر اشرحها بس امنيح ما أشرحتها لأنو مستحيل تطلع بهل الاسلوب السهل والجميل
يعطيك العافية أخي اسلام

10
نقاش عام / رد: بماذا تنصحونني MyBB أو SMF ؟؟؟
« في: 30 , يونيو, 2009 - 02:40:47 مسائاً »
أخر أحصائيات 2008 تفوق mybb على smf ولكن الي اليوم في عام 2009 يتقدم smf كثيرا علة mybb وأعتقد قريبا بعد صدور الاصدار
2 من smf  سوف يصبح اهم سكريبت على الاطلاق في عالم المنتدى المجانية ذات المصدر المفتوح وخصوصا ان لوحة التحكم الجديدة في الاصدار 2 أحترافية تنافس بسهولتها السكريبت التجاري ذات المصدر المغلق vb ونصية أنصحها لكل اصدقائي ممن يستخدم السكريبات الأخرى
ان ينتقلو الى عالم smf الرهيب والممتع

11
اخر الأخبار و المستجدات / رد: جديد : أدوات مشرفى المواقع
« في: 30 , يونيو, 2009 - 10:49:42 صباحاً »
مبروك هذا الافتتاح الجميل لموضوع في غاية الاهمية واتمنى التقدم والازدهار لمنتدى الدعم العربي

12
الكباتشا لا تعمل في صفحة التسجيل ايضا
او فقط في الرسائل
واي ملفات اعدت رفعها

13
لكي يعمل هذا المود بشكل جيد يجب أن يقوم الأعضاء بالمساعدة من خلال اعطاء كلمات مفتاحية لمواضيعهم هذا من جهة
أما بالنسبة لكيفية عمله فأنه يقوم بجمع تلك الكلمات وتبديلها بحيث تظهر الكلمات الأكثر استخداما ضمن المنتدى مع اعتماد العشوائية

تحياتي

14
هناك عدة مودات حول هذا الموضوع واعتقد ان الأخ اسلام قام بتعريب أحدهم
http://custom.simplemachines.org/mods/index.php?mod=1211
http://www.smfarabic.com/index.php/topic,57.0.html
http://custom.simplemachines.org/mods/index.php?mod=1527
وأسا في مودات هامة ممكن الأخوة يقترحوها عليك

تحياتي

15
اسلوب جميل بالشرح واتمنى لك التوفيق

صفحات: [1] 2 3