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
Private Attachments! (Attachments in Private Messages) Details »»
Private Attachments! (Attachments in Private Messages)
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-01-2002 Last Update: Never Installs: 54
 
No support by the author.

*drums*
This hack is now out of beta! Safe to use.

My latest and one of the more extensive hacks -- Private Attachments!
This huge (I ain't kidding, it's pretty big) hack will allow your members to send private messages with attachments in them, so they don't need to use e-mail for that.

Since this hack requires a large number of edits, this is how I recommend installing it:
(a) Run the queries.
(b) Edit all the files, offline.
(c) When you are done with (b) upload all the files at once.
(d) Perform the template edits.
If you do all actions in this order your users shouldn't notice you are installing the hack.

All feature requests (except for limiting this for usergroups -- if you want that do it yourself it's not hard but I'm tired of adding permissions to the dreaded usergroup.php) are welcome before this goes out of beta.

As always, have fun.

Show Your Support

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

Comments
  #52  
Old 07-25-2002, 06:54 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turn reg_globals on.
Reply With Quote
  #53  
Old 07-28-2002, 09:51 PM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hallo Firefly,

i already posted about this problem before, but didnt get any feedback yet. I rechecked the hack installation today and updated it to the current version, but it hasnt made any difference to my problem.

At first all seems to work fine, the attachment can be added and shows up in the receveivers and senders pm's. However after about 30 min. the icon and link for the attachment download disappears aswell at the number for the amount of times it was downloaded. Its really weird.

Im attaching a screenshot, of how the pm looks after 30 min or so. Would appreciate any help.

Tina
Reply With Quote
  #54  
Old 07-29-2002, 07:01 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have my hack of keeping attachments on preview post?
Reply With Quote
  #55  
Old 07-29-2002, 07:14 AM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No chen, I dont have a hack for keeping PM attachments installed (only for the normal postings).
Tina
Reply With Quote
  #56  
Old 07-29-2002, 07:15 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's not what I'm talking about. Do you have this hack installed?
https://vborg.vbsupport.ru/showthrea...threadid=38995
Reply With Quote
  #57  
Old 07-29-2002, 07:16 AM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I have that installed.
Reply With Quote
  #58  
Old 07-29-2002, 07:33 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In newreply.php and newthread.php replace this:
PHP Code:
// **************************************** \\
// *** Keep attachments when previewing *** \\
// **************************************** \\
$postinfo $DB_site->query_first('
    SELECT attachmentid, filename FROM attachment
    WHERE attachmentid = '
.intval($HTTP_POST_VARS['attachmentid']).' AND visible = 0
'
);
if (
intval($HTTP_POST_VARS['attachmentid']) != and $postinfo) {
    
$oldattachid $postinfo['attachmentid'];
} else {
    unset(
$oldattachid);
}

if (
$orphans $DB_site->query("SELECT a.attachmentid FROM attachment AS a LEFT JOIN post USING (attachmentid) WHERE postid IS NULL") and $DB_site->num_rows($orphans) > 0) {
    
$orphanids '0';
    while (
$orphan $DB_site->fetch_array($orphans)) {
        
$orphanids .= ",$orphan[attachmentid]";
    }
    
$DB_site->query("DELETE FROM attachment WHERE attachmentid IN ($orphanids) AND dateline < ".(time() - (60*15))." AND attachmentid <> ".intval($oldattachid));
}
// **************************************** \\
// *** Keep attachments when previewing *** \\
// **************************************** \\ 
With this:
PHP Code:
// **************************************** \\
// *** Keep attachments when previewing *** \\
// **************************************** \\
$postinfo $DB_site->query_first('
    SELECT attachmentid, filename FROM attachment
    WHERE attachmentid = '
.intval($HTTP_POST_VARS['attachmentid']).' AND visible = 0
'
);
if (
intval($HTTP_POST_VARS['attachmentid']) != and $postinfo) {
    
$oldattachid $postinfo['attachmentid'];
} else {
    unset(
$oldattachid);
}

if (
$orphans $DB_site->query("
        SELECT a.attachmentid
        FROM attachment AS a
        LEFT JOIN post ON (post.attachmentid = a.attachmentid)
        LEFT JOIN privatemessage ON (privatemessage.attachmentid = a.attachmentid)
        WHERE postid IS NULL AND privatemessageid IS NULL
    "
) and $DB_site->num_rows($orphans) > 0) {
    
$orphanids '0';
    while (
$orphan $DB_site->fetch_array($orphans)) {
        
$orphanids .= ",$orphan[attachmentid]";
    }
    
$DB_site->query("DELETE FROM attachment WHERE attachmentid IN ($orphanids) AND dateline < ".(time() - (60*15))." AND attachmentid <> ".intval($oldattachid));
}
// **************************************** \\
// *** Keep attachments when previewing *** \\
// **************************************** \\ 
Reply With Quote
  #59  
Old 07-29-2002, 08:33 AM
tkeil69575 tkeil69575 is offline
 
Join Date: Nov 2001
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you chen!!!
Looks like that has solved my Problem

Tina
Reply With Quote
  #60  
Old 08-04-2002, 10:34 AM
CJi CJi is offline
 
Join Date: Oct 2001
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bravo firefly, another fantastic hack
Reply With Quote
  #61  
Old 08-10-2002, 09:50 AM
Hellburn Hellburn is offline
 
Join Date: Mar 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have everybody make this one:
"except for limiting this for usergroups -- if you want that do it yourself it's not hard but I'm tired of adding permissions to the dreaded usergroup.php"
i want that only mods and admins can posting attachements. Can everybody help me?
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 08:49 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.06774 seconds
  • Memory Usage 2,327KB
  • 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_php
  • (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
  • (4)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