من االمحمول تظهرالصور ربما المشكل عندي في إتصالي بالانترنيت. سوف أتأكد من المشكل الله يحفضكم من كل سوء
*-.-**-.-**-.-**-.-**-.-**-.-**-.-*
أخي العزيز هدا هو التعديل الدي قمت به ولا أعرف إن كان صحيح أم لا
لأن بقي الحال كما كان سابقا
كود PHP:
/*
* Like & Share product v2.5 (PHP)
* Email : [email][email protected][/email]
* (c) Copyright 2013.07.14
*/http://www.hanaenet.com/vb/member.php?u=7&tab_likes=received#like_share_by_ali
if ($vbulletin->options['ls_onoff'])
{
$var_tablikes = trim($_GET["tab_likes"]);
// Show likes :
if ($var_tablikes != "" && $vbulletin->userinfo['userid'] >= 1)
{
$like_share_perpage = 15;
if ($var_tablikes == "received")
{
$tab_title = "الإعجابات المتلقية";
$sql_where = "posts.userid IN('" . $userinfo['userid'] . "')";
if ($userinfo['userid'] == $vbulletin->userinfo['userid'] && $vbulletin->userinfo['likes_by_ali'] >= 1)
{
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET likes_by_ali = 0 WHERE userid IN('{$vbulletin->userinfo['userid']}') LIMIT 1 ");
}
}
else
{
$tab_title = "الإعجابات المرسولة";
$sql_where = "likes.like_userid IN('" . $userinfo['userid'] . "')";
}
if ($sql_where)
{
// banned forums
$banned_forums = "";
$exploded_forumid = explode(",", $vbulletin->options["ls_banned_forums"]);
if (count($exploded_forumid))
{
$banned_forums = " AND threads.forumid NOT IN('" . implode(',', $exploded_forumid) . "') ";
}
// total
$total_likes_q = $db->query_read("
SELECT
likes.like_postid, likes.like_userid, likes.like_time,
posts.userid,
users.userid AS user_userid
FROM vb_like_share AS likes
LEFT JOIN " . TABLE_PREFIX . "post AS posts ON (likes.like_postid = posts.postid)
LEFT JOIN " . TABLE_PREFIX . "user AS users ON (users.userid = posts.userid)
LEFT JOIN " . TABLE_PREFIX . "thread AS threads ON (threads.threadid = posts.threadid)
WHERE {$sql_where} {$banned_forums}
");
// pagination
$var_page = intval($_GET["page"]);
$var_page = (int) (!isset($var_page) ? 1 : $var_page);
$var_page = ($var_page == 0 ? 1 : $var_page);
$startpoint = ($var_page * $like_share_perpage) - $like_share_perpage;
$total_likes_perpage_q = $db->query_read("
SELECT
likes.like_id, likes.like_postid, likes.like_userid, likes.like_username, likes.like_time,
posts.postid AS post_postid, posts.userid AS post_userid, posts.dateline AS post_time, posts.threadid, posts.pagetext, posts.threadid,
users.userid AS user_userid, users.username,
users2.userid AS user_userid2, users2.username AS username_2,
threads.threadid, threads.title AS thread_title
FROM vb_like_share AS likes
LEFT JOIN " . TABLE_PREFIX . "post AS posts ON (likes.like_postid = posts.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS threads ON (threads.threadid = posts.threadid)
LEFT JOIN " . TABLE_PREFIX . "user AS users ON (users.userid = posts.userid)
LEFT JOIN " . TABLE_PREFIX . "user AS users2 ON (users2.userid = likes.like_userid)
WHERE {$sql_where} {$banned_forums}
ORDER BY likes.like_time DESC LIMIT $startpoint,$like_share_perpage
");
$likes_by_ali = "";
while ($likes = $db->fetch_array($total_likes_perpage_q))
{
// Vars :
$like_pagetext = strip_tags(str_replace(array("[", "]"), array("<", ">"), $likes[pagetext]));
$like_pagetext = str_replace("", "", $like_pagetext);
$like_pagetext = substr($like_pagetext, 0, 186)."...";
$like_time = vbdate($vbulletin->options['dateformat'], $likes['like_time'], 1, false).'<span class="time">'.vbdate(", H:i", $likes[like_time], false, false).'</span>';
$like_post_time = vbdate($vbulletin->options['dateformat'], $likes['post_time'], 1, false).'<span class="time">'.vbdate(", H:i", $likes[post_time], false, false).'</span>';
// User image :
$like_image = ($likes['user_userid']) ? fetch_avatar_url($likes['user_userid']) : '';
$like_image = ($like_image[0]) ? $like_image[0] : "images/like_share/user_no_image.png";
$likes_by_ali .= "\n";
$likes_by_ali .= ' <table cellspacing="1" cellpadding="0" width="100%">
<tr>
<td width="100%" valign="top">
<div class="tborder info_bar">
<div class="alt2 smallfont">
' . $likes['username_2'] . ' أعجب بالمشاركة التي اضيفت بواسطة <a href="member.php?u=' . $likes['user_userid'] . '">' . $likes['username'] . '</a> متاحة الموضوع : <strong>' . $likes['thread_title'] . '</strong>
</div>
</div>
<div class="visitor_message_body">
<a href="showthread.php?p=' . $likes['post_postid'] . '#post' . $likes['post_postid'] . '">
' . $like_pagetext . '
</a>
<div class="smallfont">
تم الاعجاب في: ' . $like_time . '
<br />أضيفت المشاركة في: ' . $like_post_time . '
</div>
</div>
</td>
<td valign="top"><a href="member.php?u=' . $likes['user_userid'] . '" class="avatarlink"><img class="alt2 avatar" border="0" src="' . $like_image . '" alt="' . $likes['username'] . '" width="60px" height="60px" /></a></td>
</tr>
</table>';
$likes_by_ali .= "\n";
}
// template :
$total_likes_count = $db->num_rows($total_likes_q);
if ($total_likes_count)
{
$page_nav_by_ali = construct_page_nav($var_page, $like_share_perpage, $total_likes_count, "member.php?u={$userinfo["userid"]}&tab_likes={$var_tablikes}","", "#like_share_by_ali");
}
$selected_tab = "like_share_by_ali";
$vbulletin->templatecache['MEMBERINFO'] = str_replace(
'$blocks[contactinfo]',
$vbulletin->templatecache['like_share_by_ali_memberinfo'],
$vbulletin->templatecache['MEMBERINFO']
);
}
}
}
*-.-**-.-**-.-**-.-**-.-**-.-**-.-*
أخي لم ترد لي خبر على التعديل الدي أنا قمت به هل صحيح أم لا