Mention button
صفحة 1 من اصل 1 • شاطر
Mention button
- الكود:
/* FORUM VERSIONS
* 0 = PHPBB2
* 1 = PHPBB3
* 2 = PUNBB
* 3 = INVISION
* 4 = MODERNBB
* 5 = AWESOMEBB
*/
$(function() {
var version = 0,
image = 'https://i.servimg.com/u/f19/18/21/60/73/mentio10.png';
if (/mode=reply/.test(window.location.search) && my_getcookie('fa_mention')) {
document.post.message.value += '@"' + my_getcookie('fa_mention') + '" ';
my_setcookie('fa_mention','');
} if (!/\/t\d+/.test(window.location.pathname)) return;
for (var a = $(['.post-options', '.profile-icons', '.post-options', '.posting-icons', '.profile-icons', '.post-buttons ul'][version]), b, c, d = ['.name strong a', '.author a', '.username a', '.author a', '.postprofile-name a', '.post-author-name a'][version], e, i = 0, j = a.length, t = document.getElementById('text_editor_textarea'), l = version == 1 || version == 3 || version == 4 || version == 5; i<j; i++) {
b = document.createElement('IMG');
b.src = image;
b.alt = 'Mention';
b.title = 'Mention ' + $(a[i]).closest(version == 5 ? '.post-wrap' : '.post').find(d + ':not(.fa-mention)').text();
b.className = 'i_icon_mention';
b.onclick = function() {
var n = this.title.replace(/^.*?\s/,'');
if (version == 5) {
var area = document.getElementById('quick-reply-textarea');
if (area) {
area.value += '@"' + n + '" ';
area.focus();
}
return false;
} else {
if ($.sceditor) t.insertText('@"' + n + '" ');
else {
my_setcookie('fa_mention', n);
window.location.href = '/post?t=' + window.location.pathname.replace(/\/t(\d+)-.*/,'$1') + '&mode=reply';
}
}
};
if (l) {
c = document.createElement('LI');
c.appendChild(b);
}
a[i].insertBefore(l ? c : b, a[i].firstChild);
}
$(function(){
if (!$.sceditor) return;
t=$(t).sceditor('instance');
});
});
للمشاركة انت بحاجه الى تسجيل الدخول او التسجيل
يجب ان تعرف نفسك بتسجيل الدخول او بالاشتراك معنا للمشاركة
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى
الأربعاء أبريل 19, 2023 10:03 pm من طرف Admin
» كود تعريب أحصائيات المنتدى
الأحد أبريل 16, 2023 9:38 pm من طرف Admin
» وانا وانتى بنا سلام
الخميس أكتوبر 28, 2021 11:18 am من طرف Admin
» شرحة لعة PureSRO
الجمعة سبتمبر 24, 2021 8:51 pm من طرف Admin
» ما هو الحب ؟
الخميس سبتمبر 23, 2021 11:00 am من طرف Admin
» مفتاح الأمان
الجمعة أغسطس 06, 2021 4:59 am من طرف Admin
» وجع الفراق
الإثنين أغسطس 02, 2021 1:42 am من طرف Admin
» tooltipster
الأربعاء يوليو 28, 2021 3:18 am من طرف Admin
» أكان من الصعب عليهم أن أصان
الإثنين يوليو 26, 2021 9:33 pm من طرف Shrouk zoghry
» كيف أحزن والله ربي
الثلاثاء يوليو 20, 2021 3:00 pm من طرف Admin
» خطبة عيد الأضحى قصيرة مكتوبة بتاريخ ٩ ذو الحجة ١٤٤٢ هـ
الإثنين يوليو 19, 2021 3:57 pm من طرف Admin
» تهنئة بمناسبة حلول عيد الأضحى المُبارك 1442هـ/2021م
الإثنين يوليو 19, 2021 2:58 pm من طرف Admin
» agreement إظهار شروط التسجيل في منتداك
الأحد يوليو 11, 2021 8:06 pm من طرف Admin
» كود أضافة الوجة الضاحكة مثل الفيس بوك
الخميس يوليو 01, 2021 4:36 am من طرف Admin
» كود جافا وضع العلامة المائية للشخصية العامة على أحلى منتدى
السبت يونيو 26, 2021 5:50 pm من طرف Admin