Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
oXoXo's VB Amazon S3 Hack Details »»
oXoXo's VB Amazon S3 Hack
Version: 1.00, by oxoxo oxoxo is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.1.7 Rating:
Released: 12-20-2011 Last Update: 12-23-2011 Installs: 3
Is in Beta Stage  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
furnival

Comments
  #12  
Old 06-21-2013, 01:00 PM
furnival furnival is offline
 
Join Date: Mar 2008
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks very good, it might be just what I need.

Quote:
Originally Posted by pelican View Post
i think we need some coding to automatically synchronize (cron job) server attachment to S3 and then remove the attachments in the server.
These look like good 3rd party (open source) tools for synchronising to S3 through a cron job and I believe one of them can delete files from your server: http://s3tools.org/s3cmd and http://s3tools.org/s3cmd-sync
Reply With Quote
  #13  
Old 08-21-2013, 03:11 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone still happen to have the Zend.zip handy? I'd like to try this on vB4.2
Reply With Quote
  #14  
Old 08-21-2013, 03:20 PM
hoangserip's Avatar
hoangserip hoangserip is offline
 
Join Date: Jun 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What a great idea! Thank you for making this.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05673 seconds
  • Memory Usage 2,233KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (1)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete