The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
oXoXo's VB Amazon S3 Hack Details »» | |||||||||||||||||||||||||
With this Hack you can all Pictures und Downloadable Files, view from your S3 Account.
Step 1. backup your original attachment.php Step 2. replace attachment.php with new hack version Step 3. Configure in attachment.php your defines: define('AWS_KEY', 'your aws key'); define('AWS_SECRET', 'your aws secret key'); define('AWS_Bucket', "your aws bucket"); Step 4. Upload Zend Framework to your Webserver Root Directory Step 5. Synchronize with Tools like "Transmit" your Webserver Folder store_attachment with your AWS Bucket. Sample copy this from Webserver: store_attachment/2/59.attach store_attachment/3/44.attach store_attachment/3/44.thumb ... To your S3 Bucket YourBucket/2/59.attach YourBucket/3/44.attach YourBucket/3/44.thumb Step 6. After Synchronize you can Remove all or only your big Files in your store_attachment Folder. Step 7. Synchronize every day or week or not. The attachment.php download and view your pictures and files from your S3 and when not found on this, download the File from your Webserver. Its Simple. Its Work. Alternative: You can rename my attachment.php to download.php and modifier with Jquery in the headinclude template: <script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/jquery/jquery-1.6.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var strNewString = $('body').html().replace(/\attachment.php/g,'download.php'); $('body').html(strNewString); }); </script> In this Case rename in your new download.php Row 36: #attachment\.php to #download\.php Row 189: 'attachment.php?' to 'download.php?' For more Comfortable Uploads i have create a Java App. With Java App "VBS3Uploader" you can upload many big Files to your S3 Account. The App Save the File Reference in your VB Board Database. After Upload you can with Data Manager select the File in your Article und Posts. The App is designed for Webmaster and her Mods. App Features: -Test your Connections. -Upload Files with 1GB size and more -Debug Windows -Progressbar -Configure your Properties( AWS Keys, Bucket, VB UserID and DB Password) -All relevant Keys and Passwords are encrypt saved Please not forget: Change your Properties after First Start the App. Please Change the Database Connection in the hibernate.cfg.xml. 1. Unpack the jasypt-1.8-dist.zip. 2. Go with terminal to jasypt-1.8/bin Folder. 3. Encrypt your Database Password with call enrypt.bat or encrypt.sh "encrypt.bat input="YOUR-DATABASE-PASSWORD" password=YOUR-ENCRYPTION-PASSWORD algorithm=PBEWithMD5AndDES" 4. Copy the Result in your hibernate.cfg.xml: <property name="hibernate.connection.password">ENC(your result from encrypt)</property> 5. Change the values <property name="hibernate.connection.url">jdbc:mysql://your server url:3306/your databasename</property> <property name="hibernate.connection.username">your databaseuser</property> Run the App: java -jar VBS3Uploader.jar It's a First Version. Please contact me when you find Bugs or for support. oxoxo@gamesattack.me Donation: Please Register on www.gamesattack.me I cant upload more as 3 Files in this post. therefore you must download the following files from my s3 account http://s3.amazonaws.com/amb_images/VBS3Uploader.zip http://s3.amazonaws.com/amb_images/jasypt-1.8-dist.zip http://s3.amazonaws.com/amb_images/Zend.zip Show Your Support
|
Благодарность от: | ||
furnival |
Comments |
#2
|
||||
|
||||
Interest concept. I'm running an S3 for all my static content and having it manage attachments would be very ideal. So if I'm reading this correctly, every time someone uploads an attachment, it automatically gets sent to my S3 server?
|
#3
|
|||
|
|||
no it's not a automatic upload to s3 server. You can synchronize with external tools your attachments every night. Or you select your favorit attachments and copy manuell to your s3 server.
The attachment.php take the attachments first from s3 server and when not found, then take the attachment from your webserver. Best practice, all thumbs leave on your webserver and copy the pictures and attachments to your s3 Server. Next Version, we should built an configurable cron job, which synchronizes the attachements and after synchron job run, should the job remove all these attachments from webserver. The VBS3Uploader Tool upload your new Attachments directly to your s3 server and save the Reference in your VB Database. After Upload you can select the Attachment for your Posts in the VB Software. Alltrough the attachment is not on the webserver. Its only on s3 server. |
#4
|
|||
|
|||
can you make this mod for vb 3.8
please! |
#5
|
|||
|
|||
can not be downloaded ,
http://s3.amazonaws.com/amb_images/VBS3Uploader.zip http://s3.amazonaws.com/amb_images/jasypt-1.8-dist.zip http://s3.amazonaws.com/amb_images/Zend.zip access denied |
#6
|
|||
|
|||
okay, sorry, i have change the access rights for downloads.
|
#7
|
|||
|
|||
The attachment.php form my 4.17 Version and new version 4.18 or 4.19 Version are the same. The Mod is therefore full compatible.
|
#8
|
|||
|
|||
i have an update of attachment.php Version 1.01 2011/12/24
- better Header Cache Handling for Attachmentfiles - you can modifier two 2 lines, when you have problems with Timeout errors of big Files. @ini_set('memory_limit', '800M'); @ini_set('max_execution_time', 0); |
#9
|
|||
|
|||
So this returns the S3 link to attachments.php then attachments.php serves the file from your S3 account which would save space on your web server.
It would be nice to have something return the S3 link when viewing attachments and posting, then upload to S3 when a user tries to attach a new file. Without that your webserver is still using up your traffic/Resources + S3 traffic because its being outputted from attachment.php. |
#10
|
|||
|
|||
Quote:
the idea is good. i think we need some coding to automatically synchronize (cron job) server attachment to S3 and then remove the attachments in the server. it is tedious to use 3rd party apps/tools to manually synchronize at regular basis. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|