vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Who Downloaded This Attachment? (https://vborg.vbsupport.ru/showthread.php?t=36900)

TWTCommish 04-14-2002 09:54 PM

Like I said, I have no clue. But obviously all the commands have worked. I think this is a server side issue, and not really an issue with the hack, perhaps. I don't know what version of PHP or MySQL I'm running offhand, and I'm not up to finding out just yet. :D

wooolF[RM] 04-14-2002 09:57 PM

]53 hacks installed and only one doesn't work... :(
[high]* wooolF[RM] goes back in the corner and cries... :p[/high]

Chris M 04-15-2002 12:07 PM

Useful...

This will be a Hack I install soon!

Satan

Jawelin 04-15-2002 12:30 PM

Great hack and great idea!

As nakkid did, I enabled it only to Admin/Mods.
Besides, as suggested here,
Quote:

Originally posted by WallStreat
1. A suggestion: to store the dowload info into a new table instead of creating a new field in the user table.
2. The new whodownloaded table could contain the following info:
- attachmentid
- userid
- dateline
- ip
[...]

i tried to modify myself with a stand-alone table to keep downloads.
A table containing attachid/userid as key, then a counter for multiple-times downloaded
attachments, and as requested dateline and ipaddress of the lastest download by that user.

First look, I should use code like this in attachment.php to add values to that table:
PHP Code:

//HACK: Who downloaded attachment
if (!$attdl=$DB_site->query_first("SELECT * FROM attachment_download WHERE attachmentid='$attachmentid' AND userid='$bbuserinfo[userid]'") ) {
    
$usercounter=1;
} else {
    
$usercounter=$attdl[counter]++;
}
$ipaddress=getenv("REMOTE_ADDR");

$DB_site->query("REPLACE INTO attachment_download (attachmentid,userid,counter,dateline,ipaddress) VALUES ('$attachmentid','$bbuserinfo[userid]','$usercounter','".time()."','$ipaddress')");
//HACK: Who downloaded attachment 

If would and with the agreement of TWTCommish, we could go ahead all together to modify the
whodownloaded.php file (and templates) to read such a table...

What do you think about ?
Bye

TWTCommish 04-15-2002 12:32 PM

Well, I'm not opposed to it, if that's what you mean. :) The hack is free for anyone to use and modify as they please.

Lucky 04-16-2002 01:59 AM

Great work.

Looking good on 2.2.2

Lucky 04-18-2002 09:58 PM

I installed this hack and now when people reply to a post there post is put on top of the posts instead of below. I know that in the admin cp there is an option for this but it is not the problem. Any one know what is?

Also, most of the new post indicators are always on now as well, and it never changes.

TIA

TWTCommish 04-18-2002 10:00 PM

Hmm. Sounds like you might've accidently changed or deleted a line somewhere...

wooolF[RM] 04-19-2002 04:00 PM

]grrrrrrrr... still can't get it to work... :(

wooolF[RM] 04-20-2002 08:46 PM

ok... this is my last try...


All times are GMT. The time now is 05:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01768 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete