MyBB Community Forums

Full Version: how to move the images directory, JS, CSS into a subdomain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
maybe someone can help me in this matter.
What if I want to move all the existing images directory in my MyBB?
for example:
logo image directory is in www.domain.com/images/logo.png
Another example www.domain.com/images/english/newthread.gif
and so forth until the image is in the directory "images" I want to move to the sub domain sub domain example I use a CDN, for example http://cdn.domain.com/images/*all-images*


code to call the images in the templates is [[''imagedir'']]

My question is how step by step to move the directory images automatically without changing the "templates" I MyBB.

than to move the images directory
I also want to move the directory JS/jQuery and CSS
thanks in advance Big Grin
You would need to change templates in order to do this, for CSS and JS you would edit the headerinclude template. For images you would need to edit a lot more.
I think for the CSS and JS is not too difficult to edit.
but if you call the images in the "templates" will be a burden for me to do.

if you can make a command in SQL or PHP to call images without editing the "templates"?

I aim to move the images directory, JS, CSS to subdomian is to access our forum is much faster.

such as "Facebook" and "Twitter", if a user upload an image then the location of the images directory is not in the main domain, but it is a subdomain or other domain. Big Grin
sad no good response Sleepy
example
storage of images for facebook is here
https://fbstatic-a.akamaihd.net
https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/a_hLyKHfiWw.png

while the images are not stored on the main site facebook, but in a subdomain or another domain faceboook
eg in the domain to another, I take the example of the image profile pages in MyBB
like this
https://fbcdn-sphotos-f-a.akamaihd.net
https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-ash3/548436_10150597635601389_908294590_n.jpg

I want to move all the images that are in the directory/images/*all files* into sub-domains
for example
cdn.domain.com/images/*all files*
eg for javascript
cdn.domain.com/jscript/*all files*
etc.
how quick way to call the pictures that I have moved into the subdomain
may use a method with editing PHP or MySQL command or any other way?
is there anything that can help me
Not Solved Sad
Not Solved Sad
Hi SunDi3yansyah,
you can set some paths in ACP > Configuration:
1. Server and Optimization Options > Uploads Path => "./uploads"
2. User Registration and Profile Options > Avatar Upload Path => "./uploads/avatars"

and in ACP > Templates & Style > <your theme>:
3. Image Directory => "images/learn"
4. Board Logo => "images/learn/logo.png"

All uploads (1.) are in a single directory, there could be a performance problem if your users make many uploads (e.g. > 20.000 files, it depends on OS...)
(2013-05-29, 11:03 AM)thebobo1 Wrote: [ -> ]Hi SunDi3yansyah,
you can set some paths in ACP > Configuration:
1. Server and Optimization Options > Uploads Path => "./uploads"
2. User Registration and Profile Options > Avatar Upload Path => "./uploads/avatars"

and in ACP > Templates & Style > <your theme>:
3. Image Directory => "images/learn"
4. Board Logo => "images/learn/logo.png"

All uploads (1.) are in a single directory, there could be a performance problem if your users make many uploads (e.g. > 20.000 files, it depends on OS...)

okay
but how to CSS and javascript Huh
It seems moving javascript to subdomain can also parallelize downloading (ref. yahoo http://developer.yahoo.com/performance/r...#js_bottom ).

I'm not sure if using rewrite rules in .htaccess is a good way (moving \forum\jscript\ to subdomain, without making changes to php files in original domain...).
Pages: 1 2 3