vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Who Downloaded This Attachment (https://vborg.vbsupport.ru/showthread.php?t=103155)

akanevsky 12-16-2005 10:00 PM

Who Downloaded This Attachment
 
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.

/*=============================================*\
|| Who Downloaded This Attachment
||
|| Author : Anton Kanevsky
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : Jun 27, 2009
||
|| Time required to install: ~30 seconds
|| Difficulty: easy
\*=============================================*/

DESCRIPTION

Allows users to see detailed information about who has downloaded attachments.

STATISTICS

File Uploads: 1
Products to Install: 1


FEATURES

General:
  • Displays a list of users with information about the number of downloads and last downloaded time.
  • Allows to specify which usergroups can use the feature.

VERSION HISTORY

1.1.0
[F] Fixed a bug in the product xml file.

1.1.0
[+] Officially compatible with 3.5.x - 3.8.x.
[+] Removed all file and template edits.
[+] Added usergroup permission to specify which usergroups can use the feature.
[+] The last downloaded time for each user is now displayed.

1.0.2
[F] Compatibility with 3.5.2's modified attachments.php.

1.0.1
[+] Each user now has a number of downloads displayed next to him/her.

1.0.0
First Release

The installation manual is contained within the attached file.

IF YOU LIKE MY HACK, PLEASE CLICK INSTALL

TyleR 12-17-2005 07:21 PM

hmm..so is this like a more simple version of this hack by Mr Blunt?

i'll check it out in a minute :)

- Tyler

akanevsky 12-17-2005 07:23 PM

Uh.. I didn't know that there was already such hack. But yeah, looks like it. less buff = better :)

JohnBee 12-17-2005 07:23 PM

Nice little addon!

Is it possible to have it display the no. of downloads?
I would like to see a link that says: Downloaded 12 times and when you click or hover on it the list would appear :)

Still... this is a good and useful idea!

TyleR 12-17-2005 07:24 PM

well, installed perfectly, and much more simple than Mr Blunts..

/me clicks install

akanevsky 12-17-2005 07:31 PM

Seems like you missed the button ;)

akanevsky 12-17-2005 07:34 PM

Quote:

Originally Posted by JohnBee
Is it possible to have it display the no. of downloads?

Yes, definitely.

akanevsky 12-17-2005 08:04 PM

Ok, updated. Now the number is displayed.
If you have installed the hack, overwrite the XML and run this query:
[sql]ALTER TABLE attachmentviewslog ADD count INT( 10 ) UNSIGNED NOT NULL DEFAULT '1'[/sql]

TyleR 12-17-2005 09:40 PM

Quote:

Originally Posted by Psionic Vision
Seems like you missed the button ;)

oops :nervous:

[high]* TyleR clicks install and re-checks that he did this time :p[/high]

- Tyler

Rhoads 12-17-2005 10:20 PM

First of all thanks for your hack, were here for quite some time to look up.
Unfortunately I get a error when I refresh the page where the attachment is.

HTML Code:


Warning: mysql_query(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 395

Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 837

Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 855

There seems to have been a problem with the Forum database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 3.5.2:

Invalid SQL:

                        SELECT userid FROM attachmentviewslog
                        WHERE attachmentid = '21'
                        AND userid = '1';

MySQL Error  :
Error Number :
Date        : Sunday, December 18th 2005 @ 01:13:20 AM
Script      : http://www.mydomein/forum/attachment.php?attachmentid=21&d=1134864386
Referrer    : http://www.mydomein/forum/showthread.php?t=45
IP Address  : xx.xxx.xx.xxx
Username    : Xxxxxx
Classname    : vb_database


jluerken 12-17-2005 10:20 PM

The phrase "psiwd_who_downloaded" is not created automatically :D

akanevsky 12-17-2005 10:24 PM

Quote:

First thnx for this hack,
but I have no who downloaded link and I get many errors.
This is a problem with your copy of vBulletin, not with the hack.

Quote:

The phrase "psiwd_who_downloaded" is not created automatically
Thanks, fixed :)

dan35 12-17-2005 10:26 PM

Does it show how many times a member downloaded the same attachment? Just for antileeching you know ;)

Rhoads 12-17-2005 10:27 PM

Quote:

Originally Posted by Psionic Vision
This is a problem with your copy of vBulletin, not with the hack.

Why is this a problem of my vbulletin :ermm: , I have exactly such vbulletin as everyone other one. vB 3.5.2

jluerken 12-17-2005 10:27 PM

I added a download to the db and downloaded it three times.

See the output (attachment).

The window is not showing the user name and a 0 instead which is definetly wrong.

akanevsky 12-17-2005 10:29 PM

Quote:

Does it show how many times a member downloaded the same attachment? Just for antileeching you know
Yes.

Quote:

Why a this problem of my vbulletin is, I have exactly such vbulletin as everyone other one.
Because my hack does not go anywhere near class_core.

Quote:

I added a download to the db and downloaded it three times.

See the output (attachment).

The window is not showing the user name and a 0 instead which is definetly wrong.
Can I see that on your board?

Rhoads 12-17-2005 10:38 PM

Quote:

Originally Posted by Psionic Vision
Because my hack does not go anywhere near class_core.

Oke, very vague
Uninstall is the best way at this moment :disappointed:

Xtrato 12-17-2005 10:43 PM

Quote:

Originally Posted by drl2005
Oke, very vague
Uninstall is the best way at this moment :disappointed:

Its a problem with your vB copy. most likey a bug.

JohnBee 12-18-2005 02:35 AM

Dewd your .html installer is KICK ASS!!!! .thumbsup. [INSTALLED]

Rickie3 12-18-2005 03:15 AM

this is great,but one thing,is there anyway of only allowing admins/mods to view who downloaded,as everyone can view even guests
*installed* anyway very handy,installed on 3.5.0 no probs

jluerken 12-18-2005 07:55 AM

Quote:

Originally Posted by drl2005
Database error in vBulletin 3.5.2:

Invalid SQL:

SELECT userid FROM attachmentviewslog
WHERE attachmentid = '21'
AND userid = '1';

MySQL Error :
Error Number :
Date : Sunday, December 18th 2005 @ 01:13:20 AM

This night I got messages from my board with the same error:

Database error in vBulletin 3.5.2:

Invalid SQL:

SELECT userid FROM vb3_attachmentviewslog
WHERE attachmentid = '817'
AND userid = '3';

MySQL Error :
Error Number :
Date : Sunday, December 18th 2005 @ 01:17:00 AM
Script : http://www.xyz.com/forum/attachment....7&d=1134864414
Referrer : http://www.xyz.com/forum/showthread.php?t=9726

There is definetly something wrong with this hack at the moment.

Rhoads 12-18-2005 08:31 AM

Quote:

Originally Posted by jluerken
This night I got messages from my board with the same error:

There is definetly something wrong with this hack at the moment.

I think it also.
I have install vbulletin this week, and have no charge of other plugins.
Perhaps it is a MySQL Version problem ?
I have MySQL Version 3.23.58 stable.

jluerken 12-18-2005 08:48 AM

Quote:

Originally Posted by drl2005
I think it also.
I have install vbulletin this week, and have no charge of other plugins.
Perhaps it is a MySQL Version problem ?
I have MySQL Version 3.23.58 stable.

Mine is 4.0.18 and I don't think that this is the problem

dan35 12-18-2005 10:41 AM

Mine is 4.0.26.

Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT userid FROM attachmentviewslog
WHERE attachmentid = '8503'
AND userid = '1';

akanevsky 12-18-2005 11:28 AM

What is the reason for this SQL to be invalid? Does it tell you why it's invalid?

Quote:

this is great,but one thing,is there anyway of only allowing admins/mods to view who downloaded,as everyone can view even guests
*installed* anyway very handy,installed on 3.5.0 no probs
If you disable "thread view" permissions for guests, then they won't be able to look. Otherwise, they will.

Rhoads 12-18-2005 12:16 PM

Quote:

Originally Posted by Psionic Vision
What is the reason for this SQL to be invalid? Does it tell you why it's invalid?

This is the only warning that I gets:

HTML Code:

Warning: mysql_query(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 395

Warning: mysql_error(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 837

Warning: mysql_errno(): 7 is not a valid MySQL-Link resource in /includes/class_core.php on line 855

I have vBulletin Version 3.5.2 and my class_core.php are orgineel

akanevsky 12-18-2005 12:17 PM

Do you have that problem with the product XML disabled?
And what type of attachment are you trying to download when this happens?

EDIT: Fixed. In 3.5.2, attachment.php was modified and I had to move the code to a different hook. Now it's working properly in 3.5.2 :)

Rhoads 12-18-2005 05:21 PM

Installed again, but there happened nothing if I download my zip file.
Also it do not counted the views.
(see first screen)

When I turn off the plugin, then I see the Who Downloaded? text, but I get also a page with the Generic Smilies code's :eek:
(see second screen)

akanevsky 12-18-2005 05:25 PM

Try UNINSTALLING the hack, and the installing it again.
Or, when you install, make sure to check "ALLOW OVERWRITE".

There is NO way for it to NOT work, because I just installed it on a new vbulletin 3.5.2 board, and it works perfectly.

Rhoads 12-18-2005 05:41 PM

Quote:

Originally Posted by Psionic Vision
Try UNINSTALLING the hack, and the installing it again.
Or, when you install, make sure to check "ALLOW OVERWRITE".

There is NO way for it to NOT work, because I just installed it on a new vbulletin 3.5.2 board, and it works perfectly.

Oke on my clean testboard i get now this error in the Who Downloaded popup when i push on the Who Downloaded link:

HTML Code:

Database error in vBulletin 3.5.2:

Invalid SQL:

                SELECT attachmentviewslog.userid, attachmentviewslog.count, user.username
                FROM attachmentviewslog AS attachmentviewslog
                LEFT JOIN user AS user USING(userid)
                WHERE attachmentviewslog.attachmentid = 21
                ORDER BY username;

MySQL Error  : Table 'vbtest.attachmentviewslog' doesn't exist
Error Number : 1146
Date        : Sunday, December 18th 2005 @ 08:39:41 PM
Script      : http://www.mydomein.com/forum/misc.php?do=whodownloaded&attachmentid=21
Referrer    :
IP Address  : xx.xxx.xx.xxx
Username    : xxxxxxxxx
Classname    : vb_database


dan35 12-18-2005 08:11 PM

New attachments are fine. But with old attachments there are errors:

Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT userid FROM attachmentviewslog
WHERE attachmentid = '8470'
AND userid = '72';

MySQL Error :
Error Number :
Date : Sunday, December 18th 2005 @ 01:48:14 PM
Script : http://www.domain.com/forums/attachm...1&d=1131814178
Referrer : http://www.domain.com/forums/showthread.php?t=2604

IP Address : xx.xx.xx.xx
Username : xxxx
Classname : vb_database

akanevsky 12-18-2005 08:26 PM

drl2005
That is strange. Try uninstalling the product and reinstalling it again.
You should have that table in your DB after you install the XML.

dan35
Make sure you have uninstalled the old product XML before you install the new one.

dan35 12-18-2005 08:51 PM

Thank you! It works ;)

Rhoads 12-19-2005 03:25 AM

Quote:

Originally Posted by Psionic Vision
drl2005
That is strange. Try uninstalling the product and reinstalling it again.
You should have that table in your DB after you install the XML.

3 time uninstalled and installed, but it remains the same.
Can you give me the table so that I can put it in my database without the xml file.

Rickie3 12-19-2005 03:58 AM

Quote:

Originally Posted by Psionic Vision



If you disable "thread view" permissions for guests, then they won't be able to look. Otherwise, they will.

hmmmm not quite what i was after,i dont want to disable thread viewing for guests,only want to disable viewing of who downloaded from guests

akanevsky 12-19-2005 09:26 AM

I'll see if I add a who downloaded usergroup permission in next version.
As for MySQL error - make you delete the whodownloaded plugin located at attachment_complete hook.

Rickie3 12-19-2005 09:34 AM

Quote:

Originally Posted by Psionic Vision
I'll see if I add a who downloaded usergroup permission in next version.

thankyou look forward to it,keep up the good work :up:

Rhoads 12-19-2005 01:13 PM

Quote:

Originally Posted by Psionic Vision
As for MySQL error - make you delete the whodownloaded plugin located at attachment_complete hook.

Sorry, but I get not entirely what your meant

nuxvirg 12-22-2005 10:08 AM

SQL sorgusu:

ALTER TABLE attachmentviewslog ADD count INT( 10 ) UNSIGNED NOT NULL DEFAULT '1'

MySQL çıktısı: Yardım
#1146 - Table 'gerha_forum.attachmentviewslog' doesn't exist

akanevsky 12-22-2005 05:50 PM

If you have a table prefix defined, then you need to prepend "attachmentviewslog" with that table prefix before you run the query.


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

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.01438 seconds
  • Memory Usage 1,838KB
  • 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
  • (3)bbcode_html_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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