بس حبيت أذكر الحل لمن قد تواجهه نفس المشكلة
فالسبب وجود خطأ بتركيب الأكواد والحل بإلتراجع عن كل ما تمت إضافته
والهاك الموجود على الرابط التالي : http://www.mediafire.com/?1el8ucik9y3hdyr
يؤدي نفس العمل لمن يرغب
إليكم الملفات والأكواد الأساسية :
functions_editor.php
// #############################################################################
/**
* Builds a Javascript line to add a new attachment to the vB_Attachments object
*
* Assumes that all data is cleaned and htmlspecialchars'd
*
* @param integer Attachment ID
* @param string File name (myattachment.gif etc.)
* @param string Filesize (124 KB etc.)
* @param string Extension type (gif, jpg etc.)
* @param string (Optional) Javascript prefix, such as 'window.opener.'
*
* @return string
*/
function construct_attachment_add_js($attachmentid, $filename, $filesize, $extension, $prefix = '')
{
return $prefix . "vB_Attachments.add($attachmentid, '" . addslashes_js($filename) . "', '" . addslashes_js($filesize) . "', '$stylevar[imgdir_attach]/$extension.gif');\n";
}
// #############################################################################
/**
* Returns the maximum compatible editor mode depending on permissions, options and browser
*
* @param integer The requested editor mode (-1 = user default, 0 = simple textarea, 1 = standard editor controls, 2 = wysiwyg controls)
* @param string Editor type (full = 'fe', quick reply = 'qr')
*
* @return integer The maximum possible mode (0, 1, 2)
*/
function is_wysiwyg_compatible($userchoice = -1, $editormode = 'fe')
{
global $vbulletin;
// Netscape 4... don't even bother to check user choice as the toolbars won't work
if (is_browser('netscape') OR is_browser('webtv'))
{
return 0;
}
// check for a standard setting
if ($userchoice == -1)
{
$userchoice = $vbulletin->userinfo['showvbcode'];
}
// unserialize the option if we need to
if (!is_array($vbulletin->options['editormodes_array']))
{
$vbulletin->options['editormodes_array'] = unserialize($vbulletin->options['editormodes']);
}
// make sure we have a valid editor mode to check
switch ($editormode)
{
case 'fe':
case 'qr':
case 'qe':
break;
default:
$editormode = 'fe';
}
if ($choice == 2) // attempting to use WYSIWYG, check that we really can
{
if (!is_browser('opera') OR is_browser('opera', '9.0'))
{
// Check Mozilla Browsers
if (is_browser('firebird', '0.6.1') OR is_browser('camino', '0.9') OR (is_browser('mozilla', '20030312') AND !is_browser('firebird') AND !is_browser('camino')))
{
return 2;
}
else if (is_browser('ie', '5.5') AND !is_browser('mac'))
{
return 2;
}
else if (false AND is_browser('opera', '9.0'))
{
return 2;
}
else
{
return 1;
}
}
else
{
// browser is incompatible - return standard toolbar
return 1;
}
}
else
{
// return standard or no toolbar
return $choice;
}
}
// #############################################################################
/**
* Prepares the templates for a message editor
*
* @param string The text to be initially loaded into the editor
* @param boolean Is the initial text HTML (rather than plain text or bbcode)?
* @param mixed Forum ID of the forum into which we are posting. Special rules apply for values of 'privatemessage', 'usernote', 'calendar', 'announcement' and 'nonforum'. Can be an object of vB_Editor_Override as well.
* @param boolean Allow smilies?
* @param boolean Parse smilies in the text of the message?
* @param boolean Allow attachments?
* @param string Editor type - either 'fe' for full editor or 'qr' for quick reply
* @param string Force the editor to use the specified value as its editorid, rather than making one up
* @param array Information for the image popup
* @param array Content type handled by this editor, used to set specific CSS
*
* @return string Editor ID
*/
function construct_edit_toolbar($text = '', $ishtml = false, $forumid = 0, $allowsmilie = true, $parsesmilie = true, $can_attach = false, $editor_type = 'fe', $force_editorid = '', $attachinfo = array(), $content = 'content')
{
// standard stuff
global $vbulletin, $vbphrase, $show;
// templates generated by this function
global $messagearea, $smiliebox, $disablesmiliesoption, $checked, $vBeditTemplate;
// misc stuff built by this function
global $istyles;
// counter for editorid
static $editorcount = 0;
if (is_object($forumid) AND $forumid instanceof vB_Editor_Override)
{
$editor_override = $forumid;
}
else
{
$editor_override = null;
}
// determine what we can use
// this was moved up here as I need the switch to determine if bbcode is enabled
// to determine if a toolbar is usable
if ($forumid == 'signature')
{
$sig_perms =& $vbulletin->userinfo['permissions']['signaturepermissions'];
$sig_perms_bits =& $vbulletin->bf_ugp_signaturepermissions;
if (empty($forumid))
{
$forumid = 'nonforum';
}
switch($forumid)
{
case 'privatemessage':
$can_toolbar = $vbulletin->options['privallowbbcode'];
$show['img_bbcode'] = $vbulletin->options['privallowbbimagecode'];
break;
case 'usernote':
$can_toolbar = $vbulletin->options['unallowvbcode'];
$show['img_bbcode'] = $vbulletin->options['unallowimg'];
break;
case 'calendar':
global $calendarinfo;
$can_toolbar = $calendarinfo['allowbbcode'];
$show['img_bbcode'] = $calendarinfo['allowimgcode'];
$ajax_extra = "calendarid=$calendarinfo[calendarid]";
break;
case 'announcement':
$can_toolbar = true;
$show['img_bbcode'] = true;
break;
case 'signature':
// see above -- these are handled earlier
break;
case 'visitormessage':
case 'groupmessage':
case 'picturecomment':
{
switch($forumid)
{
case 'groupmessage':
$allowedoption = $vbulletin->options['sg_allowed_bbcode'];
break;
case 'picturecomment':
$allowedoption = $vbulletin->options['pc_allowed_bbcode'];
break;
$can_toolbar = (
$show['font_bbcode'] OR $show['size_bbcode'] OR $show['color_bbcode'] OR
$show['basic_bbcode'] OR $show['align_bbcode'] OR $show['list_bbcode'] OR
$show['code_bbcode'] OR $show['html_bbcode'] OR $show['php_bbcode'] OR
$show['url_bbcode'] OR $show['quote_bbcode'] OR $show['img_bbcode']
);
// set the height of the editor based on the editor_height cookie if it exists
$editor_height = $vbulletin->input->clean_gpc('c', 'editor_height', TYPE_UINT);
$editor_height = ($editor_height > 100) ? $editor_height : 250;
// init the variables used by the templates built by this function
$vBeditJs = array(
'normalmode' => 'false'
);
$vBeditTemplate = array(
'clientscript' => '',
'fontfeedback' => '',
'sizefeedback' => '',
'smiliepopup' => ''
);
$extrabuttons = '';
if ($editor_type == 'qr' OR $editor_type == 'qr_small')
{
// no smilies
}
else if ($allowsmilie AND $show['editor_toolbar'])
{
// deal with disable smilies option
if (!isset($checked['disablesmilies']))
{
$vbulletin->input->clean_gpc('r', 'disablesmilies', TYPE_BOOL);
$checked['disablesmilies'] = iif($vbulletin->GPC['disablesmilies'], 'checked="checked"');
}
$templater = vB_Template::create('newpost_disablesmiliesoption');
$templater->register('checked', $checked);
$disablesmiliesoption = $templater->render();
if ($toolbartype AND ($vbulletin->options['smtotal'] > 0 OR $vbulletin->options['wysiwyg_smtotal'] > 0))
{
// query smilies
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");
// get total number of smilies
$totalsmilies = $vbulletin->db->num_rows($smilies);
if ($totalsmilies > 0)
{
if ($vbulletin->options['wysiwyg_smtotal'] > 0)
{
$show['wysiwygsmilies'] = true;
// #############################################################################
/**
* Returns the extra buttons as defined by the bbcode editor
*
* @param string ID of the editor of which these buttons will be a part
* @param boolean Set to false to disable custom bbcode buttons
*
* @return string Extra buttons HTML
*/
function construct_editor_extra_buttons($editorid, $allow_custom_bbcode = true)
{
global $vbphrase, $vbulletin;
$extrabuttons = array();
if ($allow_custom_bbcode and isset($vbulletin->bbcodecache))
{
foreach ($vbulletin->bbcodecache AS $bbcode)
{
if ($bbcode['buttonimage'] != '')
{
$bbcode['tag'] = strtoupper($bbcode['bbcodetag']);
$extrabuttons[] = $bbcode;
}
}
}
شكرااااااااااااا
اخي زهير
بارك الله فيك
وجزاك كل خير
بس حبيت أذكر الحل لمن قد تواجهه نفس المشكلة
فالسبب وجود خطأ بتركيب الأكواد والحل بإلتراجع عن كل ما تمت إضافته
والهاك الموجود على الرابط التالي : http://www.mediafire.com/?1el8ucik9y3hdyr
يؤدي نفس العمل لمن يرغب
إليكم الملفات والأكواد الأساسية :
functions_editor.php
showthread_quickreply
تم الحل وكل الشكر
الى الاستاذ زهير
بارك الله فيه
وجزاه كل خير
على المساعدة
:wli::wli::wli:
شو السبب
وشكرااااااااااااااا
بارك الله فيك:wli::wli:
شكراااااااااااااااااا
لك اخي زهير
بارك الله فيك
وجزاك كل خير
تفضل أخي فراس
في الموضوع التالي تجد مبتغاك
http://www.tahasoft.com/vb/showthread.php?21843
تحياتي