Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some in-depth knowledge of CSS is required.

Step 1: Confirm that rewrite rules are enabled

Expand
titleUsing a Custom CSS File

Step 1: Confirm that rewrite rules are enabled

When FileCloud is installed or upgraded, this step should be already done for you. But admins should ensure that the following rules are enabled in their htaccess file.

Code Block
titleTypical location of a htaccess file
On Windows: C:\xampp\htdocs\.htaccess
On Linux: /var/www/.htaccess

Depending on the Apache version that you are running,ensure the appropriate lines are present in your htaccess file.

(lightbulb) The order of rules is important

Panel
titleRewrite rules for Apache 2.2

RewriteEngine On
RewriteRule ^upload/?$ core/index.php?op=upload&%{QUERY_STRING} [L]
RewriteRule ^getaudio/?$ core/index.php?op=geta1dio&%{QUERY_STRING} [L]
RewriteRule ^getvideo/?$ core/index.php?op=getv1dio&%{QUERY_STRING} [L]
RewriteRule ^download/?$ core/index.php?op=downloadfile&%{QUERY_STRING} [L]
RewriteRule ^storage/index.php?$ storage/index.php?%{QUERY_STRING} [L]
# componant inside filecloud server
RewriteRule ^serverbackup/index.php?$ app/serverbackup/index.php?%{QUERY_STRING} [L]
# standalone backup server
RewriteRule ^backupclient$ resources/backupserver/index.php [L]

#Use this rule for customization for Apache 2.2
RewriteRule ^custom/css/(.*)$ resources/customization/css/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ core/index.php?op=$1&%{QUERY_STRING} [L]


Panel
titleRewrite rules for Apache 2.3+

RewriteEngine On
RewriteRule ^upload/?$ core/index.php?op=upload&%{QUERY_STRING} [L]
RewriteRule ^getaudio/?$ core/index.php?op=geta1dio&%{QUERY_STRING} [L]
RewriteRule ^getvideo/?$ core/index.php?op=getv1dio&%{QUERY_STRING} [L]
RewriteRule ^download/?$ core/index.php?op=downloadfile&%{QUERY_STRING} [L]
RewriteRule ^storage/index.php?$ storage/index.php?%{QUERY_STRING} [L]
# componant inside filecloud server
RewriteRule ^serverbackup/index.php?$ app/serverbackup/index.php?%{QUERY_STRING} [L]
# standalone backup server
RewriteRule ^backupclient$ resources/backupserver/index.php [L]

#Use this rule for customization for Apache 2.3+
RewriteRule ^custom/css/(.*)$ resources/customization/css/$1 [END]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ core/index.php?op=$1&%{QUERY_STRING} [L]



Step 2: Configure the Custom CSS Path

In the Admin Dashboard, navigate to Customization tab and select Advanced tab. Set the relative path to custom CSS file.
Image Added

For example, set the Custom CSS Path entry to be theme1/style.css, if the CSS file is created under <WEB_ROOT>/resources/customization/css/theme1/style.css.

Note
titleImportant Notes
  • Supporting images referred in the CSS file should also be placed under <WEB_ROOT>/resources/customization/css folder, along with the CSS file.
  • The directory CSS isn’t there by default. So the user has to create it.
  • Some Linux systems might need apache user set as owner and group of the css directory (for example RHEL, set apache:apache)
  • Some Linux systems might also need
permission
  • permission for owner of css directory to be set with read/write/execute.

Enter Custom CSS Entries

In the admin UI, navigate to Customization tab and select Advanced tab. Enter additional CSS entries in the field Custom CSS Entries.

Image Added

Note:  Additional CSS entries will be enforced in addition to the file specified in the custom CSS field.

Image Removed

Sample


Code Block
languagecss
titleSample CSS
.navbar {
 background-color: lightyellow;
}

.btn {
    background-color: #808080;
    border: none;
    color: black;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

...