شرح المرفقات بالرد السريع بالصور

سجدة

عضو جديد
14 أبريل 2009
280
1
0
bsm.gif

المرفقات بالرد السريع
مثل
[URL="http://www.sagdaegypt.com/vb/uploaded/1_11251992990.gif"] [/URL[/URL]]​

ندخول فى الشرح على طول​

فى ملف فى المرفق باسم: showthread.php​

استبداله بس على شان ما تحصل لخبطه منك
[URL="http://www.sagdaegypt.com/vb/uploaded/1_11251993333.gif"] [/URL[/URL]]
ثم تروح
1/ لوحة تحكم المدير
2 /الإستايلات والقوالب
3/البحث في القوالب​


تبع
 

المرفقات

  • المرفقات بالرد السريع.zip
    247.2 KB · المشاهدات: 161
  • 1.gif
    1.gif
    108.2 KB · المشاهدات: 151
  • 2.gif
    2.gif
    63.9 KB · المشاهدات: 168

سجدة

عضو جديد
14 أبريل 2009
280
1
0
وفى قالب
4/SHOWTHREAD
كود:
ابحث عن:
 'bbcodecache',
اسفل منه ضع:
 'attachmentcache',

ثم ابحث عن:
 'showthread_quickreply',
اسفل منه ضع:
 'newpost_attachment',
 'newpost_attachmentbit',

ثم ابحث عن:
 
// 
/////////////////////////////////////////////////////////////////////
// build quick reply if appropriate

فوقة ضع:
// attachment in quickreply
 require_once(DIR . '/includes/functions_file.php');
 $inimaxattach = fetch_max_upload_size();
 $attachtypes =& $vbulletin->attachmentcache;
 $maxattachsize = vb_number_format($inimaxattach, 1, true);
 $attachcount = 0;
 $attach_editor = array();
 if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND 
$vbulletin->userinfo['userid'])
 {
  if (!$posthash OR !$poststarttime)
  {
   $poststarttime = TIMENOW;
   $posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . 
$vbulletin->userinfo['salt']);
  }
  else
  {
   if (empty($postattach))
   {
    $currentattaches = $db->query_read("
     SELECT dateline, filename, filesize, attachmentid
     FROM " . TABLE_PREFIX . "attachment
     WHERE posthash = '" . 
$db->escape_string($newpost['posthash']) . "'
      AND userid = " . 
$vbulletin->userinfo['userid']
    );
    while ($attach = $db->fetch_array($currentattaches))
    {
     $postattach["$attach[attachmentid]"] = $attach;
    }
   }
   if (!empty($postattach))
   {
    foreach($postattach AS $attachmentid => $attach)
    {
     $attach['extension'] = 
strtolower(file_extension($attach['filename']));
     $attach['filename'] = 
htmlspecialchars_uni($attach['filename']);
     $attach['filesize'] = 
vb_number_format($attach['filesize'], 1, true);
     $show['attachmentlist'] = true;
     eval('$attachments .= "' . 
fetch_template('newpost_attachmentbit') . '";');
     $attachment_js .= 
construct_attachment_add_js($attachmentid, $attach['filename'], $attach['filesize'], 
$attach['extension']);
     $attach_editor["$attachmentid"] = 
$attach['filename'];
    }
   }
  }
  $attachurl = "t=$threadinfo[threadid]";
  eval('$attachmentoption = "' . fetch_template('newpost_attachment') . 
'";');
  $attach_editor['hash'] = $postid;
  $attach_editor['url'] = 
"newattachment.php?$session[sessionurl]t=$threadinfo[threadid]&poststarttime=$poststartt
ime&posthash=$posthash";
 }
 else
 {
  $attachmentoption = '';
 }
// end
 
 
 

######### التعديل على قالب #########
 
1. افتح قالب
 SHOWTHREAD , (تعديلين)
ابحث عن: 
   <input type="hidden" name="t" value="$threadid" id="qr_threadid" />
   <input type="hidden" name="p" value="$qrpostid" id="qr_postid" />
اسفل منه ضع:
   <input type="hidden" name="posthash" value="$posthash" />
   <input type="hidden" name="poststarttime" value="$poststarttime" />

ثم ابحث عن: 
     <fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
      <legend>$vbphrase[options]</legend>
      <div>
       <if condition="$bbuserinfo['signature']">
        <div style="float:$stylevar[right]"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />$vbphrase[show_your_signature]</label></div>
       </if>
       <label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
      </div>
     </fieldset>
اسفل منه ضع:
     $attachmentoption
 

<!------ مبروك انتهى التركيب ------>
اللى مركب استايل عديل الروح ما فى دعى اللشرح ده كله يعمل استبدال الملف فقط