vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Attachment download counter (https://vborg.vbsupport.ru/showthread.php?t=200229)

Black Tiger 12-30-2008 11:25 PM

Attachment download counter
 
I have looked but not found it yet, but see it on several forums out there.

I would like to have a counter which counts attachments.

The build in does it like this:
Filename (12,3 KB, 120 views)

Ik would like it like this example 1:
Filename (12,3 KB, downloaded 120 times)

or even more beatiful (like I've seen some places) example 2:
Filename (12,3 KB)
This file has been downloaded 120 times.

Ofcourse I could change the "views" to "downloads" in the languages and phrases section, but normal posts al also "viewed" so I'm afraid I will change the wrong "views" phrase.

Furthermore the second example I would like the most.
Can anyone tell me how to do this please?

Black Tiger 01-02-2009 11:53 PM

Anybody?

numberguy 11-05-2010 05:45 PM

Quote:

Originally Posted by Black Tiger (Post 1699871)
Anybody?

+1

I would like to know as well!

LifesGreatestGift 11-26-2010 02:44 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=254241" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=254241</a>

Black Tiger 11-27-2010 09:46 PM

Thank you, but that's for 4.x and I need one for vb 3.8.x.

LifesGreatestGift 11-27-2010 09:55 PM

Post the code to postbit_attachment and ill change it for you.

vbenhancer 11-27-2010 10:42 PM

need my ...

https://vborg.vbsupport.ru/showthread.php?t=230716

Black Tiger 11-29-2010 01:29 PM

@TheWindows7Site: Great, but I would rather like a "look for this and change that" or "look for this and replace that" kind of code, so I can see what I'm doing and save it for future use.
I'm not in a hurry, so I'm already happy if you want to do that for me.
Here is my 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>)</td>
</tr>

I presume I have to change this part somehow:
Code:

($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
</tr>

I only don't know what to replace this by to get the "This file has been downloaded x times".
Thanks!


All times are GMT. The time now is 07:58 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.02543 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete