Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Tommy Boy Tommy Boy is offline
Developer Last Online: Oct 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-30-2001 Last Update: Never Installs: 49
 
No support by the author.

After installing this hack, you will be able to post new attachment when editing posts, even if these posts did not have a prior attachment.

(Version 1.1 is updated for vBulletin 2.2.4 - No need to update if you're running vBulletin 2.2.3b or lower).

Show Your Support

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

Comments
  #42  
Old 07-03-2002, 10:25 AM
Hellburn Hellburn is offline
 
Join Date: Mar 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oki i have fixed the hack for 2.2.6.
Reply With Quote
  #43  
Old 07-06-2002, 03:40 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

the Hack doesn't update the attachment count of the thread, so if there was no attachment before in this thread, the paperclip icon does not show up in the thread list of a forum.

To fix this, you have to do this change, after installing the Hack:

Search in editpost.php:
Code:
  // Add attachment on edit post hack (start)
  elseif (trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="")
  {
    $attachmentid=acceptupload($foruminfo[moderateattach]);
    $attachmentsql=",attachmentid='$attachmentid'";
and add below it:
Code:
    $DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid='$threadinfo[threadid]'");
Mystics
Reply With Quote
  #44  
Old 07-08-2002, 03:53 AM
PhotoGenie PhotoGenie is offline
 
Join Date: Jan 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a little confused in the directions.

Still in editpost.php, look for: [vBulletin 2.2.6 and up ONLY!]
--------------------------------------------------------------------------------
if (phpversion() < '4.0.3') {
$enctype = 'enctype="multipart/form-data"';
} else if (ini_get('file_uploads')) {
$enctype = 'enctype="multipart/form-data"';
} else {
--------------------------------------------------------------------------------

Move this block a few lines up, just after this line:
--------------------------------------------------------------------------------
$enctype = '';

Am I supposed to remove the text above " $enctype = ''; " and then put it back in below it?
Reply With Quote
  #45  
Old 07-08-2002, 09:49 AM
Harley-1 Harley-1 is offline
 
Join Date: Apr 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

me too... can you give us a newbie hint?
Reply With Quote
  #46  
Old 07-08-2002, 02:03 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@PhotoGenie
@Harley-1

Just ignore this step! It's no longer necessary since vB 2.2.6.

I have attached the final version for 2.2.6 with my Bugfix (see Posting above).

Mystics
Reply With Quote
  #47  
Old 07-08-2002, 04:31 PM
PhotoGenie PhotoGenie is offline
 
Join Date: Jan 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That was easy enough.. Thank you!!.. This is a very good practical hack.
Reply With Quote
  #48  
Old 07-20-2002, 11:56 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After comparing the code that Mystics posted vs. the other code for 2.2.6, I went with Mystics. I dug around in other files and couldn't find where it would add to the attachment count, so that's why I used his. If this is incorrect someone post another update. :bunny:

Quote:
Originally posted by Mystics
@PhotoGenie
@Harley-1

Just ignore this step! It's no longer necessary since vB 2.2.6.

I have attached the final version for 2.2.6 with my Bugfix (see Posting above).

Mystics
Reply With Quote
  #49  
Old 08-03-2002, 12:59 AM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/attachment.php?s=&postid=270639" target="_blank">https://vborg.vbsupport.ru/attac...&postid=270639</a>
Works perfect here: 2.2.6.
Reply With Quote
  #50  
Old 08-08-2002, 04:11 AM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* Schorsch says Thank you very much Tommy Boy and Mystics [/high]
Reply With Quote
  #51  
Old 12-09-2002, 01:54 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have updated my attachment.

The canpostattachment-permission was not checked while editing a posting.

Thanks @Axel Foley for pointing this out.

Mystics
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 01:40 AM.


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.05293 seconds
  • Memory Usage 2,303KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete