Image in another server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waterwheel
    Senior Member
    • Oct 2004
    • 257
    • 3.6.x

    #16
    Originally posted by Colin F
    It can be done, yes.
    Go on . . .

    Originally posted by Colin F
    I can confirm that it can be done, but I don't know how. I just heard the devs say it can be done.
    These devs. What did they say? I'm looking into hosting my attachments on a separate server, but can't seem to find a thread on just how to do it. Or where you would start in the AdminCP to so something like this.

    ThanksInAdvance,

    WW


    p.s. Would this be one way to do it? - http://www.vbulletin.org/forum/showthread.php?p=1013364#post1013364


    Quote:
    Originally Posted by Stargesicht
    Can you post a step by step way to do this????

    i've just implemented it and here is my way:

    AdminCP => Options => Cookies => Cookie-Domain
    set it to .yourdomain.com - with the two dots!!!

    setup a subdomain called attachment.yourdomain.com
    (in my case this is located on the same server as my master-webserver, so I don't have to deal with the attachment path)

    copy the following files in the root:
    Code:
    attachment.php
    global.php
    newattachment.php
    copy the following files in root\includes:
    Code:
    class_core.php
    class_dm.php
    class_dm_attachment.php
    class_hook.php
    class_image.php
    class_upload.php
    config.php
    functions.php
    functions_editor.php
    functions_file.php
    functions_forumlist.php
    functions_log_error.php
    functions_misc.php
    functions_newpost.php
    init.php
    go to the templates section of your board:
    replace all occurrences of
    Code:
    attachment.php
    with
    Code:

    and

    replace all occurrences of
    Code:
    newattachment.php
    with
    Code:

    last step:
    add a replacement variable to all your styles:
    Code:

    with

    this last step is for the "attach" tag

    delete all your cookies (maybe via filesystem) and test the installation.

    have fun
    Last edited by waterwheel; Wed 15 Aug '07, 10:21am.
    "Oh, so they have internet on computers now!" --Homer.

    Comment

    • Mickie D
      Senior Member
      • Jan 2003
      • 128
      • 4.2.X

      #17
      i can confirm that the above way works

      but there is an issue which i am trying to trouble shoot and the problem is that some members switch over just fine with no issues but some are having login problems and i have told them to clear cookies and they are still having the same problem

      the last part where it says delete all your cookies i presume it is talking about on your own machine because there is no cookies stored on the servers ??

      but it works very well for 90% of my members and you do notice the difference with images and attachments all served away from the php webserver.

      i will keep looking into this and if i can find out why allot of them are having the login problem i will report it back here so it can help others

      Regards
      Mickie D
      Digitalworldz - Satellite and Cable Forum

      Comment

      • Freezerator
        Senior Member
        • May 2002
        • 574
        • 3.6.x

        #18
        With all due respect, but it isn't possible to host attachments on another webserver without to modify the code to vbulletin.

        That it is a wanted feature is beyond discussion
        Dutch vBullletin users social group!

        Comment

        • Mickie D
          Senior Member
          • Jan 2003
          • 128
          • 4.2.X

          #19
          you do not modify any code ???

          you edit templates and if you use the replace feature (carefully) then its very easy to implement in a few minutes

          but becareful if you will use the replace because you will need to find how the attachment.php is found

          ie

          if you replace "attachment.php" with

          "http://attachments.yourdomain.com/attachment.php"

          you will also end up with "newhttp://attachments.yourdomain.com/attachment.php"

          for the newattachment.php parts

          but very easy to install i am just having some issues with the cookies on a few members?
          Digitalworldz - Satellite and Cable Forum

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...