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)

Direct Vision 10-25-2007 11:30 AM

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?

Direct Vision 10-25-2007 12:15 PM

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??

haytham 11-02-2007 10:15 AM

Quote:

Originally Posted by Direct Vision (Post 1368145)
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?

haytham 11-02-2007 10:28 AM

My bad. I was working on 2 forums and got mixed up. Working fine. Installed.

Cybershaolin 11-25-2007 05:19 PM

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?

haytham 11-26-2007 07:33 PM

Quote:

Originally Posted by Cybershaolin (Post 1389244)
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.

FCS-Webmaster 01-17-2008 09:47 PM

Installed and works like a charm on vb 3.6.8.

exportforce 02-19-2008 02:40 PM

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 :)

MarahibSat 02-25-2008 08:30 PM

Quote:

Originally Posted by exportforce (Post 1446659)
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>


exportforce 02-29-2008 02:24 PM

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 :)

rudi 03-13-2008 09:37 AM

Hmm, installed it all correctly on 3.6.8 but it's not showing who downloaded it..

J98680Bxxxxx 04-09-2008 11:04 AM

Installed and working fine on vB 3.7 RC2 :up:

Actually, in vB UserCP there is a link "Attachments" which lists all attachments uploaded by a user.

Any idea how we could extend this mods in order to display the list of attachments downloaded by a given user in his/her UserCP?

Thanks in advance for any hint. I have been looking at the source code for the file misc.php, but cannot figure out how to proceed. :(

somasimple 06-18-2008 04:06 AM

Hi all,
I was unable to find the code below in global.js
PHP Code:

/**
* 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,
        
230300
    
);



J98680Bxxxxx 06-18-2008 04:49 AM

Quote:

Originally Posted by somasimple (Post 1552274)
Hi all,
I was unable to find the code below in global.js
...

You may want to checkout this mod instead.
:up:

somasimple 06-18-2008 06:18 AM

I need a hack that functions with 3.7.1 PL1

yahoooh 08-04-2008 07:20 AM

any one can confirm if it is working with vb 3.7

Makc666 08-11-2008 05:49 AM

Quote:

Originally Posted by yahoooh (Post 1591001)
any one can confirm if it is working with vb 3.7

Yes, it works.

sateurope 09-08-2008 06:00 AM

No longer working with last update.

Global JS is altered and needed text to find is no longer there:confused:

haytham 09-23-2008 10:06 AM

Well...any fixes?

perfphysio 10-15-2008 06:06 PM

is there an upgrade for 3.7.3. It seems the ./clientscript/vbulletin_global.js is now somewhat different.

somasimple 10-16-2008 03:49 AM

This one works with 3.7.3 (tested)
https://vborg.vbsupport.ru/showthread.php?t=93167

perfphysio 10-16-2008 06:43 AM

Many thanks Bernard :)

AnotherJacob 02-18-2009 06:48 PM

is this working for v3.8.1 ?

Fraxter 03-22-2009 01:20 PM

Quote:

Originally Posted by AnotherJacob (Post 1748308)
is this working for v3.8.1 ?

Yes it works.

@PV: An option which enables the exact download time would be very usefull. :)

Hornstar 04-15-2009 02:16 AM

I don't think this one is optimized for 3.8.x anymore. Is anyone interested in taking over this if the coder has stopped supporting it?

Fraxter 06-27-2009 03:59 PM

Thanks a lot for this great update. :) :up:

Allan 07-20-2010 05:41 PM

No upgrade for vB4 ?

danem 07-04-2011 01:06 PM

Почему в настройках групп пользователей что бы включить этот модуль, его надо выключить?


All times are GMT. The time now is 01:34 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.01248 seconds
  • Memory Usage 1,834KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_php_printable
  • (7)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
  • (28)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