Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Attach Files in Quick Reply Details »»
Attach Files in Quick Reply
Version: 1.00, by abus3d abus3d is offline
Developer Last Online: Nov 2009 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.7.4 Rating:
Released: 11-16-2008 Last Update: Never Installs: 17
Template Edits
Code Changes Translations  
No support by the author.

Dear All ....

since every body know we cant attach any file from the qucik reply, we have to go use newreply or newthread to use this feature ....

- since 3 days i am working in this option, with tries and errors and finally i succed to add the attach files in the quick reply to make it easy for the users.


** 3.7.4 **
+++++++++++++++++++++++++++++++++++++++++++++++++
The steps :

1- showthread.php :

please open the file ...

=== attached all the modifications for your helps ===

a- search for



PHP Code:
'bbcodecache'
add after this code the following :


PHP Code:
PHP Code:
'attachmentcache'

b- search for


PHP Code:
PHP Code:
'showthread_quickreply'
add after this the followings :


PHP Code:
'newpost_attachment',
 
'newpost_attachmentbit'
c- search for


PHP Code:
// *********************************************************************************
// build quick reply if appropriate 

befor this you have to add the following



PHP Code:
// get attachment options - by abus3d (www.marsasoft.net)
 
require_once(DIR '/includes/functions_file.php');
 
$inimaxattach fetch_max_upload_size();
 
$attachtypes =& $vbulletin->attachmentcache;
 
$maxattachsize vb_number_format($inimaxattach1true);
 
$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'], 1true);
     
$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 '';
 } 
d- please save your file (showthread.php)

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++

2- now we have to make some modifications in showthread template

a- please open your showthread tempale

search for :



PHP Code:
<input type="hidden" name="p" value="$qrpostidid="qr_postid" /> 
after this please add the followings :



PHP Code:
<input type="hidden" name="posthash" value="$posthash/>
   <
input type="hidden" name="poststarttime" value="$poststarttime/> 

b- in the same template you search :



PHP Code:
<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

you add after this the following :



PHP Code:
$attachmentoption 

finally save your template

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-17-2008, 02:44 PM
yhdf yhdf is offline
 
Join Date: Dec 2004
Location: ksa
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

abus3d

Thanks for the addition
Reply With Quote
  #3  
Old 11-17-2008, 03:54 PM
abus3d abus3d is offline
 
Join Date: May 2008
Location: UAE
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yhdf View Post
abus3d

Thanks for the addition

you welcome
Reply With Quote
  #4  
Old 11-18-2008, 01:01 AM
abus3d abus3d is offline
 
Join Date: May 2008
Location: UAE
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

up for all
Reply With Quote
  #5  
Old 11-18-2008, 09:26 AM
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Location: Jerusalem
Posts: 571
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks man ,
Reply With Quote
  #6  
Old 11-18-2008, 12:43 PM
Omranic's Avatar
Omranic Omranic is offline
 
Join Date: Jan 2005
Location: Egypt
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, It's already found in another premium product from ~ 5 months . Here it is:
https://vborg.vbsupport.ru/showthread.php?t=180330

It doesn't need any file edits & fully support AJAX features also.
Reply With Quote
  #7  
Old 11-18-2008, 02:16 PM
abus3d abus3d is offline
 
Join Date: May 2008
Location: UAE
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Barakat View Post
thanks man ,
you welcome
Reply With Quote
  #8  
Old 11-18-2008, 02:24 PM
abus3d abus3d is offline
 
Join Date: May 2008
Location: UAE
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SolidSnake@GTI View Post
Hey, It's already found in another premium product from ~ 5 months . Here it is:
https://vborg.vbsupport.ru/showthread.php?t=180330

It doesn't need any file edits & fully support AJAX features also.
hi sir,

thanks for your comments

i knew there a product for all these features, smile, attach, open,close.... etc


- i try to make it without any product or plug-ins


thanks for you sir
Reply With Quote
  #9  
Old 12-12-2008, 10:37 AM
abus3d abus3d is offline
 
Join Date: May 2008
Location: UAE
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

up fo all
Reply With Quote
  #10  
Old 06-10-2009, 07:26 PM
Se?or Ramos Se?or Ramos is offline
 
Join Date: Mar 2009
Location: Eastern PA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work with 3.8.x?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04557 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete