Page Index Toggle Pages: [1] 2 3 ... 6 Send TopicPrint
Very Hot Topic (More than 25 Replies) [Updated] Attachment Download Counter/List YaBB2 (Read 40083 times)
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
[Updated] Attachment Download Counter/List YaBB2
Jul 19th, 2005 at 7:58am
Print Post  
Hello

Note: This mod require the YaBB 2 Final


Description:

- Displays a simply 'download counter' next to the 'download file'.



- The Administrator or Global Moderator can enable/disabble 'Downloads' link/button on the forum menue and set the 'Download List' default sorting column (Function: Advanced Settings)



- The Administrator or Global Moderator can add 'selected' attachmends to a 'Download List'
- Added attach sorting to the "View attachment log"



- Show Download List/Button on Forum



HOW TO INSTALL
- If you have install version 1.1/1.2/1.3 deinstall version 1.1/1.2/1.3
- Install this mod (1.4) with Boardmod. (Steps: 44)
- Upload Downloads.pl in the Sources folder.
- Upload downloads1.gif, downloads.png into a folder called "Downloads" inside of ModImages

If you update from 1.1/1.2/1.3 go to "Attachment Functions" and click on 'Rebuild Download List'



Credits: original mod (YaBB 1.xx) by 'al'
Download - Button/Icon by 'JetLi'


History:

Version 2.0

- Any changes for YaBB2 Final
- Added extra language mods for german and nederlands

Version 1.4

- Added 'AccessCheck' to display "Topic link" or not
- Fix one Bug

Version 1.3

- Added sort function to Download List
- Added sort function to View attachment log
- Added setting for default sorting column

Version 1.2
- Added Downloadlist
- Fix one bug in the ModifyMessage.pl

Version 1.1
- Testet at YaBB 2 Weekly Build - Juli, 18  2005
- Fixed some bugs in the original YaBB 1.xx version by 'al'

lg XTC


« Last Edit: Oct 1st, 2005 at 7:34am by ..:X.T.C:.. »  

Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Attachment Download Counter
Reply #1 - Jul 19th, 2005 at 8:32am
Print Post  
Hi Xonder
thnx.  Grin You know where you can find me, he?  8) Tongue
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: Attachment Download Counter
Reply #2 - Jul 20th, 2005 at 3:02am
Print Post  
I get 2 errors:
Code
Select All
Step 10 ... failed - ERR(1): Search string could not be found
Step 12 ... failed - ERR(1): Search string could not be found
 


I have YaBB 2 RC 3 Build 071805
  
Back to top
 
IP Logged
 
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
Re: Attachment Download Counter
Reply #3 - Jul 20th, 2005 at 4:14am
Print Post  
Hi

Hmmm don't know why ... is a unmoded File!?

But is realy simply to add step 10 and 12 by hand.

Only seach this Code ...

Code
Select All
					unlink("$uploaddir/$fn"); 



.. an add after this code

Code
Select All
					unlink("$uploaddir/log/$fn.cnt"); 



do that 2x ... the code twice there is present .... (sub RemoveOldAttachments, sub RemoveBigAttachments)

lg XTC

  

Back to top
WWW  
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: Attachment Download Counter
Reply #4 - Jul 20th, 2005 at 5:14am
Print Post  
ok this is what I found:

Code
Select All
				# If the attachment is not too old
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $result $txt{'122'}<br /> ~;
			} else {
				$yymain .= qq~ $fn = $result $txt{'122'} ($txt{'123'})<br /> ~;
				if(-e("$uploaddir/$fn")) {
					unlink("$uploaddir/$fn");
 



Code
Select All
				# If the attachment is not too big
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $size KB<br /> ~;
			} else {
				$yymain .= qq~ $fn = $size KB ($txt{'123'})<br /> ~;
				if(-e("$upload_dir/$fn")) {
					unlink("$upload_dir/$fn");
 


  
Back to top
 
IP Logged
 
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
Re: Attachment Download Counter
Reply #5 - Jul 20th, 2005 at 6:12am
Print Post  
Hi

Yes .... this are the right codes ... but i dont's see a differend to my printed mod-codes (step 10 and step 12)

... have anyone else a problem with install step 10 & step 12?

lg XTC
  

Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Attachment Download Counter
Reply #6 - Jul 20th, 2005 at 7:04am
Print Post  
Hi Xonder
I have not problem with this mod with build 071805.  Wink I get no error.
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: Attachment Download Counter
Reply #7 - Jul 21st, 2005 at 6:10am
Print Post  
ok here is the code in the original and the code in your mod
original
Code
Select All
				# If the attachment is not too old
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $result $txt{'122'}<br /> ~;
			} else {
				$yymain .= qq~ $fn = $result $txt{'122'} ($txt{'123'})<br /> ~;
				if(-e("$uploaddir/$fn")) {
					unlink("$uploaddir/$fn");
 


MOD
Code
Select All
				# If the attachment is not too old
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $result $admin_txt{'122'}<br /> ~;
			} else {
				$yymain .= qq~ $fn = $result $admin_txt{'122'} ($admin_txt{'123'})<br /> ~;
				if(-e("$uploaddir/$fn")) {
					unlink("$uploaddir/$fn");
 


original
Code
Select All
				# If the attachment is not too big
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $size KB<br /> ~;
			} else {
				$yymain .= qq~ $fn = $size KB ($txt{'123'})<br /> ~;
				if(-e("$upload_dir/$fn")) {
					unlink("$upload_dir/$fn");
 


MOD
Code
Select All
				# If the attachment is not too big
				print FILE $attachments[$a];
				$yymain .= qq~ $fn = $size KB<br /> ~;
			} else {
				$yymain .= qq~ $fn = $size KB ($admin_txt{'123'})<br /> ~;
				if(-e("$uploaddir/$fn")) {
					unlink("$uploaddir/$fn");
 



Not sure if I change anything if it will mess things up.
  
Back to top
 
IP Logged
 
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
Re: Attachment Download Counter
Reply #8 - Jul 21st, 2005 at 7:43am
Print Post  
Hello MetalJoe

Quote:
Note: This mod require the YaBB 2 Weekly Build - Juli, 18  2005 ... there some bugfix in the "Admin/Attachments.pl"

.... by code you have posted i see you don't use the build 071805!!

$txt{'122'} + $txt{'123'} is fixed to $admin_txt{'122'} + $admin_txt{'123'}

$upload_dir is fixed to $uploaddir

Also again .... this Mod require build 071805!!  Wink

lg XTC




  

Back to top
WWW  
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: Attachment Download Counter
Reply #9 - Jul 22nd, 2005 at 3:54am
Print Post  
I understand what you are saying but my board says it is:

Version Information
YOUR version: YaBB 2 RC 3
Latest STABLE version: YaBB 1 Gold - SP 1.4
Latest BETA version: YaBB 2 RC 3 Build 071805

There is a new stable version available!
If you would like to download YaBB 1 Gold - SP 1.4, please go to http://www.yabbforum.com/downloads.php.
  
Back to top
 
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: Attachment Download Counter
Reply #10 - Jul 22nd, 2005 at 4:01am
Print Post  
ok I replaced the orginal code with your code. I hope it works and doen't mess anything up. Thanks for the help.
  
Back to top
 
IP Logged
 
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
Re: [Updated] Attachment Download Counter/List YaB
Reply #11 - Jul 24th, 2005 at 5:22am
Print Post  
Hello

I've had to make some "minor" updates to Attachment Download Counter - download from first post.  Wink

lg XTC
  

Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: [Updated] Attachment Download Counter/List YaB
Reply #12 - Jul 24th, 2005 at 6:21am
Print Post  
Hi Xonder
that very nice Update with Downloadlist.  8)
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
MetalJoe
Full Member
***
Offline



Posts: 156
Location: Auburn
Joined: Aug 23rd, 2004
Gender: Male
Re: [Updated] Attachment Download Counter/List YaB
Reply #13 - Jul 24th, 2005 at 7:06am
Print Post  
Finally everything is working and the download list works great
  
Back to top
 
IP Logged
 
..:X.T.C:..
Forum Administrator
*****
Offline


I love YaBB Forum!

Posts: 656
Location: Spittal
Joined: Dec 22nd, 2002
Gender: Male
Re: [Updated] Attachment Download Counter/List YaB
Reply #14 - Jul 24th, 2005 at 7:36am
Print Post  
Hello

MetalJoe wrote on Jul 24th, 2005 at 7:06am:
Finally everything is working and the download list works great



lg XTC Grin
  

Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 6
Send TopicPrint