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


All times are GMT. The time now is 10:27 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.01214 seconds
  • Memory Usage 1,778KB
  • 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
  • (3)bbcode_php_printable
  • (4)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