Skip to content

hendrik-weiler/Portal-CMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portal Content Management System 2014

v: 1.00 prerelease

Github Page


Build on [Fuel Framework](https://github.com/fuel/fuel)
Using:
[Nivo-Slider](https://github.com/gilbitron/Nivo-Slider)
[tinymce](https://github.com/tinymce)
[colorbox](https://github.com/jackmoore/colorbox)
[html5boilerplate](https://github.com/h5bp/html5-boilerplate)
[swfobject](https://code.google.com/p/swfobject/)
[pie](https://github.com/lojjic/PIE)
[jquery.hotkeys](http://github.com/jeresig/jquery.hotkeys)
[sutra](https://github.com/Tatsh/sutra)
[spectrum](https://github.com/bgrins/spectrum)

Features:

  • Multilanguage interface
  • Multilanguage site
  • Multi-Navigation ( with every to 1 hirachie down)
  • News
  • Page management
  • Textcontainer ( up to 3 columns )
  • Linking to existing contents ( up to 3 columns )
  • Flash (using jquery.swfobject plugin with picture replacement)
  • Simple contactform
  • Gallery ( slideshow, thumbnail and customizeable)
  • FLV Video Player
  • Content Stacking ( multiple contents in 1 page )
  • Multi-Account
  • Simple Permission System
  • Module management
  • Asset management
  • Customizeable Layout
  • Supersearch
  • Actionarea

Requirements:

PHP > 5.3
mod_rewrite

Backend Tested in:

  • Safari
  • Chrome
  • Opera
  • Firefox
  • IE 9

Install

  1. Download the files
  2. Extract them into your root folder on your webserver
  3. Install throught he install tool (http://domain/admin/install)

if you get message like "install tool disabled" go to "yoursitefolder/fuel/app/" and delete the file : "INSTALL_TOOL_DISABLED"

Follow all three steps and login into (http://domain/admin).
Notice: you might have to create the bare database yourself.

You need to setup a virtual server, if you are working locally:
Windows: http://www.uwamp.com
OSX: [http://www.mamp.info/de/mamp-pro/](Mamp Pro)

If you set the destinated path, make sure your path includes the public folder at the end (/projectname/public).

Snippet for inside of the httpd-vhosts.conf:

<VirtualHost *:80>
    ErrorLog /home/root/portalcms/error.log
    DocumentRoot /home/root/portalcms/public
    <Directory "/home/root/portalcms/public">
            Order allow,deny
            Allow from all
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            # New directive needed in Apache 2.4.3:
            Require all granted
    </Directory>
</VirtualHost>

Actionarea:

In the actionarea you can looking for the task you want to do and either get a shortcut link to the place where it will be done or you get a "learn how" link where you will be guided to what needs to be done.

Supersearch:

With supersearch you can search the entire cms restricted to current siteversion your in after contents, sites, news, accounts and tasks (from the actionarea).

Shortcuts (works almost everywhere):
Shift + r = Supersearch new search
Shift + e = Supersearch category "all" search
Shift + c = Supersearch category "contents" search
Shift + t = Supersearch category "tasks" search
Shift + n = Supersearch category "news" search
Shift + a = Supersearch category "accounts" search
Shift + s = Supersearch category "sites" search

You will see the that the tasks have like special options, for example "show only navigations with with sub entries". You can search in the supersearch textfield like that: =myoption1;myoption2;myoption3

these options exist now:

no_main ( excludes points with sub entries )
main_points ( shows only points with sub entries )

Templating:

Portal got a simple templating system. You can find all templates in "fuel/app/views/public/template".

Within the index.php a folder before you can design your site. There a few generators you need to know if you want to work with it.

//All searchoptimation will be given out
print seo('head'); // meta tags printout
print seo('analytics'); // analytics printout

print navigation(); //Prints out the navigation
print content(); //Prints site contents out
print show_sub_navigation($content) // prints out the content with sidebar (if in navigationpoint set to active)
print content_single($id_or_name,$language); // Render a single content
print content_site($id_or_name,$language); // Render a single site
print get_sub_navigation() // Displays subnavigation
print language_switcher(); //Prints a list of language versions out

//prints out all assets from the include area (public/assets/)
print asset_manager_insert('js'); // bundled javascript in one file
print asset_manager_insert('css'); // bundled css in one file
print asset_manager_get_group('jquery') // jquery package in one file

print layout_image('image.jpg') // display a picture from a layout (img folder from layout)

print asset_manager_get('js->include->modernizr'); // searches in include path after %modernizr% and prints it out
print asset_manager_get('img->admin->logo'); // searches in the img path after the portal logo and prints it out

var_dump(get_public_variables()); // Receive all to public open variables like (current navigation text-color and background, current content count, current language prefix, etc..)

Layouts:

Portal CMS is able to use Layouts/Themes. In 'Advanced settings' in tab 'Layout' you can change the current Layout with another one.

All layouts are located at 'root/layouts'.

Writing CSS:

Portal CMS comes with a light sass,less,stylus-like scripting system.
Notice: The script will be parsed line for line so you cant comment after a variable definition. Everything in the code below is valid. There can be multiple scripts at any place like in php.

New (as of 1.36): You have now the possibility to add a script attribute to everything (example shown below). Inside that script closure you can freely write javascript (in combination with jquery and all other added javascript files from the layout!).
Keywords:
self = The selector you are inside (.footer, body, p)
Notice: Up until now you have to refresh the site twice to get the written javascript affecting the site

Syntax:

/*>
; above is the opening tag
; this is a comment

; making a variable with permanent root folder in it
; will represent similiar to this http://localhost/portalcms/public
$root = "DOCROOT"

; using pie
$pie = "behavior:url(PIEPATH)"

$im_a_variable = "i contain any possible value"
im_also_a_variable = 'i contain another value'
[even_this_is_a_variable] = and im a value

; now creating c++ like structs/objects with properties
obj site
  $bg = "#ccc"
  ; you can nest them
  obj navigation
    $hover = "#cc0005"
  end
end

; this link will serve a image from the layout folder
$background = DOCROOT/server/layout/assets/img/bg.png

; below is the closing tag
<*/

Usage:

body {
  background-color: site.$bg;
}

/* script without selector */
script : {
  /* its like im in a normal javascript file */
}

nav:hover {
  color: site.navigation.$hover;
  script : {
    /* a comment, single line comments wont work */
    self.animate({
      background : 'black'
    },1000);
  }
}

p:after {
  content: "$im_a_variable";
  border-radius: 10px;
  $pie;
}

Using Flash Content notice:

Within the parameters you can give the flash file, there are two keywords avaible:

  • $language[extension] - Current site language with given extension e.g ( de.jpg, en.swf )
  • $sitename[extension] - Current site name with given extension e.g ( home.jpg, products.swf )

Example:

name = Picturebox
picture = $sitename[jpg]

How to use the template-content-type:

After you have created a template.php file located in "root/layouts/yourlayout/custom_templates/custom" you can write down your markup.
Inside this file you can easily print out some predefined variables:

  • @$tpl_text_mytext1 (adds a textfield with wysiwig editor in the backend)
  • @$tpl_rawtext_myrawtext1 (adds a textfield without wysiwig editor in the backend)
  • @$tpl_file_myfile (adds a field for uploading a file in the backend) The last part of these variablenames are variable themself. So you can change it for whatever description.

Example:

<ul>
  <li><?php print @$tpl_rawtext_myrawtext1 ?></li>
  <li><?php print @$tpl_rawtext_myrawtext2 ?></li>
  <li><?php print @$tpl_rawtext_myrawtext3 ?></li>
  <li><?php print @$tpl_rawtext_myrawtext4 ?></li>
  <li><?php print @$tpl_rawtext_myrawtext5 ?></li>
</ul>

Troubleshooting:

Why do i get a redirection error if i want to take a look at my site?

You must create a navigationpoint with a content in it first. Then the first navigation will be displayed as default.

Why do i get an error when im updating?

You have to set the complete folder in mode 777.
(e.g linux: sudo chmod -R 777 foldername)