GithubHelp home page GithubHelp logo

sdebacker / typicms Goto Github PK

View Code? Open in Web Editor NEW
475.0 61.0 119.0 24.63 MB

Multilingual CMS built with Laravel 4.2

License: MIT License

PHP 84.05% JavaScript 4.40% CSS 0.01% HTML 0.11% Hack 2.61% Shell 0.02% Blade 7.08% Less 1.73%
cms laravel multilingual

typicms's Introduction

This repository is deprecated, please use the latest TypiCMS.

TypiCMS for Laravel 4.2

Join the chat at https://gitter.im/sdebacker/TypiCMS Build Status Latest Stable Version License Scrutinizer Code Quality SensioLabsInsight

TypiCMS is a multilingual content management system built with Laravel 4.2. Bower and gulp are used for asset management and the user interface is built with Bootstrap 3 with Less.

Table of contents

Features

URLs

This kind of URLs are managed by the CMS:

Modules:

  • /en/events/slug-in-english
  • /fr/evenements/slug-en-francais

Pages:

  • /en/parent-pages-slug-en/subpage-slug-en/page-slug-en
  • /fr/parent-pages-slug-fr/subpage-slug-fr/page-slug-fr

Requirements

  • PHP >= 5.4.0
  • MCrypt PHP Extension
  • Memcached or Redis or APC

Installation

Quick installation

  1. Install Node.js, Bower and gulp

  2. Create an empty MySQL database

  3. Create a new project

    composer create-project sdebacker/typicms mywebsite
    
  4. Enter the newly created folder

    cd mywebsite
    
  5. DB migration and seed, user creation, npm installation, bower installation and directory rights

    php artisan typicms:install
    
  6. Go to http://mywebsite.local/admin and log in.

Manual installation

  1. Create an empty database

  2. Download TypiCMS

    git clone https://github.com/sdebacker/TypiCMS.git mywebsite
    
  3. Enter the newly created folder

    cd mywebsite
    
  4. Install dependencies with Composer

    composer install
    
  5. Set a new encryption key

    php artisan key:generate
    
  6. Change the cache prefix in app/config/cache.php

    php artisan cache:prefix yourCachePrefix
    
  7. Rename .env.example to .env

    mv .env.example .env
    
  8. Fill in your database credentials in .env

  9. Migrate and seed the database

    php artisan migrate --seed
    
  10. Set permissions

    chmod -R 777 app/storage
    chmod -R 777 public/uploads
    
  11. Go to http://mywebsite.local/admin and log in:

Bower & Gulp

In order to work on assets, you need to install Node.js, Bower and gulp, then cd to your website folder and run these commands:

  1. Install bower packages according to bower.json (directory app/assets/components)

    bower install
    
  2. Install gulp packages according to gulpfile.js (directory node_modules)

    npm install
    
  3. Compile admin and public assets

    gulp
    

Configuration

  1. Set available locales and the default locale in app/config/app.php
  2. Cache driver is set to memcached. You can change it to another taggable cache system such as redis in app/config/cache.php

Modules

Pages

Pages are nestable with drag and drop, on drop, URIs are generated and saved in the database. A page has routes for each translation.

Menus

Each menu has nestable entries. One entry can be linked to a module, page, URI or URL. You can get a HTML formated menu with Menus::build('menuname'). An icon can easily be added to a menu item by filling the icon class field.

Projects

Projects have categories, projects URLs follows this pattern: /en/projects/category-slug/project-slug

Categories

Categories have many projects.

Tags

Tags are linked to projects and use the Selectize jQuery plugin. The tags moudle has many to many polymorphic relations so it could easily be linked to other modules.

Events

Events have starting and ending dates.

News

Simple news module with linked files/images galleries.

Contacts

Frontend contact form and admin side records management.

Partners

A partner has a logo, website URL, title and body content.

Files

The files module allows you to upload multiple files. It uses DropzoneJS to upload them. Thumbnails are generated on the fly with Croppa.

Galleries

You can create as many galleries as you want, each gallery has many files. Galleries are linkable to any module item through a polymorphic many to many relation, for now only the news module is properly set up to support galleries.

Users and groups

Sentry 2 is used to manage users, groups and permissions. User registration can be enabled through the settings panel (/admin/settings).

Blocks

Blocks are useful to display custom content in your views. You can get the content of a block with Blocks::build('blockname').

Translations

Translations can be stored in the database through the admin panel (/admin/translations).

You can call DB translation everywhere with Lang::get('db.Key'), trans('db.Key') or @lang('db.Key').

Sitemap

Route sitemap.xml generates a sitemap file in XML format. To add modules to the site map configure app/config/sitemap.php.

Settings

Change website title, and other options trough the settings panel. Settings are saved in the database.

History

History table records changes and 25 latest records are displayed in the back office’s dashboard. Logged actions are created, updated, deleted, set online and set offline. It works for all modules except users and groups.

Facades

Modules that have their own Facade: News, Events, Projects, Places, Partners, Galleries, Blocks, Files and Menus.

In your views, you can call for example News::latest(3) to get the three latest news. Check available methods in each module's repository.

Artisan commands

Commands are located in app/TypiCMS/Commands

  • Initialisation of TypiCMS

    php artisan typicms:install
    
  • Set cache key prefix in app/config/cache.php

    php artisan cache:prefix yourCachePrefix
    
  • Initial migration and seed

    php artisan typicms:database
    

Roadmap

  • Improve user interface
  • Implement modules as packages
  • Build more tests

Contributing

Feel free to fork and make pull requests directly on the master branch! TypiCMS follows the PSR-2 standard.

Thanks to elvendor and jekjek for their contributions!

Testing

Some admin controllers are actually tested, more tests needed.

License

TypiCMS is an open-source software licensed under the MIT license.

typicms's People

Contributors

dam1r89 avatar elvendor avatar gitter-badger avatar jekjek avatar scrutinizer-auto-fixer avatar sdebacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typicms's Issues

FatalErrorException when delete partner

Hello,
I'm getting FatalErrorException in file TypiCMS/Repositories/RepositoriesAbstract.php with message "Call to a member function each() on a non-object" when I try to remove created Partner.

Upgrade to Laravel 4.2.*

There are many improvements in version 4.2.1 of Laravel framework, but current version of TypiCMS doesn't work with it, many of vendors didn't upgraded to 4.2 yet. We have to wait I guess.
BTW, this issue also needs to be in 2.0 milestone.

Issue with the select picture

When I try to insert a picture to the TinyMCE I get the uploader page.
Sorry, I don't have enough skills yet to point out how to fix the problem.

Possible bug: same slug, different categories

In Projects Module I get project by its category & slug, but if I change the category to the another existing one, I get the same project.
Example:
http://typicms/en/projects/logos/apple_com & http://typicms/en/projects/companies/apple_com are the same project.

How to add own route

Hello! I want to add my route without any controller or module, just want run a Closure in route, for example '/currency/usd'. As I can see in code, every request that is not 'admin' processed by Pages module, and even when add my route to app/routes.php file, my request ends up with 404, because I don't have page with that route name.

Any ideas how to deal with that? Thanks in advance

Artisan install command

Build artisan command to

  • chmod app/storage and public/uploads;
  • migrate DB;
  • change cache prefix;
  • generate Encryption Key;
  • npm and Bower install.

Error installing typi

I get this when I run composer install:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Generating optimized class loader
Compiling common classes



  [ErrorException]                       
  Undefined variable: undefinedVariable  



optimize [--force] [--psr]


Script php artisan optimize handling the post-install-cmd event returned with an error



  [RuntimeException]                         
  Error Output:                              


    [ErrorException]                         
    Undefined variable: undefinedVariable    



  optimize [--force] [--psr]                 

AbstractRepository->getAllBy more than one 'where'

I needed more than one condition in getAllBy method and I made changes like this:

public function getAllBy(array $conditions = array(), array $with = array('translations'), $all = false)
{
  $query = $this->make($with);
  if (! $all) {
    // Take only online and translated items
    $query = $query->whereHasOnlineTranslation();
  }
  if(is_array($conditions) && count($conditions))
  {
    foreach($conditions as $key => $value)
    {
      $query->where($key, $value);
    }
  }
  $models = $query->get();
  return $models;
}

And then in any Controller:

$conditions = array(
  'category_id' => $category->id,
  'type' => $type
);
$data = $this->repository->getAllBy($conditions, $relatedModels, false);

What do you think about this?

Suggestions: use reverse migrations & seeding

What do you think about reversing database structures back to migrations and make repopulate seed files whenever you added something to the website?

Please, look at these package, you'll understand what I mean:

https://github.com/XCMer/larry-four-generator
https://github.com/orangehill/iseed

You can add new functionality to Settings module right near DB Dump and Clear Cache.

Also it would be great to store db backups by dates and restore from web interface.
And last suggestion is running db backups with cron, by adding https://github.com/indatus/dispatcher.

No Database selected

Hi, when i try to install TypiCms and i run this command php artisan migrate --seed it says that theres is not database selected.
I must mention that i placed my database login info into the .env.local.php file.

Regards,
Alex

icon

Bonjour,
How to show a logo in the map...intested of normal google icon....
Thinks

Ignore public/vendor directory

I think there is no need to keep public/vendor directory at all. I agree that is good for fast start, but at last, anyway we sholud to do bower update and gulp.

Improved tags module for v2

There are many reasons to make translations table for tags with separated slugs especially for multilingual oriented CMS like Typi. Also now tags don't have backend functionality for creating and editing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.