Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Who Downloaded This Attachment Details »»
Who Downloaded This Attachment
Version: 1.1.1, by akanevsky akanevsky is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 12-16-2005 Last Update: 06-26-2009 Installs: 108
DB Changes Uses Plugins Auto-Templates
Additional Files Translations  
No support by the author.

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

Show Your Support

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

Comments
  #82  
Old 10-25-2007, 11:30 AM
Direct Vision Direct Vision is offline
 
Join Date: Oct 2007
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i edited the vbulletin_global and still the same problem and i reinstall the hack but still no joy.

the page give this error when i press the who downloaded? botton

Line : 824
Char :1
Error : object exected
Code ; 0

can you help with this please?
Reply With Quote
  #83  
Old 10-25-2007, 12:15 PM
Direct Vision Direct Vision is offline
 
Join Date: Oct 2007
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This Is what i edited :

vbulletin_global.js
Code:
/**
* Opens a window to show a list of attachments in a thread (misc.php?do=showattachments)
*
* @param	integer	Thread ID
*
* @return	window
*/
function attachments(threadid)
{
	return openWindow(
		'misc.php?' + SESSIONURL + 'do=showattachments&t=' + threadid,
		480, 300
	);
}

/**
* Opens a window to show a list of posters in a thread (misc.php?do=whoposted)
*
* @param	integer	Thread ID
*
* @return	window
*/
function who(threadid)
{
	return openWindow(
		'misc.php?' + SESSIONURL + 'do=whoposted&t=' + threadid,
		230, 300
	);
}

/**
* Opens a window to show a list of people who have downloaded an attachment (misc.php?do=whodownloaded)
*
* @param	integer	Attachment ID
*
* @return	window
*/
function whodownloaded(attachmentid)
{
	return openWindow(
		'misc.php?' + SESSIONURL + 'do=whodownloaded&attachmentid=' + attachmentid,
		230, 300
	);
}
In modifyattachmentsbit :
Code:
<tr>
	<td class="alt2">
		<div>
			<if condition="$show['thumbnail']">
				<a href="attachment.php?$session[sessionurl]attachmentid=$post[attachmentid]&amp;d=$post[dateline]" target="attachment"><img src="attachment.php?$session[sessionurl]attachmentid=$post[attachmentid]&amp;stc=1&amp;thumb=1&amp;d=$post[thumbnail_dateline]" border="0" alt="" /></a>
			<else />
				<img class="inlineimg" src="$stylevar[imgdir_attach]/$post[attachmentextension].gif" alt="$post[attachmentextension]" /> <a href="attachment.php?$session[sessionurl]attachmentid=$post[attachmentid]&amp;d=$post[dateline]" target="attachment">$post[filename]</a>
			</if>
		</div>
		<div class="smallfont">$post[size], <phrase 1="$post[counter]">$vbphrase[x_downloads]</phrase><if condition="$post['counter'] > 0"> - <a href="#" onclick="whodownloaded($post[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if>
</td>
	<td class="alt1">
		<div class="smallfont">
			<div><strong>$vbphrase[thread]</strong>: <a href="showthread.php?$session[sessionurl]t=$post[p_threadid]">$post[t_title]</a></div>
			<div><strong>$vbphrase[post]</strong>: <a href="showthread.php?$session[sessionurl]p=$post[postid]#post$post[postid]">$post[p_title]</a></div>
		</div>
	</td>
	<td class="alt2">
		<if condition="$show['inprogress']">
			<em>$vbphrase[in_progress]</em>
		<else />
			<div class="smallfont">$post[postdate] <if condition="!$show['detailedtime']"><span class="time">$post[posttime]</span></if></div>
		</if>
	</td>
	<if condition="$show['deletebox']">
		<td class="alt1" align="center" style="padding:0px"><input type="checkbox" name="deletebox[$post[attachmentid]]" value="yes" /></td>				
	<else />
		<td class="alt1" align="center">&nbsp;</td>
	</if>
</tr>
And in postbit_attachment :
Code:
<tr>
	<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase><if condition="$attachment['counter'] > 0"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if>)</td>
</tr></if></td>
</tr>
And then i installed the hack.

Can you tell me what i did wrong??
Reply With Quote
  #84  
Old 11-02-2007, 10:15 AM
haytham's Avatar
haytham haytham is offline
 
Join Date: Jan 2003
Location: USA-Egypt-UAE
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Direct Vision View Post
i installed this modification and the view who downloaded appears, but when i press on it the page goes up and it doesn't show you who downloaded.

I am using vb 3.6.8,

can anyone help me please??
Same here and I am sure I did all the edits correctly including the vbulletin_global.js. Any ideas?
Reply With Quote
  #85  
Old 11-02-2007, 10:28 AM
haytham's Avatar
haytham haytham is offline
 
Join Date: Jan 2003
Location: USA-Egypt-UAE
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My bad. I was working on 2 forums and got mixed up. Working fine. Installed.
Reply With Quote
  #86  
Old 11-25-2007, 05:19 PM
Cybershaolin Cybershaolin is offline
 
Join Date: Nov 2006
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does not work with Firefox. I get this link: http://www.myforum.com/forum/showthread.php?t=7714#

But when I click on it nothing happens. It just brings the page to the top. All my edits are OK. Hack was working with 3.6.7. Yes the js file was re-edited as well after upgrading to 3.6.8.

Using Firefox 2.0.0.9. Working fine with IE 7. Any way to make it work with Firefox?
Reply With Quote
  #87  
Old 11-26-2007, 07:33 PM
haytham's Avatar
haytham haytham is offline
 
Join Date: Jan 2003
Location: USA-Egypt-UAE
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cybershaolin View Post
Does not work with Firefox. I get this link: http://www.myforum.com/forum/showthread.php?t=7714#

But when I click on it nothing happens. It just brings the page to the top. All my edits are OK. Hack was working with 3.6.7. Yes the js file was re-edited as well after upgrading to 3.6.8.

Using Firefox 2.0.0.9. Working fine with IE 7. Any way to make it work with Firefox?
Had this issue but found it connected to java. Try to disable the java and see.
Reply With Quote
  #88  
Old 01-17-2008, 09:47 PM
FCS-Webmaster FCS-Webmaster is offline
 
Join Date: Aug 2007
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and works like a charm on vb 3.6.8.
Reply With Quote
  #89  
Old 02-19-2008, 02:40 PM
exportforce exportforce is offline
 
Join Date: Jun 2007
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I change it so that only Admin can see the new link ?

edit:
Okay, found out.
Please add this to the manual as optional step:

PHP Code:
<if condition="$attachment['counter'] > 0"><if condition="is_member_of($bbuserinfo, 6, 7, 9)"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if></if> 
instead of

PHP Code:
<if condition="$attachment['counter'] > 0"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if> 
Just instead of
Quote:
6, 7, 9
the Number of the Usergroups you want to use.
You can also use less or more groups, not restricted
Reply With Quote
  #90  
Old 02-25-2008, 08:30 PM
MarahibSat MarahibSat is offline
 
Join Date: Sep 2007
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by exportforce View Post
PHP Code:
<if condition="$attachment['counter'] > 0"><if condition="is_member_of($bbuserinfo, 6, 7, 9)"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if></if> 
thx exportforce, I did these changes but still didn't work for me here is what I have in my whodownloaded templates, who can show me where to put exportforce codes so can be limited to some usergroups, thx in advance

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
	$headinclude
	<title>$vbphrase[psiwd_who_downloaded] - $vboptions[bbtitle]</title>
</head>
<body onload="self.focus()" style="margin:0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
	<td class="tcat" colspan="2">
		$vbphrase[psiwd_who_downloaded]
		<div class="smallfont"><phrase 1="$totaldownloaded" 2="$attachmentinfo[counter]">$vbphrase[psiwd_total_downloaded_x_y]</phrase></div>
	</td>
</tr>
<tr>
	<td class="thead" width="100%">$vbphrase[username] ($vbphrase[psiwd_download_count])</td>
</tr>
$downloaders
<tr>
	<td class="tfoot" colspan="2" align="center"><div class="smallfont">
	<a href="#" onclick="opener.location=('attachment.php?$session[sessionurl]attachmentid=$attachmentinfo[attachmentid]'); self.close();"><strong>$vbphrase[psiwd_show_attachment_and_close_window]</strong></a>
<if condition="$attachment['counter'] > 0"><if condition="is_member_of($bbuserinfo, 5, 6, 14, 20, 21)"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if></if>  
	</div></td>
</tr>
</table>

</body>
</html>
Reply With Quote
  #91  
Old 02-29-2008, 02:24 PM
exportforce exportforce is offline
 
Join Date: Jun 2007
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I wrote, instead of inserting:
Code:
<if condition="$attachment['counter'] > 0"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if>
(Thats what you would normally add)

you take THIS:
Code:
<if condition="$attachment['counter'] > 0"><if condition="is_member_of($bbuserinfo, 6, 7, 9)"> - <a href="#" onclick="whodownloaded($attachment[attachmentid]); return false;">$vbphrase[psiwd_who_downloaded]</a></if></if>
And instead of 6, 7, 9 put your usergroup ID's into the code
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 05:27 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.05760 seconds
  • Memory Usage 2,336KB
  • 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
  • (6)bbcode_code
  • (3)bbcode_php
  • (4)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
  • (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