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)

kreftt 11-04-2002 08:35 PM

thats a very nice hack, but:

wont it be a problem on large boards with lots of attachments? i imagine it would have to search 3000 users's downloads column which include lots of attachments that have long been deleted...

or am i wrong in assuming this?

Dynamic One 11-11-2002 09:20 AM

Thanks TWTCommish. Job done well :).

partang2 11-15-2002 01:59 PM

Works great on 2.2.8 Thanks!

esfron 01-01-2003 05:23 PM

Thanks. I'll test it (2.2.9)

Edit: Just done one try by/for myself with a txt file on a clean board. Installed manually (no Vbhacker) and it's working on 2.2.9 without any hacks. You have to fix the CR (javascript) in headinclude.

Thanks again for this hack.

KnightCrash 01-19-2003 02:16 AM

Did anyone figure out what to use so admin/mods can only use this?

Thanks

KnightCrash 01-19-2003 01:53 PM

^^^^^^^bump^^^^^^^^

KnightCrash 01-20-2003 12:53 AM

bump

magna 02-15-2003 08:41 AM

would like to make this for admins only

Any help here, others would like to have it admins/mods

I would still like it admins only

great hack

thanks

TranceMaster 02-19-2003 02:00 AM

Quote:

Originally posted by TECK
great hack. :)
i'll use it but a little modified. i'll make it visible only for mods and admins.

ahhh
how would we go about doing this man?

Kars10 03-01-2003 08:55 AM

With this addon only admins/supermods/mods can view the downloads!

Instructions in the zip-file.
Enjoy! :D

Slynderdale 03-02-2003 11:30 AM

This is a great idea for a hack but it lacked a few things so I decided to make my own, Intsead of storing it in the user table and seperate them with a comma and also storing the same attachment id multiple times, i create a new table called attachment_view which keep track of the number of views and the last time a user views the attachment, Ill post a screen shot below.

firas 03-14-2003 07:12 AM

First of al, thanx for this gr8 hack

I've got a slight problme:
----------------------------
Database error in vBulletin 2.3.0:

Invalid SQL: SELECT u.userid, u.username FROM user u WHERE u.downloads LIKE "1%" OR u.downloads LIKE "%1%" OR u.downloads LIKE "%1" ORDER BY u.username ASC
mysql error: Unknown column 'u.downloads' in 'where clause'

mysql error number: 1054

Date: Friday 14th of March 2003 12:02:00 PM
Script: http://localhost/vb2/vb2/whodownloaded.php?s==1
Referer:
--------------------------
I noticed that it says http://localhost/vb2/vb2/whodownloaded.php
whereas my folder is:
http://localhost/vb2/whodownloaded.php

Can anyone help?

Bison 03-20-2003 06:46 AM

Quote:

03-02-03 at 08:30 AM Slynderdale said this in Post #91
This is a great idea for a hack but it lacked a few things so I decided to make my own, Intsead of storing it in the user table and seperate them with a comma and also storing the same attachment id multiple times, i create a new table called attachment_view which keep track of the number of views and the last time a user views the attachment, Ill post a screen shot below.
Would you like to share your version? The one here is constantly breaking and everytime I click on the "Who Downloaded this" link, nothing pops up! :cry:

Bison 03-20-2003 06:47 AM

Scrap Post ... [Mods Delete this please]

partang2 03-21-2003 10:13 AM

Did you change to this?

PHP Code:

<script language="JavaScript">
  <!-- 
START HIDE
function whodownloaded(attachmentid) {
     
window.open
("whodownloaded.php?s=$session[sessionhash]&attachmentid=" attachmentid,
 
"whodownloaded""toolbar=no,scrollbars=yes,resizable=no,width=240,height=300, top=50, left=50"); }
  -->
</
script

The function line needs to start on it's own line.

Bison 03-21-2003 12:00 PM

That's *exactly* how I have it ...

Boofo 03-21-2003 01:58 PM

It won't work on past attachments. It only saves the data for attachments made after the hack was installed. ;)

Bison 03-21-2003 06:28 PM

Well this hack must have broke somewhere cause it been installed a long time ago. To follow up on your theory Boofo, I just created a attachment and the script doesn't open up another window!

The worse thing about it is that i'm not getting a error message at all!

I believe after installing Bira's "contract posts" hack, it broke this one ... don't quote me on this but I can't seem to find the reason other than this.

I also have another Java Scipt in the headerinclude template for the Registered Members hack, and that one works great ... I just think that the way vb is created and how each of these pages are generated there must be a connection between these *two* hacks that involve the postbit, and showthread.

I've done the liberty of moving this script to this hack into the showthread header and still doesn't work.

Boofo 03-21-2003 07:50 PM

Try doing an onLoad= in the body tag for multiple java scripts that might be messing with one another. I found this solution after running in to a couple of them not playing nice together. Just a thought. ;)

Slynderdale 03-21-2003 07:52 PM

I believe theres a javascript conflict with biras's contract posts hack. I have the same problem.

Bison 03-21-2003 08:50 PM

Quote:

Today at 04:50 PM Boofo said this in Post #99
Try doing an onLoad= in the body tag for multiple java scripts that might be messing with one another. I found this solution after running in to a couple of them not playing nice together. Just a thought. ;)
there's no "body tag" in the "headinclude" template bro ... this problem resides in the postbit betwen Bira's Hack and this hack ... I just know it.

It might be that Bira's Cotract Post Hack is using the <DIV> tag and I don't know if this is true, but that might as well be the problem since they both are working in the same location.

If someone else have these two hacks workin together ... please reply to this! :)

Quote:

believe theres a javascript conflict with biras's contract posts hack. I have the same problem.
I bet there is ... only I need to find out how the page is put together to see if that js script (In Bira's Hack) is using the proper method of placing javaScript code within HTML ... or maybe this hack needs to be re-written.

Bison 03-22-2003 05:58 PM

^ ^

laycomp 03-29-2003 04:21 PM

Greets and great hack!

I am having a problem here in that the number displayed in "This has been downloaded x time(s). is not corresponding to the "who downloaded this" users in the pop up box.

As seen by attached file, the hack indicates 19 downloads, however, the popup box indicates only 7 members downloading the file.

Any suggestions please?

Bison 03-29-2003 04:40 PM

Someone may have used one of those download accelerators to download the attachment. These programs use two or more connections to download files. This maybe the reason why your numbers are off ... to test my theory, install a download program (Like Download Accelerator Plus) and download an attachment! :)

Boofo 03-29-2003 05:19 PM

Either that or maybe the same people downloaded it more than once. :)

laycomp 03-29-2003 10:38 PM

Quote:

Yesterday at 06:40 PM Rolodex said this in Post #104
Someone may have used one of those download accelerators to download the attachment. These programs use two or more connections to download files. This maybe the reason why your numbers are off ... to test my theory, install a download program (Like Download Accelerator Plus) and download an attachment! :)
I did try out the theory using GetRight and in my case, I downloaded a newly placed attachment and it only counted one download. Perhaps other download managers work differently but yes, a possibility since there are no external linking in my server log files.

As Boofo suggested aybe people download it twice or also another copy for backup or forget where they put it and download again, others may just download not remembering they downloaded already.

Thanks guys and sorry, should have thought of this possibility.

TeEq 04-07-2003 10:24 AM

What im doing this ??
ALTER TABLE user ADD COLUMN downloads TEXT NOT NUL

JeffyJoe 04-12-2003 12:03 AM

you must do this query or the pop up window will give your an error

it updates your database with the new string commands

(I am an extreme newbie myself so my wording may be wrong, but my point should still be taken) :)

Quote:

04-07-03 at 12:18 PM TeEq said this in Post #107
What im doing this ??
ALTER TABLE user ADD COLUMN downloads TEXT NOT NUL


dstruct2k 04-16-2003 04:16 AM

Ohhh, I like the hack, but this is great to see when I try to open an attachment....
Quote:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT downloads FROM user WHERE userid = 1
mysql error:

mysql error number: 0

Date: Tuesday 15th of April 2003 11:14:18 PM
Script: http://myhost/forums/forums/attachme...s=&postid=1247
Referer: http://myhost/forums/showthread.php?s=&postid=1247
I also get an error trying to open the "Who Downloaded" box.
Quote:

Invalid SQL: SELECT u.userid, u.username FROM user u WHERE u.downloads LIKE "37%" OR u.downloads LIKE "%37%" OR u.downloads LIKE "%37" ORDER BY u.username ASC
mysql error:

mysql error number: 0

Date: Tuesday 15th of April 2003 11:15:36 PM
Script: http://myhost/forums/forums/whodownl...ttachmentid=37
Referer:
Something tells me I have to modify both my tables and my queries... Damn these older hacks! :laugh:

dstruct2k 04-16-2003 04:18 AM

Ohhh.... The vBHacker file doesn't run the query itself....

My bad, problem solved. :D

Christoff 04-16-2003 03:05 PM

Quote:

03-02-03 at 01:30 PM Slynderdale said this in Post #91
This is a great idea for a hack but it lacked a few things so I decided to make my own...

Hi.. could you share your work with us?
It looks great...
If you do meybe you could think about a small change [or just tell us how to made such one]...
Instead of showing number of downloads per user, make another register for each download so that we could know when a person downloaded this [ if that was few times really or just one with a DL accelerator]...

I beg you :D [probably not only me!]

Regards

subu1 04-17-2003 08:11 AM

ups, i have a white popup on my 2.2.8 Version.

Can everybady help me

kabresh 07-02-2003 09:06 AM

anyone got this working on vb2.3.0?

Christoff 07-21-2003 06:00 PM

subu: check all the thread, there are some posts about your problem.

laycomp 08-13-2003 12:40 PM

I am currently using vb 3.0 b5 and must keep track of downloads, is this hack going to be available for vb3?

Is it that hard to port over to the new v3.0 vb version?

Thank you.

Morpheus84 08-13-2003 12:55 PM

Jelsoft has sayed, the won't would see vB 3 hacks.

laycomp 08-30-2003 04:51 AM

Maybe someone can do it for me for a fee? If ANYONE is interested, you may contact me via pm with your email, also I would like to add other important options, this to be discussed with project. Send me your quote for hack as is and then we'll discuss mods. This open to anyone and have hack ready when vb3 comes out, I will not require exclusivity so consider that too when pricing.

Thanks.

NoAhBoDy 12-12-2003 07:12 PM

fyi, the instructions for this hack need some repair work...any reference to "whodownloadsbits" needs to be changed to "whodownloadsbit" (in the instructions and the php files) and the javascript edit for the headinclude template needs to be changed to:

Code:

<script language="JavaScript">
  <!-- START HIDE
function whodownloaded(attachmentid) {
    window.open
("whodownloaded.php?s=$session[sessionhash]&attachmentid=" + attachmentid,
 "whodownloaded", "toolbar=no,scrollbars=yes,resizable=no,width=240,height=300, top=50, left=50"); }
  -->
</script>

$headnewpm

(ie, move the function line to it's own line as referenced on the 2nd or 3rd page of this thread....)

nice hack tho...just what i was looking for :)

laycomp 12-12-2003 09:17 PM

Yes, it's very cool hack, thanks man!

Mu5icMan 01-13-2004 02:04 PM

Is it possible to modify this Hack so you can see the dates and times when someone has downloaded a file even if they have downloaded it more than once.


All times are GMT. The time now is 04:17 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.01424 seconds
  • Memory Usage 1,831KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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