View Full Version : Miscellaneous Hacks - Attachment countdown timer (like yousendit)
ericgtr
09-18-2006, 10:00 PM
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
<a href="javascript:history.go(0)"
to
<a rel="novbseo" href="javascript:history.go(0)"
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)
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 3))">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<tr>
<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif"></td>
<td><a href="javascript:history.go(0)" onClick="MM_openBrWindow('showfile_redirect.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]','','scrollbars=yes,resizable=yes,width=470,heigh t=300')"><strong>$attachment[filename]</strong></a>
($attachment[filesize]<if condition="$show['views']"><if condition="$show['views']"></if>, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
</tr>
<else />
<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]&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>
</if>
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
<div align="center"><a href="http://www.YOURSITE.COM/FORUM/register.php" target="_blank">Registered Users</a> do not have to wait.</div>
Tweak to your setup:
In template SHOWTHREAD_FILE and showfile_redirect find this and place your ads there (there are two instances)
<!-- START AD CODE -->
<!-- END AD CODE -->
To change the size of the popup window, in template postbit_attachment find this and change to your liking:
scrollbars=yes,resizable=yes,width=470,height=300
To change the countdown time, look in the showfile_redirect template for:
var waitTime=10;
and
var blocksize=(barwidth-2)/waitTime/10;
As always, enjoy and please click the install button if you use it :)
FleaBag
09-19-2006, 06:22 PM
Yes it's cool, thanks for the contribution.
soletrader
09-19-2006, 08:44 PM
I run 3.6.0 but can not get the attachment popop window to show up. Any suggestions? Thank you
ericgtr
09-19-2006, 08:46 PM
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
09-19-2006, 08:48 PM
yea i run vbseo. Anyway to get this fixed? I think this hack is great.
ericgtr
09-19-2006, 08:52 PM
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
09-19-2006, 09:59 PM
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
09-19-2006, 11:51 PM
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
09-20-2006, 12:50 AM
Nice hack, ericgtr!
Suggestion: registered users see attachments with ads ;)
ericgtr
09-20-2006, 01:23 AM
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:
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3))">
I'll update the instructions with this :)
Hornstar
09-20-2006, 01:39 AM
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
09-20-2006, 01:45 AM
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
09-20-2006, 01:59 AM
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:
<a href="javascript:history.go(0)" onClick="MM_openBrWindow('showfile.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]','','scrollbars=yes,resizable=yes,width=470,heigh t=300')"><strong>Get File!</strong></a>
And replace it with this: (you can see where the wording is if you want to change it)
<a href="javascript:history.go(0)" onClick="MM_openBrWindow('showfile.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]','','scrollbars=yes,resizable=yes,width=470,heigh t=300')"><strong>Get File!</strong>(requires popups enabled)</a>
Hornstar
09-20-2006, 03:55 AM
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?
Hornstar
09-20-2006, 04:33 AM
edit: installed it, I also have vbseo installed, so I disabled attachment re writing, dont know how to stop rewriting of those 2 other files tho, but ive put in a thread over at vbseo for that part, if it is.
When i click on an attachment it reloads the page instead of popping up the attachment.
do you think that is a problem with vbseo or a something else?
what is the point of this hack? what good does it really do, besides pissing people off?
danielg
09-20-2006, 11:53 AM
What, if I wanted this feature behind a thumbnail image, say a gif file?
Now it works only with non-images, right?
Thanks, very good work.
Daniel
ericgtr
09-20-2006, 01:00 PM
edit: installed it, I also have vbseo installed, so I disabled attachment re writing, dont know how to stop rewriting of those 2 other files tho, but ive put in a thread over at vbseo for that part, if it is.
When i click on an attachment it reloads the page instead of popping up the attachment.
do you think that is a problem with vbseo or a something else?
Someone else has this issue with vbseo also, I don't have it installed or I would try to work it out.
what is the point of this hack? what good does it really do, besides pissing people off?
It is designed only for unregistered users (or any other group you may want to add) and ideally will help promote registrations. It also provides a link with a statement saying "Registered users do not have to wait".
Now it works only with non-images, right?
Correct, as the default system is currently only designed that way. If there is a mod out there (haven't looked) that allows for thumbnails to be displayed but not opened, this could probably be applied to it though.
ericgtr
09-20-2006, 01:03 PM
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?
I'll look into different timer settings for different groups but the popup will have to stay :)
Arda MENDES
09-21-2006, 12:26 PM
It's great.Thanx
Hornstar
09-21-2006, 10:11 PM
Update
It is now working after getting the fix from vbseo. 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
<a href="javascript:history.go(0)"
to
<a rel="novbseo" href="javascript:history.go(0)"
and to ensure the vbseo config file is set to 1 (allow) for rel novbseo
So that takes care of the problems for anyone with vbseo thanks to Oleg Ignatiuk from vbseo for helping me.
---------------------------------------------------------------------------
Request/suggestions
Pictures tell a 1000 words so ill upload the pics i took which should explain what I mean best.
The old view pic is what the attachment window used to look like, I kinda want this to remain the same, so as you can see in the new view, how things have changed because of this hack, I feel it would be best for everyone if we kept this looking the same as before.
In request 1 and 2, they are actually happening in both pics.
The description should be on top instead of below, and I would like to see if the link to download the attachment could be added to the description like how it used to be.
They are probably really small edits, such as adding a <br> or < br/>
(forget which one is the standard now) to make them on seperate lines but i dont want to screw things up so I thought it would be best to leave it to someone more advanced like yourself :)
Thanks for the great hack, hopefully you will get some time to fulfil these requests.
Thanks.
ericgtr
09-22-2006, 02:06 PM
Request complete, see the first post for updated instructions and thanks for the vbseo fix! :)
Hornstar
09-23-2006, 06:54 AM
Okay thanks but there was 2 things you left out,
1. Attachments are still on 1 line. instead of on seperate lines.
2. In the popup window, the name should go before what, eg.
It should be like this:
[Skin.rar 541.5 KB], (483 views) <--- This
Then ---> You have 25 seconds left before this link is active.
Get File
As for one attachment you can understand it, but when you got more then 1 attachment it is confusing.
3. If you can make the name of the attachment linked to the download after 25 seconds as well.
4. There is seems to be another bug, this may be partially part of statement (2.) that i mentioned.
Here is what my window looks like
You have 25 seconds left before this link is active.
Get File (This link here is the only one that will download even tho it says 25 seconds above)
File Type: rar [CELiTE.rar 681.1 KB], (696 views)
You have 25 seconds left before this link is active.
Get File
File Type: rar [Rakion By Pass.rar 454.0 KB], (662 views)
You have 0 seconds left before this link is active.
Get File (This file is not able to be downloaded even tho it says 0 seconds)
File Type: rar [Skin.rar 541.5 KB], (483 views)
also once the 25 seconds is up, can the next attachment start timing down, instead of them having to close the window and then clicking on the next attachement, or even better, when they click get file, it starts timming down, but only 1 file can time down at a time.
If the above could be fixed up it would be really awesome, and then after those are done, I got another suggestion/request but ill wait until you can get these done.
Thanks :)
soletrader
09-23-2006, 11:05 AM
hornstar, how do i change no rel novbseo to 1? Where do I go and what do I fix? thank you
Barakat
09-23-2006, 11:27 AM
As for one attachment you can understand it, but when you got more then 1 attachment it is confusing.
it u have more than one file in the post the download just only works on the below file even if you choose the file in above ....
Hornstar
09-23-2006, 10:30 PM
hornstar, how do i change no rel novbseo to 1? Where do I go and what do I fix? thank you
in your includes file you will find your vbseo config file, open that, then search for novbseo and you will need to make sure that is on 1. For better instructions head over to vbseo.com and you will find the thread that I made and the answer in there.
@ Barakat:
I'm not sure if your confirmming the bug I stated or not, but it is a problem either way. Just check the screeen shots in my post above, and my post below it will explain it as well.
Thanks.
ericgtr
09-23-2006, 11:45 PM
it u have more than one file in the post the download just only works on the below file even if you choose the file in above ....
I will get some time tomorrow to work on this and see if I can get that part working.
Hornstar
09-24-2006, 08:58 AM
Hey ericgtr just trying to work out if you will be able to do some of the requests in my post/s https://vborg.vbsupport.ru/showpost.php?p=1080293&postcount=22 and https://vborg.vbsupport.ru/showpost.php?p=1081275&postcount=24
Thanks.
ericgtr
09-25-2006, 09:14 PM
Updated, please see first post for new instructions and layout. It will now show all the attachments as they should be.
Hornstar
09-27-2006, 04:17 AM
thanks for the update.
Okay the forum view looks good now. however it is not working for me. (probably something simple to fix.)
When I click on the download link, the pop-up window loads the site instead of the download.
I'll go over everything again, but here is a test link http://www.gamerzneeds.net/forums/gunbound-world-champion-bots-hacks-download/22516-gunboundwc-aimbot.html?styleid=1
Only installed on the default skin. need to be reg to download on the site as well.
Thanks.
Hornstar
09-27-2006, 04:21 AM
edit:
worked out that the new files are not in the attachement as stated here
Upload showfile.php and showfile_redirect to your /forumroot and upload class_showfile.php and class_showfile_redirect.php to forumroot/includes/
I also dont have template showfile_redirect so I guess the product is the old one as well.
Can you upload the attachment again.
Thanks.
ericgtr
09-27-2006, 01:09 PM
edit:
worked out that the new files are not in the attachement as stated here
Upload showfile.php and showfile_redirect to your /forumroot and upload class_showfile.php and class_showfile_redirect.php to forumroot/includes/
I also dont have template showfile_redirect so I guess the product is the old one as well.
Can you upload the attachment again.
Thanks.
Ouch, you were right. I have uploaded the proper distribution again, thanks for pointing that out. Try now :)
Barakat
09-27-2006, 07:45 PM
Yes , thanks for fixing it i will check it 2nite ยค
Barakat
09-28-2006, 01:36 AM
i try it but i found that if u have more than one attachment file in ur post
and u want to download the 2nd or the 3rd one it will give u that file but in a name of the 1st file , and look how many messeges do u have all together in the attach window.
You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 0 seconds left before this link is active.
Hornstar
09-28-2006, 04:48 AM
i try it but i found that if u have more than one attachment file in ur post
and u want to download the 2nd or the 3rd one it will give u that file but in a name of the 1st file , and look how many messeges do u have all together in the attach window.
You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 20 seconds left before this link is active.You have 0 seconds left before this link is active.
you beat me to it. the same is happening to me.
I must say that it is looking alot better then last time, but this little bug is still occuring.
and im also getting some other weird things, that you will notice in the screen shot.
Thanks.
Hornstar
10-02-2006, 08:15 PM
bump, just making sure this fantastic add on is not dying.
Shazz
10-02-2006, 08:37 PM
*Installed.
Hornstar
10-09-2006, 09:03 AM
:/ hope your still alive and well :) am I the only one who is having problems still?
EricGTR, I am sorry to go off topic but I have to know where to find this awesome mod that you have on your site.
I don't know what to call it so I took screen shots of it.
I really need something this on my site and would really appreciate it knowing where I can get it.
Thanks in advance
Milez
11-12-2006, 08:51 PM
EricGTR, I am sorry to go off topic but I have to know where to find this awesome mod that you have on your site.
Good god dude, Google contentlink and don't hijack threads. Use a PM instead.
Anyone tested this on vb 3.6.2 or .3 yet?
Shazz
11-12-2006, 09:43 PM
/me confirms
webgroup
01-24-2007, 04:29 AM
Thanks for this hack!!!
I was making 55 to 65 daily with adsense, now im making 85 to 95 daily!!
Just by adding this hack to my site.
One thing, I cant see this on my postbit_attachment template:
scrollbars=yes,resizable=yes,width=470,height=300
ericgtr
01-24-2007, 01:12 PM
Thanks for this hack!!!
I was making 55 to 65 daily with adsense, now im making 85 to 95 daily!!
Just by adding this hack to my site.
One thing, I cant see this on my postbit_attachment template:
scrollbars=yes,resizable=yes,width=470,height=300
It will only apply if what you have in the page exceeds the width :)
webgroup
01-28-2007, 12:44 AM
I found one small glitch:
If there are more than 1 attachments on the post, when you wait for the timer and the time is up, all the atchments lisnk will show, but only 1, the one you clicked will be available.
This is confusing my users, they think that the other files are not availeble or something.
To fix this, only the attachment you clicked must be shown on the popoup window, then you hace to clcik and open a new window for each of the attachments on the post.
Fixing this will make the script perfect.
Thanks!
w1z4rd
01-30-2007, 07:17 PM
This a great mod. Any chance this could have a BBcode like [timer]? That way you can use this great functionality with content besides attachments.
webgroup
02-02-2007, 05:12 AM
I found one small glitch:
If there are more than 1 attachments on the post, when you wait for the timer and the time is up, all the atchments lisnk will show, but only 1, the one you clicked will be available.
This is confusing my users, they think that the other files are not availeble or something.
To fix this, only the attachment you clicked must be shown on the popoup window, then you hace to clcik and open a new window for each of the attachments on the post.
Fixing this will make the script perfect.
Thanks!
Any help?
Lizard306
02-02-2007, 08:25 AM
I found one small glitch:
If there are more than 1 attachments on the post, when you wait for the timer and the time is up, all the atchments lisnk will show, but only 1, the one you clicked will be available.
This is confusing my users, they think that the other files are not availeble or something.
To fix this, only the attachment you clicked must be shown on the popoup window, then you hace to clcik and open a new window for each of the attachments on the post.
Fixing this will make the script perfect.
Thanks!
same problem with at www.chitchatters.net
there is a problem if there are more than one attachments :(
it would great if the above suggestion can be implemented :) otherwise it becomes quite unusable for forums where people attach more than 1 picture.
webgroup
02-03-2007, 04:33 AM
where is eric?
ericgtr
02-07-2007, 07:14 PM
For now I have changed this mod to Beta until I can get this resloved. Thanks for the report guys, I will let you know when it's fixed.
webgroup
02-11-2007, 06:57 AM
Thank you eric!
We are ansiously waiting : )
Smiry Kin's
02-12-2007, 12:53 AM
just a suggestion, could there be a limit some where added,
e.g if they downloaded the attachment, there have to wait X days X hours X minutes before they can download again, saves people downloading when unnessary, and abusing it.
let me know. if possible. :)
webgroup
03-07-2007, 09:45 PM
still waiting for the update.
Shazz
03-07-2007, 09:46 PM
If you have more then 1 attachment per post, its a MAJOR problem :)
webgroup
03-08-2007, 12:40 AM
If you have more then 1 attachment per post, its a MAJOR problem :)
Yep u are right!
I need this to be fixed so bad, I even could throw a few bucks to anyone who can fix this!!
Shazz
03-08-2007, 01:04 AM
Yep u are right!
I need this to be fixed so bad, I even could throw a few bucks to anyone who can fix this!!
Mmm... Same
Don't have hours to spend on it =\
webgroup
03-08-2007, 01:30 AM
any coder needs $30.00?
Shazz
03-08-2007, 01:55 AM
any coder needs $30.00?
Ill add on to that, name it :)
ericgtr
03-08-2007, 01:43 PM
Guys, I need to spend a little time with this and I will get it fixed for you. I will be out for the next week but I will make it a priority when I get back.
Shazz
03-08-2007, 07:28 PM
Guys, I need to spend a little time with this and I will get it fixed for you. I will be out for the next week but I will make it a priority when I get back.
Sounds good eric, thanx :D
board.trash
03-15-2007, 02:23 PM
thank you very much, this hack is very nice and it works great @vb 3.6.5!
is it available to cache the templates in the next version?
If you have more then 1 attachment per post, its a MAJOR problem
is there any update from the coder to fix this? i hope so :)
taydu
03-16-2007, 01:59 AM
it's possible to just show the attachment after the count down instead of the whole post ?
webgroup
03-19-2007, 01:10 AM
Guys, I need to spend a little time with this and I will get it fixed for you. I will be out for the next week but I will make it a priority when I get back.
today is sunday, still waiting for the update :(
Shazz
03-19-2007, 01:43 AM
today is sunday, still waiting for the update :(
* Shazz waits with you
Oh well at least there is something
webgroup
03-21-2007, 08:11 AM
any news?
brihan
03-28-2007, 10:30 PM
Just checking.
I hope that the multiple picture fix is possible.
Shazz
03-28-2007, 11:04 PM
Just checking.
I hope that the multiple picture fix is possible.
No...
webgroup
04-16-2007, 08:00 PM
any news??
webgroup
04-16-2007, 08:04 PM
anybody interesed in $30.00 via paypal for fixing this mod>?
thanks
Shazz
04-16-2007, 08:22 PM
I removed it and decided to go with a vB.org system :D
webgroup
04-16-2007, 09:25 PM
I removed it and decided to go with a vB.org system :D
???
Adam21
05-29-2007, 05:35 PM
Any updates on this?
webgroup
06-29-2007, 08:36 PM
still waiting for a fix
Censtudios
07-03-2007, 05:45 PM
the demo doesnt work. it asks you to login... lol
Please guys , we are really need this hack man ericgtr fix it !!!! we are really need it
webgroup
08-10-2007, 06:35 PM
Im still offering $30 for a fix
Shazz
08-10-2007, 07:17 PM
Im still offering $30 for a fix
Still haven't givin up lol
No replies to your request in service requests forum?
webgroup
08-16-2007, 06:23 PM
2 contacted me but then disappeared
I'm offering $50.00 now
webgroup
08-21-2007, 06:09 PM
nobody?
webgroup
12-06-2007, 08:14 PM
still waiting
yahoooh
08-04-2008, 07:18 AM
any update so it will be work in vb 3.7.2 and for unregistered users only ?
webgroup
08-17-2011, 03:04 AM
is something like this available for 4.1.5?
webgroup
09-16-2011, 03:31 AM
Hello, I am offering $50 for an update for 4.1.5
Please PM me
muyar
06-14-2015, 10:57 AM
Please update for 4.2.2
moded12
05-01-2016, 02:17 PM
any update for this issue
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.