Topic: Issue Images Error

Hi all,

I have the follow issue for show images:

Forbidden
You don't have permission to access /sites/simoes/gaaf/tmp/img/patternheader.png on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

My htaccess:

#
# Monstra CMS :: php & apache settings 
#
# Set default charset utf-8
AddDefaultCharset UTF-8
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
    php_flag magic_quotes_gpc                 off
    php_flag magic_quotes_sybase              off
    php_flag register_globals                 off
</IfModule>
# Setting rewrite rules.
<IfModule mod_rewrite.c>
    RewriteEngine on
    # Update code bellow for SEO improvements 
    # RewriteCond %{HTTP_HOST} ^www.example.org [NC]
     # RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]
    RewriteBase /mydomain.net/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
    # Update code bellow for SEO improvements 
    # Redirect 301 /home http://example.org/
</IfModule>

I get the issue with images.

Folder structure:

themes/mytheme/
css
img
js

What can be?

2 2014-03-22 02:54:30

Re: Issue Images Error

Issue Resolve!
If I use the default:

    <?php Stylesheet::add('public/assets/css/style.css', 'frontend', 1); ?>
    <?php Stylesheet::add('public/themes/default/css/bootstrap.css', 'frontend', 2); ?>
    <?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'frontend', 3); ?>
    <?php Stylesheet::add('public/assets/css/camera.css', 'frontend', 4); ?>

Not work for load images.

I have added the default style link style for css and js files.

Work fine now.

Anyone can explain how to use the default syntax for css and js of monstra?

Thank you

3 2014-03-22 05:19:01

Re: Issue Images Error

im not really sure wht is ur problem, i dont get ur point, but u can watch this tutorial to understand how to make themes for monstra and take a look at how i connect all styles and images

<?php echo Site::url(); ?>public/themes/mytheme/

example with css style

<link rel="stylesheet" type="text/css" href="<?php echo Site::url(); ?>public/themes/mytheme/css/style.css" media="screen">

tutorial: http://forum.monstra.org/post/2206/#p2206

p\s

You may also need to recursively CHMOD the folder /storage/, /tmp/, /backups/ and /public/
to 755(or 777) if your host doesn't set it implicitly.
Also you may also need to recursively CHMOD the /install.php, /.htaccess and /sitemap.xml
to 755(or 777) if your host doesn't set it implicitly.

(с) Roman Art
So far So good wink

RomanArt's Website

Re: Issue Images Error

Hi roman,

My as: if I use the default code for link CSS by the default of monstra

<?php Stylesheet::add('public/assets/css/style.css', 'frontend', 1); ?>

I get error for load images.

But if I use the default link for css, as your line:

<link rel="stylesheet" type="text/css" href="<?php echo Site::url(); ?>public/themes/mytheme/css/style.css" media="screen">

All my images, etc work fine.

Re: Issue Images Error

In style.css u have to change all images links for example ../img/logo.png to @theme_site_url/img/logo.png

Please read documentation http://monstra.org/documentation/css-variables

(с) Roman Art
So far So good wink

RomanArt's Website