CDN Support?

Any way to get the banners that members upload to be served from a CDN?

I suppose that involves editing the coding of the software or a plugin.
 

Basti

Administrator
Staff member
Banners are saved as http://yoursite.come/pathtobanner.
Got myself not much experience there, but all you need to do is change the url correct?

If so maybe a simple cron once a day which grabs all member banners who not start with cdn and let cron update the path maybe
 
Banners are saved as http://yoursite.come/pathtobanner.
Got myself not much experience there, but all you need to do is change the url correct?

If so maybe a simple cron once a day which grabs all member banners who not start with cdn and let cron update the path maybe
Yeah we just need to be able to change the URL. We have the CDN and stuff working, we just need the software to know to serve it from the new URL.
 

Basti

Administrator
Staff member
That is quite easy, i post you a cron file which you can use in 30 minutes or so
 

Basti

Administrator
Staff member
Ok here is a plugin. It might need a small adjustment, but we will see.

How it works
This plugin will check daily ( together with list reset ) all nomal and premium banners where the url starts with our list url
- We split the url into 2 segments
1. its your list url, e.g site.com or cdn.site.com
2. its the img path, e.g /images/default_button.png or /banners/user.png
- Now we construct a new url by merging the img path with a previously set cdn url. But only if the first segment ( above #1 ) match your list url
- update the path in db

Install
1) First off make a db backup.
2) open the plugin file new_day.php
PHP:
$CDN_url = 'http://cdn.site.com'; // NO Ending slash
Update the cdn path and make sure no ending slash is there
3) Upload through plugin manager

Now your normal and premium banners would be http://cdn.site.com/images/default_banner.png , http://cdn.site.com/banners/user.png etc
 

Attachments

Ok here is a plugin. It might need a small adjustment, but we will see.

How it works
This plugin will check daily ( together with list reset ) all nomal and premium banners where the url starts with our list url
- We split the url into 2 segments
1. its your list url, e.g site.com or cdn.site.com
2. its the img path, e.g /images/default_button.png or /banners/user.png
- Now we construct a new url by merging the img path with a previously set cdn url. But only if the first segment ( above #1 ) match your list url
- update the path in db

Install
1) First off make a db backup.
2) open the plugin file new_day.php
PHP:
$CDN_url = 'http://cdn.site.com'; // NO Ending slash
Update the cdn path and make sure no ending slash is there
3) Upload through plugin manager

Now your normal and premium banners would be http://cdn.site.com/images/default_banner.png , http://cdn.site.com/banners/user.png etc

I finally got around to doing this.

I don't know if it has worked there, how long does it take for it to take effect?
 
When the list resets after you applied the plugin.

There is one thing I noticed.

When I go to update the plugins, it always tells me this one has an update, and when I click on it only redirects me to the forum homepage unlike the others that all have a thread.
 

Basti

Administrator
Staff member
Ignore it :) not an offical plugin, hence no plugin update check url like others
 
Top