Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Remote server image/attachment database hack Details »
Remote server image/attachment database hack
Mod Version: 1.00, by 99Percent (Member) 99Percent is offline
Developer Last Online: Jul 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (0 vote - 0 average) Installs: 2
Released: 02 Jun 2002 Last Update: Never Downloads: 15
Not Supported Is in Beta Stage  

This is my first vBulletin hack. I have tested it only in my own vBulletin implementation. Let me know if it worked for you.

What this hack does:

I created this hack because I plan to use my vBulletin website mainly for storing and searching thousands of images that can be uploaded by many different people. Since images take up a lot of space and bandwidth I thought of a solution whereby vBulletin saves attachments on a remote database and provides links to these attachments or if images are going to be shown in messages that the remote server generates them directly to the end browser.

Another requirement is that the attachments not be available outside vBulletin itself in order to conserve the privacy of them. So what I did is create temporary permissions only provided from within vBulletin itself before requesting the files to be downloaded. These permissions are then immediately deleted by the remote server once the files are delivered. If the files are not delivered within a specified time, the permissions are automatically eliminated.

The benefit of this hack is that you will be able to provide virtually unlimited space for your attachments for almost zero cost.

What you need in order to implement this hack:

You will need a separate server from the one where you are hosting vBulletin with http, php, and mysql services. I tested the hack on MS IIS on a server connected with regular DSL.

You will need a fixed ip address or a domain name of your webserver where the images are stored. If you don't have one you can get dynamic DNS service (I use tzo.com for about $24 a year - works great).

Your vBulletin server must be able to communicate to your remote server mysql database. This is crucial.

Your remote server must be able to communicate with the vBulletin mysql database server, if not it will not be able to update the view/download count (not terribly important).

If you ISP blocks ports you might be able to get around them by using alternate ports for everything. I think the hack should be able to support alternate ports.

Steps to implement the hack:

1. First, of course, do a back up of everything

2. Apply the hacks to your current vBulletin implementation using vbHacker.php. Hacks include about 18 code alterations and 3 template alterations and no database alterations.

3. Edit the changed config.php supplying the necessary information about the remote web server and database server.

4. Upload the edited config.php to the /admin directory of the remote server.

5. Upload riattachment.php below the /admin directory of the remote server. riattachment.php is the program that delivers the attachment to the end browser, it is a heavily modified version of the original attachment.php. attachment.php is no longer used after applying the hack (I think).

6. Create the database and tables of the remote server using the createattachdb.php utility.

7. If you already have attachments stored in your vBulletin database you will need to transfer them to the remote database using the provided transferattach.php utility.

future possible enhancements to this hack:

1. Check the availability of the remote server and if not there gracefully disallow uploading of new attachments and disable viewing/downloading of attachments. I think this is important since usually the remote servers will be connected via consumer internet and will be home computers so connectivity is not going to be very stable to say the least.

2. Have the option of showing thumbnails stored at the main server and then if requested transfer the large size images stored at the remote server.

3. Store the remote database connection info in the setting table so that it can be changed from within the control panel.

4. Make a fully comprehensive install program, possibly adding the required information of the remote server to config.php directly instead of hacking it.

5. Possibly eliminate the need of fixed ip/domain name by having the remote server automatically update its ip address at the vBulletin database server each time it connects to the internet.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
[Linux] loadsock (retrieve server load from remote server) fastforward vBulletin 2.x Full Releases 5 18 Mar 2002 10:55

Comments
  #2  
Old 02 Jun 2002, 01:14
CloakSim CloakSim is offline
 
Join Date: Dec 2001
Wonderful
Reply With Quote
  #3  
Old 02 Jun 2002, 04:27
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Real name: Alan
Re: Remote server image/attachment database hack

Originally posted by 99Percent
If you don't have one you can get dynamic DNS service (I use tzo.com for about $24 a year - works great).
Great hack

But may I ask why you use tzo.com? I mean, there are a lot of free ones out there that give you the same thing, if not more.

Im personaly very happy with DNS2Go (http://www.d2g.com/)
Reply With Quote
  #4  
Old 02 Jun 2002, 06:36
99Percent 99Percent is offline
 
Join Date: May 2002
Hey, if DNS2Go works for you, great. I just mentioned a possible solution.
Reply With Quote
  #5  
Old 02 Jun 2002, 21:43
tchk tchk is offline
 
Join Date: Dec 2001
....so confused...

what vbb version is yours

when my vbb 2.25 install the hack ...

can't find those :


In the admin/functions.php file, replace this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In the mod/moderate.php file, replace this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by tchk; 02 Jun 2002 at 21:49.
Reply With Quote
  #6  
Old 02 Jun 2002, 21:55
99Percent 99Percent is offline
 
Join Date: May 2002
I am using 2.2.6. Let me know if it is too much hassle for you to upgrade to 2.2.6, it shouldn't be terribly difficult for me to build a hack file for 2.2.5 if its only those two hacks that have to be changed.
Reply With Quote
  #7  
Old 03 Jun 2002, 11:16
lordnet's Avatar
lordnet lordnet is offline
 
Join Date: Mar 2002
Real name: Mash
hey

great hack

my best wish...

LORD
Reply With Quote
  #8  
Old 03 Jun 2002, 16:11
tchk tchk is offline
 
Join Date: Dec 2001
Originally posted by 99Percent
I am using 2.2.6. Let me know if it is too much hassle for you to upgrade to 2.2.6, it shouldn't be terribly difficult for me to build a hack file for 2.2.5 if its only those two hacks that have to be changed.
ya....now i can't up to 2.26.......because i use "big 5" ...
but the vbb is very bad for language support,especially for Chinese.

when change the new verson again will need to write the
chinese style again ...

So...i need your help let me use it for 2.25 ....thanks..
Reply With Quote
  #9  
Old 03 Jun 2002, 19:31
99Percent 99Percent is offline
 
Join Date: May 2002
Ok, here is the hack modified for 2.2.5 but I have not tested it in any way. Please let me know if it worked.
Attached Files
File Type: zip vbridbv1-225hack.zip (5.0 KB, 34 views)
Reply With Quote
  #10  
Old 05 Jun 2002, 21:12
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Argh!!

A friend of mine who admins the boards has just written this same hack! We've had the same thing in beta for the past 3 months, at least

We have a secondary server donated by orange.net which we save attachments in. At the moment we have database connections, and attachments are brought through using the same attachment.php file - I did intend on having a remote attachment.php but thats step 2... Just got it up and running tonight, as we've had mySQL problems!

I can't believe it! hehe...
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
Reply With Quote
  #11  
Old 05 Jun 2002, 21:14
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Also, which vB files need coping over onto the remote server as well?
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
Reply With Quote
  #12  
Old 05 Jun 2002, 23:50
99Percent 99Percent is offline
 
Join Date: May 2002
Hello Martz,

I think my hack is better because it delivers the attachments directly from the remote server bypassing the server where vBulletin resides. This way you also save on bandwidth from the main server.

The only vB files that need to be copied to the remote server are config.php (after adding the necessary database connection information), vb_mysql.php and riattachment.php
Reply With Quote
  #13  
Old 06 Jun 2002, 09:43
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
I agree that the remote attachment.php is a good addition - bandwidth isn't our problem yet - database size was. I'd like to use your riattachment.php, might try it out today
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
Reply With Quote
  #14  
Old 09 Jun 2002, 15:50
freakyshiat freakyshiat is offline
 
Join Date: Nov 2001
do you have the non vbhacker version?
Reply With Quote
  #15  
Old 12 Jun 2002, 14:58
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
OMG i requested this one. This is amazing. I have always been looking for somehting liek this. I am going to install this tonight and come back and tell you how good it works. Just to get this straight to what this hack does to see if i am correct. I already have 2 servers on 2 different hosts. So images and attachments go to one servers host and the other holds the actual php files and stuff. Please tell me if this is what this hack does hehe. Thanks so much.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 09:50.

Layout Options | Width: Wide Color: