The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Looking for force attachment
Hi,
I'm looking for like in forum 2,3,4,5 if members need to create a thread they must have 1 attachment for some special file like .torrent? Is that possible in vb4? |
#2
|
||||
|
||||
Maybe something like this using hook attachdata_presave
PHP Code:
|
#3
|
|||
|
|||
i mean it must check if there is .torrent file then it must submit other it must give a error message like please add your .torrent file
Other files must be allowed also but the .torrent must be attachted |
#4
|
||||
|
||||
Isn't that what the code above does?
|
#5
|
|||
|
|||
^ no that allowed only 'torrent', 'zip','TORRENT', 'ZIP'
I need a mod that allowed everyfile but there must be 1 .torrent file also other it must give error message So it must just check if == .torrent is true then no error. if its =- then it must come a error Sample: 1.jpg = error Sample 2: 2.jpg + sd.torrent = good (because there is a .torrent file) |
#6
|
||||
|
||||
the code i gave cn be expanded very easily, have a go at making it do what you need, use the AND operator to check if the upload is an $allowed file AND has a torrent file, you will not be able to check if the zip contains the torrent though.
|
#7
|
|||
|
|||
^ i have add the script inside plugin manager its not working.
what i can see in this plugin is that only zip and torrent file is allowed!. but i want everyfile must allowed just .torrent file required. without a torrent file they must get error message. but they are also allowed to upload other files like jpg, zip etc. |
#8
|
||||
|
||||
For more files just add to the list following what i've done, you need to COUNT the number of attachments and you need to make sure that there is at least a count of 1 for a torrent file before allowing the upload.
|
#9
|
|||
|
|||
^ how can i do it??
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|