vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=127041

Attachment countdown timer (like yousendit)
by ericgtr
19 Sep 2006 18:00

4 Attachment(s)
Show your attachments for guests (or any usergroup you like) in a javascript window with a niftly little progress bar, sort of like yousendit or rapidshare. You can also place ads in this window, it's perfect if you have a board with many attachments.

Preview it here as guests see them http://www.guitarblast.com/showthread.php?t=805 (registered users see attachments normally)

This is currently in beta until I can resolve the following issue
It will not show more than one attachment per thread, I am currently working on this and will update when I get it resolved.


NOTE: THIS WILL ONLY WORK WITH 3.6.0 FINAL AND WILL FAIL IN ALL EARLIER VERSIONS, BOTH RC'S AND BETAS!
^ Don't mean to yell but this is very important :)


Update: (Version 2.0) Due to reported bugs this needed a complete rewrite. To upgrade, re-import the product-attachment_window.xml and select overwrite. Then replace the postbit_attachment template.

vBseo fix, thanks hornstar1337 and the vbseo team for helping out with this.

Modified the display in the thread to appear just as it does for registered users, also applied this to the popup window.

To upgrade to this version, run the installer again and select overwrite. Then replace the postbit_attachment template.

vBseo Fix. The problem was with the google analytics code. There was 2 ways to fix this, either disable the google analytics code, or replace this code from within postbit_attachment

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and to ensure the vbseo config file is set to 1 (allow) for rel novbseo

Install time: 2 minutes

Product installer
4 New files
5 New templates (added by plugin)
1 Template edit

Upload showfile.php and showfile_redirect to your /forumroot and upload class_showfile.php and class_showfile_redirect.php to forumroot/includes/

Import product-attachment_window.xml by going to Plugins & Products > Manage Products [Add/Import Product]

Template edit

In postbit_attachment

replace all with this: (note that you can add any additional groups to the "$bbuserinfo['usergroupid'], array" that you want this to show up for)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In template SHOWTHREAD_FILE and showfile_redirect find this and change it to your site, or remove if you don't want to suggest that they register

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Tweak to your setup:

In template SHOWTHREAD_FILE and showfile_redirect find this and place your ads there (there are two instances)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To change the size of the popup window, in template postbit_attachment find this and change to your liking:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To change the countdown time, look in the showfile_redirect template for:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As always, enjoy and please click the install button if you use it :)

nix 19 Sep 2006 19:08

very nice. Thanks!

FleaBag 19 Sep 2006 19:22

Yes it's cool, thanks for the contribution.

soletrader 19 Sep 2006 21:44

I run 3.6.0 but can not get the attachment popop window to show up. Any suggestions? Thank you

ericgtr 19 Sep 2006 21:46

It looks like your URL's are rewritten, you have an SEO mod installed?

Wait, I just tested and it does work with vrewrite at least. Are you sure you've uploaded all the files and ran the product install?

soletrader 19 Sep 2006 21:48

yea i run vbseo. Anyway to get this fixed? I think this hack is great.

ericgtr 19 Sep 2006 21:52

I looked at your site and the attachment won't launch the window. Double check that you've completely overwritten the contents of the postbit_attachment template as per the instructions.

soletrader 19 Sep 2006 22:59

I disabled it at the moment. I did completly overwrite the postbit_attachment template but could not get it to work. Perhaps it has something to do with the fact I am running vbseo?

ericgtr 20 Sep 2006 00:51

I could be, I don't have that mod but if they have a section where you can exclude files from being rewritten you can add showfile.php and upload class_showfile.php and see if that works.

VietPirates 20 Sep 2006 01:50

Nice hack, ericgtr!

Suggestion: registered users see attachments with ads ;)

ericgtr 20 Sep 2006 02:23

Quote:

Originally Posted by VietPirates
Nice hack, ericgtr!

Suggestion: registered users see attachments with ads ;)

Thanks!

It's easy to add registered users (or any other group you like) just add the usergroup to this array in the postbit_attachment. So it would look like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I'll update the instructions with this :)

Hornstar 20 Sep 2006 02:39

This is really good, ill make it so this will happen to registered members, so it creates another incentive for premium members on my site.

however im hopping that something like this can be included in DownloadsII maybe if you get time you could take a look and work something out for us over there.

Thanks for this great release.

edit:

Request
Just wondering if you could do this but without the popup? Because im thinking pop up blockers are becomming more and more common and this may make it hard for some members to understand why they cant download it, then they will spam and say why they cant download it. But if that request cant work, then maybe some instructions next to the link like, a popup will open with the download link, iono, just a thought i just had now.

Thanks again.

VietPirates 20 Sep 2006 02:45

Quote:

Originally Posted by ericgtr
Thanks!

It's easy to add registered users (or any other group you like) just add the usergroup to this array in the postbit_attachment.

I meant registered users see attachments with ads, but no countdown timer :knockedout:

Thx, ericgtr!

ericgtr 20 Sep 2006 02:59

Quote:

Originally Posted by hornstar1337
This is really good, ill make it so this will happen to registered members, so it creates another incentive for premium members on my site.

however im hopping that something like this can be included in DownloadsII maybe if you get time you could take a look and work something out for us over there.

Thanks for this great release.

edit:

Request
Just wondering if you could do this but without the popup? Because im thinking pop up blockers are becomming more and more common and this may make it hard for some members to understand why they cant download it, then they will spam and say why they cant download it. But if that request cant work, then maybe some instructions next to the link like, a popup will open with the download link, iono, just a thought i just had now.

Thanks again.

Well, what you can do is find this in postbit_attachment:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with this: (you can see where the wording is if you want to change it)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Hornstar 20 Sep 2006 04:55

Okay thanks, that should help for now, ill see how it goes on the site over the next week, but what do you think is the chance of having the timer standard for certain usergroups? without a popup?


All times are GMT. The time now is 02:29.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.