Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Change "montezuma" path from Upload folder... (http://forum.bytesforall.com/showthread.php?t=19116)

fafa Dec 12, 2012 02:38 PM

Change "montezuma" path from Upload folder...
 
Hi

I see that theme make style.css and javascript.js in a folder named "montezuma" that is in Upload folder that's so good but I have a problem.

for speed up my site I change Upload folder to sub-domain in another host so when I active theme it can't make "montezuma" folder in upload folder so the theme not work :(.
I try to make it menually in both base domain and sub-domain but no thing happened ...:confused:

I think If is the way to change path of "montezuma" to another directory for example " wp-content" or "theme" or in "montezuma in theme " solve my problem .

i connect 2 host by ftp so the theme can't access to upload folder in sub-domain and.

please help me ... i work on this theme for more than 3-5 days on localhost in my PC and now that I want to use it in my real host show this problem...

fafa Dec 13, 2012 12:19 PM

no reply ....:(

jerryc Dec 13, 2012 10:07 PM

can you access your dashboard via a browser?

juggledad Dec 14, 2012 04:00 AM

Quote:

for speed up my site I change Upload folder to sub-domain in another host
How did you do this

fafa Dec 14, 2012 03:42 PM

Quote:

Originally Posted by jerryc (Post 93794)
can you access your dashboard via a browser?

yes. wp-admin.php work but the aperance of site not work because the upload folder is in another host that access via FTP

Quote:

Originally Posted by juggledad (Post 93798)
How did you do this

I want from my host they do it .

jerryc Dec 14, 2012 03:53 PM

Quote:

Originally Posted by fafa (Post 93853)
yes. wp-admin.php work but the aperance of site not work because the upload folder is in another host that access via FTP

Even there, you should be able to test it. It may be some long address like host_name.com/account_name/public_html/foo, but you should still be able to test it somehow.

juggledad Dec 14, 2012 05:38 PM

Without knowing what they did, I have no help for you and even if you could tell me exactly you have strayed from the standard way of doing things and are in uncharted territories for me.
Quote:

Quote:

Originally Posted by juggledad (Post 93798)
How did you do this

I want from my host they do it .

fafa Dec 22, 2012 01:42 PM

Hi

I find how they do it . the process is like this post :

http://hellboundbloggers.com/2010/06...-in-subdomain/

my media sitting is this :

Store uploads in this folder : dl

Full URL path to files : http://dl.MYDOMAIN.com

I don't want show my domain . if you need I send it by private massage .

my Upload folder is in dl folder how can I change it from wp-contant/upload to any other folder like :

http://MYDOMAIN.com
http://MYDOMAIN.com/wp-contant
http://MYDOMAIN.com/plugin

or any other folder except upload folder.

PLease help me ...

lmilesw Dec 22, 2012 02:50 PM

From what I see with WordPress 3.5 you now need to edit wp-config.php to do what you want.

fafa Dec 23, 2012 03:41 AM

Quote:

Originally Posted by lmilesw (Post 94142)
From what I see with WordPress 3.5 you now need to edit wp-config.php to do what you want.

Yes. in wordpress 3.5 they remove it from seting and we shuld do it from wp-config.php .

But because the media in 3.5 not work corectly I use 3.4.2 it's stable .

also I check it in 3.5 but the problem is not versoin of wordpress . the problem is change the path of upload folder of theme.

I think the code is in function.php :

Code:

/* include all functions */
foreach ( glob( get_template_directory() . "/includes/*.php") as $filename) {
    include( $filename );
}


$upload_dir = wp_upload_dir();
/*
 * wp-content/uploads is writable and admin page was called at least once = created static css file exists:
 */
if( is_file( $upload_dir['basedir'] . '/montezuma/style.css' ) ) {
        $bfa_css = '<link rel="stylesheet" type="text/css" media="all" href="' . $upload_dir['baseurl'] . '/montezuma/style.css" />';
/*
 * Fallback: wp-content/uploads not writable or CSS file in wp-uploads not created yet
 * (The Montezuma admin must be visited at least once for this).
 */
} else {
        $bfa_css = '
/*************************************************************************
Default CSS served INLINE because wp-content/uploads is not writable.
This will change once wp-content/uploads is writable
**************************************************************************/
';
        $bfa_css .= implode( '', file( get_template_directory() . "/admin/default-templates/css/grids/resp12-px-m0px.css" ) );
        foreach ( glob( get_template_directory() . "/admin/default-templates/css/*.css") as $filename) {
                $bfa_css .= implode( '', file( $filename ) );
        }
        $bfa_css = str_replace( '%tpldir%', get_template_directory_uri(), $bfa_css );
        $bfa_css = "\n<style type='text/css'>\n" . $bfa_css . "</style>\n";
}

but I can't how should i change it from upload folder to other place.

fafa Dec 31, 2012 03:59 PM

Happy new year :)

anyone answer me ...

Ok .

If it hard to answer . help me about this:

How can I force theme to use default css & js instead of use "wp-content/uploads/montezuma/*"

if it use them my problem is solved.

fafa Jan 1, 2013 08:02 AM

Quote:

Originally Posted by juggledad (Post 93861)
Without knowing what they did, I have no help for you and even if you could tell me exactly you have strayed from the standard way of doing things and are in uncharted territories for me.

Please help me ? I say how thay do it but don't help me.

If it hard to change " Montezuma" from uploads folder how can I force theme use it's default css that are in theme folder ...

Another solution I think may it work is that I define upload folder menially but its need so time.

I really want use this theme because it use java to load so if some one disable their java so can't access to site . its important when we disable copy or right click in site by ava.

fafa Jan 2, 2013 08:24 AM

I findddddddddddddddd:):)

I fined not one solution ....

I fined tow solution ...

1. define new upload folder :p

2. also force theme use it's default css & js :p

Don't forget that you don't help me...

but I like this theme and want to improve it .

there is a small problem in feautuer image that I want to solve it . when I solve it I give to you my source to use theme if you like.

the problem of featured images is that sometime automatically make featured images from image in post whiteout diffine featured images but sometime not work ... and don't load featured images.

and also featured images use deffult upload folder that if use image from other url it not work.

If you know what's the problem or where should I find source of it maybe help me to solve it faster ...

jerryc Jan 2, 2013 09:15 AM

Quote:

Originally Posted by fafa (Post 94428)
I findddddddddddddddd:):)

I fined not one solution ....

I fined two solution ...

Great!

Quote:

there is a small problem in featured image that I want to solve.
There's a patch for the featured image discussed in [thread =18607]this thread[/thread].


All times are GMT -6. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.