The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Minimum posts to download attachments.. Details »» | |||||||||||||||||||||||||
This little hack will make it possible for you to require your users to have a minimum number of posts (which you define in the admin control panel) before they can download attachments.
Requested by TranceMaster and a couple of others in this thread: https://vborg.vbsupport.ru/showthrea...threadid=48636 Updated: No more red Xs if the "view images" option is set to "yes". Now if "view images" is set to yes, everyone will be able to see the images in the threads, but not download other file types unless they have enough posts.. But if "view images" is set to no, users who do not have the minimum # of posts will still get the "not enough post" error message (even with images)... Credits: Thanks to Sophocle for his help with this update. If you downloaded the first version clear your browser cache and download the zip file again. Screenshots included in the zip. If you find this hack useful please click install. Show Your Support
|
Comments |
#22
|
||||
|
||||
EvilLS1, The red x is still showing for me on attachments that are set to view. I have Slynderdale's "Show Image attachments" hack installed and it doesn't show the image with that, just the red x. I have "View image attachments" turned of in the Admin CP but with Slynderdale's hack, you can set it to view an attachment or a link. How would I get this to work with that?
|
#23
|
||||
|
||||
Ok, I figured out how to do it by putting it in the postbit_attachmentimage template (using Logician's Dynamic Templates hack). In place of the actual image showing, they will see the contents of the error_attachmoreposts template. How can I pull the $minpostattach amount form the postbit_attachmentimage template? Right now, unless I hard code it, it shows nothing for the number.
|
#24
|
||||
|
||||
Boofo,
Did you reinstall the updated version of the hack in the zip? I added Sophocle's fix aswell as another improvement which is described a couple of posts above this one. Try re-downloading the zip file in the first post & reinstalling the newer version. Let me know if that fixes it (it should). |
#25
|
||||
|
||||
I already installed that before I wrote the last message. The hack for show image attachments is what is messing it up. I like it the way I have it now where is shows the message in place of the image in the post. I just want to be able to have it show the $minpostattach amount in the postbit_attachmentimage without having to hard code it in. If they're not allowed to download attachments, they shouldn't be able to view them either.
|
#26
|
||||
|
||||
If you installed the code from Sophocle's post you will still get red Xs for images with the .jpg extension because he forgot to include $extension!='jpg' in his code. I added it in the zip though.
I'm not sure why the $minpostattach isn't working in that template for ya. I gotta hit the sack right now but I'll check it out when I get up. |
#27
|
||||
|
||||
The code I installed is from your hack. I help off until you changed yours.
You might want to take a look at The Show images hack. It works with the viewimages set to off. Somehow, I need to add something somewhere that will pull out that number, but I don't know where. |
#28
|
||||
|
||||
Quote:
{EDIT} OK, n/m. I know what your saying now.. I'll check out the show images hack. |
#29
|
||||
|
||||
The "Show Images hack" allows you to show an image in the post when the viewimages is turned off in the Admin CP. That way, you can show an image instead of a link on a post by post basis.
Right now, I have it set up to show the error template in place of the image inside the post. I think if they are not allowed to download attachments, they shouldn't be able to view them either. I accomplished this by doing a conditional in the postbit_attachmentimage template itself. What I can't get to show in the template is the number that is set for the $minpostattach variable. I have to hard code whatever number that is inside the template. I think I need to define that variable inside the attachment.php. |
#30
|
||||
|
||||
Boofo,
I just realized that you were talking about a completely different hack. At first when you said "show images hack" I thought you were referring to the post by Sophocle in the first page of this thread. I'm an idiot! lol |
#31
|
||||
|
||||
No, you're not an idiot. I was not explaining myself very well, I guess.
All I really need now is to get the $minpostattach variable ammount to show up in the postbit_attachmentimage template. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|