No announcement yet.

CDN for my thumbnails ( what replacement variable needed?)

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] CDN for my thumbnails ( what replacement variable needed?)


    I've gotten abit of out my depth here.

    My CDN works with smilies, avatars, attachments etc but it doesn't work for my thumbnail images.

    This works for attachments -

    Search for Text: src="attachment.php

    Replace: src="

    That works fine, but when I have a thumbnail it doesn't load the CDN URL. What is the variable that I should be using?

    Thumbnails just have Thumb1 or something like that at the end, so I'm surprised its not working for me.


  • #2

    Try to set AdminCP->Usergroups->Usergroup Manager->Unregistered / Not Logged In->Edit permissions->Can See Thumbnails->Yes

    Former vBulletin Support Staff
    Need Help?, Or P.M. Me


    • #3
      Originally posted by AliMadkour View Post
      Hi, Try to set AdminCP->Usergroups->Usergroup Manager->Unregistered / Not Logged In->Edit permissions->Can See Thumbnails->Yes
      Yes I already have this set across all my usergroups (double checked too)

      On closer inspection, some of my thumbnails have my CNAME address -
      And then others don't, they just have -

      I was thinking do certain thumbnails (maybe a certain size) use a different variable?

      I keep clearing my cache wondering how is it just working for certain thumbnails, by right it should either work or simply break the images.
      Thank you for the reply also, its been really bugging me...


      • #4
        Shouldn't be more tricky with thumbnails as those are pulled with a query parameter on the attachment.php. Are you sure the thumbnails are being written to the CDN? What are you using to write them from your server to CDN?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.


        • #5
          I have these 3 variables in place, but the thumbnails are loaded up from the root URL, and when I click on the thumbs the image loads up from the CDN.

          SEARCH: href="attachment.php
          REPLACE: href="

          SEARCH: img src="attachment.php
          REPLACE: img src="

          SEARCH: src="attachment.php
          REPLACE: src="

          Any ideas what could be happening?


          • #6
            My server is under excessive load now because of this. Anyone got any ideas?


            • #7
              Not enough information really. Need to see your actual site. Thumbnails are served with attachment.php. There isn't a special URL just for them..

              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API - Full / Mobile
              Vote for your favorite feature requests and the bugs you want to see fixed.


              • #8
                Hi Wayne,

                I've noticed that attachments that appear with the grey box and "attached thumbnails" written beside it appear fine.
                BUT the attachments that appear without this grey box (or bubble) are not linking to my CDN.

                Is that of any help?

                The site is of a delicate nature so I don't want to post links here to it. Should I submit a ticket about this?



                • #9
                  There is nothing we can really do, vBulletin thumbnails are not intended to be served from a CDN. If your CDN isn't caching them, thats something you need to take up with your provider.

                  I'm slightly confused how or why your thumbnails would be bringing your server to your knees though.


                  • #10
                    The site has gotten crazy amounts of traffic recently and its just for posting photos and videos. From viewing awstats and talking to my host we've realised the attachments are getting hammered. We have gotten litespeed to cope with PHP requests, but my CDN isn't being used efficiently unless its linked to the thumbnail images.

                    I have made some progress - I went into "postbit_attachmentthumbnail" and was able to swap in my CDN url and now I don't need a replacement variable, just this template edit.

                    Problem is I still get the same result - Attachments that are delivered in the grey background "bubble" display with the desired CNAME. But again the attachments that display with no background (just images load up) still just load from my standard URL.

                    If I knew what template controlled them then I'd be sorted!

                    I have hired 2 guys to do .htaccess edits but they had no joy in rewriting for me. I also posted on but unfortunately nobody took the job. I posted on vbseo to get a copy of their free CDN plugin but again no replies... tried webhostingtalk, but no proper answer and also tried another forum I use alot.


                    • #11
                      I have finally solved this myself (Go me)

                      I have posted my problem on -
             forum (this thread, no luck)
             ticket (refused to help me, said it was a modification, nothing to do with vb)
             (no replies)
             paid job (1 reply, but he wanted $500, FTP access and wouldn't screenshare)
                      BHW forum paid job (3 replies, none useful)
                      WebHostingTalk (2 clueless replies, and there is some very clever people on there too)
                      Fiverr (found 2 very helpful guys, did alot of bug testing with me, but no joy)
                      VBSEO forum (I asked for a copy of the free CDN plugin... guess what? No replies.. the plugin doesn't tackle thumbnails anyway, but worth a try)
                      freelancer paid job (2 replies, but they had no idea, even I knew more)

                      This type of situation needs to be documented better. Replacement variables will work with attachments, avatars and so on but when it comes down to thumbnails for attachments they will NOT work. Big image heavy forums like mine really need this (and litespeed), and alot people were shocked to see how CDN integration is not being taken seriously enough by vBulletin. Its nothing you geniuses at vBulletin couldn't easily document for us. Please make a proper article and help us out

                      After wasting weeks of my time searching for this answer it all boiled down to the [ATTACH] tags. I am not a coder, so this was a steep learning curve for me. I wasted most of time editing template pages and looking for code. If anyone posts on this thread "well that was obvious" then all I can say is where were you when I asked a million times?

                      You need to go to includes -->> class_bbcode.php

                      Go into it and find and replace 6 occurrences of {$this->registry->options['bburl']}

                      Replace that with your CDN URL so for example

                      This will make your thumbnails load from CDN, but you will still need to use the replacement variables I mentioned above for your other images.
                      I hope some day somebody who is stressed the hell out, stumbles across this thread and it helps them, it was a total ball ache for me.

                      If you see somebody struggling with vBulletin + CDN please point them to this thread and help them out


                      • #12
                        I had to post a response here to hopefully drive this post up higher in google as it took me weeks to find this post to correct this issue.

                        I did modify your changes a little.

                        I used replacement variables in my forum for "attachment.php to change to " so I just deleted the {$this->registry->options['bburl']} and it worked fine.

                        The only downside I am seeing to changing this setting is vbseo rewrite URL's for attachments do not work.
                        Last edited by control1110; Tue 17 Feb '15, 2:58pm.
                        vb 4.2.0 Patch 2


                        • #13
                          Remember that if you modify the files, you'll need to do that with any upgrade - plus if you want/need official support for any future issues you'll need to revert to the default code
                          Vote for:

                          - *Admin Settable Paid Subscription Reminder Timeframe*
                          *PM - Add ability to reply to originator only*
                          - Add Admin ability to auto-subscribe users to specific channel(s)
                          - "Quick Route" Interface...


                          Related Topics