Giter VIP home page Giter VIP logo

croogo's Introduction

Croogo

Croogo is a free, open source, content management system for PHP, released under MIT License.

It is powered by CakePHP MVC framework.

This repository contains the plugins that made up the core of croogo. Application template repository is https://github.com/croogo/app.

Build Status Scrutinizer Code Quality Code Coverage

Requirements

  • Apache with mod_rewrite OR nginx
  • PHP 7.1 or higher
  • MySQL 5.7 or higher

Installation

Installation using composer

The preferred way to install Croogo is by using composer.

composer create-project croogo/app myapp
cd myapp
composer install
$EDITOR config/app.php # change database access credentials
bin/cake server # then browse to http://localhost:8765 or use vhost

If you want hack on croogo, you can use the --prefer-source flag, ie:

`composer create-project --prefer-source croogo/app myapp`

Web based installer

  • Extract the archive. Upload the content to your server.
  • Create a new MySQL database (charset utf8mb4 with utf8m4_unicode_ci collation)
  • Visit http://your-site.com/ from your browser and follow the instructions.

Manual installation

  • Extract the archive. Upload the content to your server.
  • Locate your config directory, and rename the following files:
    • config/app.default.php to config/app.php, and edit the details.
  • You can access your admin panel at http://your-site.com/admin. The installer should display a page for you to create the administrative user.

Links

croogo's People

Contributors

admad avatar appsbender avatar cdepre-sme avatar ceeram avatar chadrien avatar christopher-m-depre avatar dakota avatar damien-biasotto avatar ecoreng avatar elbakai avatar fahad19 avatar ionas avatar josegonzalez avatar liamkeily avatar marlinc avatar miketallroth avatar mohammadsaleh avatar neeraj-g avatar ozee31 avatar phpmagpie avatar primeminister avatar rchavik avatar real34 avatar sakulstra avatar shama avatar sitedyno avatar vadimushka avatar vitorpacheco avatar wouter0100 avatar yuanchavik 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

croogo's Issues

custom block

Created by Tran Van Dung, 29th Nov 2010. (originally Lighthouse ticket #170):


I use [node:region4 element="region4" conditions="Node.type:node;Node.status:1;Node.terms LIKE:%term-slug%" order="Node.id DESC" limit="4"] to display node in term but but node not contain meta table

Admin dashboard

Created by fahad19, 17th Feb 2010. (originally Lighthouse ticket #27):


  • Currently uses SettingsController::admin_dashboard(), move it to UsersController::admin_dashboard().
  • update ACOs

Dashboard UI needs a change (see #14), should show a list of most common actions performed by admin for better usability.

MySQL Error in installation when db name has full stop or underscore

Created by Joseph, 30th Sep 2011. (originally Lighthouse ticket #209):


I noticed that if you try to install Croogo to a database which is named with either an underscore or a full stop it fails with the following error:


Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '' at line 1 [CORE/cake/libs/model/
datasources/dbo_source.php, line 684]

Query: SHOW FULL COLUMNS FROM

This is then followed by lots more similar errors. This doesn't happen if the database name is all one word without a full stop or underscore, though.

Tools plugin

Created by fahad19, 17th Feb 2010. (originally Lighthouse ticket #26):


Desired features

  • Import/Export site (database)
  • One click upgrade to latest version
  • Enable/Disable caching
  • Clear cache

I have Improved Nodes controller

Created by titanshift, 13th May 2011. (originally Lighthouse ticket #188):


/* To change a type layout for the default theme

type:cars

/app/views/nodes/index_cars.ctp => will work :) !
*/

private function __viewFallback($views) {
if (is_string($views)) {
$views = array($views);
}

    if ($this->theme) {
        foreach ($views AS $view) {
            $viewPath = APP.'views'.DS.'themed'.DS.$this->theme.DS.Inflector::underscore($this->name).DS.$view.$this->ext;
            if (file_exists($viewPath)) {
                return $this->render($view);
            }
        }
    }else{
        foreach ($views AS $view) {
            $viewPath = APP.'views'.DS.Inflector::underscore($this->name).DS.$view.$this->ext;
            if (file_exists($viewPath)) {
                return $this->render($view);
            }
        }

      }
}

Parent child

Created by Manu, 1st Mar 2010. (originally Lighthouse ticket #35):


When you create a node you have the option of saving it as the child of a parent node.
It would be good to be able to save this as the path and use this path as the basis for the breadcrumbs so that there is a parent child node hierarchy reflected in the breadcrumbs. Also to be able to have multiple levels of parent child relationships stored in the path field of the nodes table.
If the path was generated in the same way as the slug using javascript then this would make custom urls even more customizable, allowing the author to edit the path before saving.

example:
path: /parent/child/child-of-child/child-of-child-of child

which can then be easily transformed into breadcrumbs by explodng the $this->params['url']['url']:

example:
Home >> Parent >> Child >> Child-of-child >> Child-of-child-of child

Blocks within blocks

Created by zeen, 6th Jun 2011. (originally Lighthouse ticket #191):


A recent site I made required the left region to be different for each page. Using blocks in the traditional way would have been a pain due to positioning etc..

I used my plugin https://github.com/firecreek/BlockAnywhere to manage this.

First I created "Snippet" blocks and assigned them to region none. These blocks can be used throughout the site.

Then for each page I created "Site" blocks, e.g. "Side Home", "Side Services".

From each of these I added the following code in the body.

[block:snippet-contact]
[block:snippet-location]

BlockAnywhere isn't great, it loads in too much data but it's helped me to achieve this solution.

Main thing is customers can go in and make changes easily.

Active Menu Highlighting

Created by Matt Trimarchi, 29th May 2010. (originally Lighthouse ticket #100):


The menu system should check the full path and add class="selected" if it is found.

For example:

/blog/term/announcements

should add the class="selected" to the menu item "blog"

Missing view file generates wrong error

Created by Rick Guyer, 1st Mar 2011. (originally Lighthouse ticket #179):


Croogo version: 1.3.2

If a plugin is missing a view file, Croogo reports the following errors instead of the missing file:

Notice (8): Undefined variable: layout [ROOT/views/elements/menu.ctp, line 3] Fatal error: Call to a member function nestedLinks() on a non-object in /home/workspace/site/views/elements/menu.ctp on line 3

I expected to see the standard CakePHP missing view message.

This was also mentioned in the Google group at: http://groups.google.com/group/croogo/browse_thread/thread/5aa921e17358c15a

To reproduce:

  1. Activate the example plugin in a default installation of Croogo
  2. Access the example index at (yourinstallurl)/example in a browser. You should see the following content:

Example
content here

  1. Delete the file plugins/example/views/example/index.ctp
  2. Access the example index again

visibility of a block on the page translated Promoted and visibility of a block on the set of a controller

Created by romain, 5th Aug 2010. (originally Lighthouse ticket #136):


Hi

I changed the line 236, file app/controllers/components/croogo.php

'Block.visibility_paths LIKE' => '%"'. $this->controller->params['url']['url'] . '"%',

to

'Block.visibility_paths LIKE' => '%"'. $this->controller->params['url']['url'] . '"%',
//Promoted management language
'Block.visibility_paths LIKE' => '%"'. $locale.$this->controller->params['url']['url'] . '"%',
//management visibility across former controller. example: controller:users
'Block.visibility_paths LIKE' => '%"' . 'controller:' . $this->controller->params['controller'] . '"%',

best regard
romain

Managed database migrations for Croogo and Plugins

Created by James Sapara, 30th May 2012. (originally Lighthouse ticket #258):


This one is a feature request, where instead of rolling SQL files for the install and future updates, we use a Migrations plugin (https://github.com/CakeDC/migrations). I have a system in place to manage doing this updates right now, to a specific migration version or just the newest one. Works great for plugins and could easily work well for Croogo itself.

It would require adding another plugin to the system and updating the installer. Schema and data could be loaded (initial data most likely still in a sql file for ease of setup/import).

The generated migrations could detect if the system has already been initialized the old sql way for backwards compatibility in 1.4 branch.

Right now I am controlling the Migration version with a hardcode in the bootstrap.php for plugins, but we could easily update it to use the plugin.json.

If this is of interest to the project, I'll start a branch in my fork and start working on it.

acl_permissions/admin_index: Error with aliases having spaces

Created by caist, 22nd Nov 2010. (originally Lighthouse ticket #168):


This took me quite a while to find this:

When you use spaces within your aliases in the acl plugin, the rows cannot be toggled by the javascript function/method
AclPermissions.tableToggle

The problem with the alias "Common Actions":
class="hidden controller-Common Actions" which is cannot be found by the javascript function call
$('.controller-'+$(this).text()).toggle();


This is a quick fix in acl_permissions/admin_index.ctp starting at line 22.
It removes the spaces in the alias (in the output too), and you'll get problems if you have actually "CommonActions" AND "Common Actions" as aliases! So it's just a quick fix:

    echo $tableHeaders;

    $currentController = '';
    foreach ($acos AS $id => $alias) {
        $class = '';
        $alias = str_replace(' ','',$alias); // new line ---------------------
        if(substr($alias, 0, 1) == '_') {
            $level = 1;
            $class .= 'level-'.$level;

            $oddOptions = array('class' => 'hidden controller-'.$currentController);
            $evenOptions = array('class' => 'hidden controller-'.$currentController);
            $alias = substr_replace($alias, '', 0, 1);
        } else {
            $level = 0;
            $class .= ' controller expand';
            $oddOptions = array();
            $evenOptions = array();
            $currentController = $alias;
        }
        ...

have a nice time

Taxonomy is not translated in blocks

Created by kostisM, 6th Jan 2012. (originally Lighthouse ticket #226):


My Term titles are not translated in blocks. [vocabulary:categories type="blog"]

I found out that in app/controllers/components/croogo.php in line 291
$threaded = $this->controller->Node->Taxonomy->find('threaded', array(.........

the ['vocabularies_for_layout'] which is used to populate Taxonomy has not the translated titles.

i had enabled Term and Vocabulary in /.../app/plugins/translate/config/translate_bootstrap.php

Croogo mobile with jquerymobile

Created by Darwin Suarez, 29th Aug 2011. (originally Lighthouse ticket #206):


Good day:
I have been developing an application that has support for mobile devices within the CMS, I have seen that are already implemented the mobile detection capabilities with compnente RequestHandlers, I implemented the following code to the implementation:
File: app_controller.php
public function beforeFilter() {
if ($this->RequestHandler->isMobile()) {
$this->is_mobile = true;
$this->set('is_mobile', true );
$this->autoRender = false;
$this->layout = 'mobile';
}
}

public function afterFilter() {
// if in mobile mode, check for a valid view and use it
if (isset($this->is_mobile) && $this->is_mobile) {
$view_file = file_exists( VIEWS . $this->name . DS . 'mobile' . DS . $this->action . '.ctp' );
$layout_file = file_exists( LAYOUTS . 'mobile' . DS . $this->layout . '.ctp' );
$this->render($this->action, ($layout_file?'mobile/':'').$this->layout, ($view_file?'mobile/':'').$this->action);
}
}

I created the respective views, and the corresponding layout according to the contents of the afterFilter function when the load index is perfect, and I created a link within the index as follows: http://localhost/controller/action but when I click, load the following URL http://localhost/#/controller/action shows me making the page "undefined".
I really do not know where I correct this problem.
Thank you for your attention.
PD: Text translated by google translator

Failed login attempts Issue

Created by Matt Trimarchi, 29th May 2010. (originally Lighthouse ticket #99):


when submitting an empty username and password when logging in the page will continue to reload itself if the max amount of logins is reached.

public function beforeRender() {
        parent::beforeRender();



        if (in_array($this->params['action'], array('admin_login', 'login'))) {
            **if (!empty($this->data) && !empty($this->data['User']['username'])) {**

                $field = $this->Auth->fields['username'];
                $cacheName = 'auth_failed_' . $this->data['User'][$field];

                $cacheValue = Cache::read($cacheName, 'users_login');

                Cache::write($cacheName, (int)$cacheValue + 1, 'users_login');

            }
        }

The bold line indicates how i resolved the issue until a proper fix is sorted.

error attachments with translate plugin

Created by romain, 23rd Jul 2010. (originally Lighthouse ticket #127):


hello

when I open an article in translation, the browser or attchement
/admin/translate/translate/edit/1/Node/locale:eng

I have an error in the page
Error
The requested address was not found on this server.
URL is
/admin/translate/attachments/browser
in place of
/admin/attachments/browse
when I am not in translation (in the normal node edit)

I think there is a problem with tynymce
but I did not find the place to set URL

otherwise,
how-does-it to put a CSS tynymce?
/app/plugins/tinymce/views/helpers/tinymce_hook.php

Admin login issue with other browsers except Firefox

Created by Ryan Ye, 27th Oct 2012. (originally Lighthouse ticket #334):


I am not sure if this is a bug. I am getting this strange issue with logging in from other browsers except Firefox. It says Request blackholed due to "csrf" violation. If I log in via Firefox, I don't get this message.

But when I tried to log into my local copy, it is working fine. I am not sure, what could be a problem. Thanks!

I'm using 1.4.3 btw.

Add validation rules for slugs

Created by Pierre Martin, 23rd Jan 2013. (originally Lighthouse ticket #342):


So far slugs are not validated server side, so it is possible to save slugs like "my-awesome-page&more" which is incorrect.

This ticket is about adding a validation rule for slugs. I suggest something very simple like :

   'rule' => '/^[-a-z0-9]+$/i',
   'message' => __('The slug can only contain alphanumeric characters and hyphens.', true)

... or using a more complete regex similar to what is used in the "url" validation rule

Node Controller change

Created by theZiki, 22nd Jun 2010. (originally Lighthouse ticket #110):


I had problem, how to attach some models on paginate from plugin hook,
so i made some changes to node controller.

First node controller beforeFilter function: http://bin.cakephp.org/view/897402459

Second node controller index,promoted, term, search actions I merged
array: http://bin.cakephp.org/view/1999880637

And this is in hook startup action: http://bin.cakephp.org/view/1108324185

So this is solution for plugins if we want to attach contain models
for pagination, maybe there is better solutions, I will use this for
me, until something else be offical.

[Install] error 404

Created by Mohamed MELLOUKI, 22nd Sep 2011. (originally Lighthouse ticket #211):


getting error 404 when i tries to access the directory to install Croogo.

dev environment : wamp/win7
Host : 000cost (free hosting)

solution : install Cakephp 1.3.7 then copy/past the app directory from Croogo to the app directory of Cakephp install dir. worked like a charm.

also note for those how tries to host an existing install of Croogo (lets say developed in local host environment and then host it on production environment) you may encounter some problem relative to routing ex: no image or css, you can't access the admin panel neither access blog nodes etc.

solution : since i didn't figure out how to fix the routing of Croogo, i installed a fresh copy of Croogo then copy my application app directory into the newly installed copy, delete all tables from the db and import my own.

cheers.

restrict default file editor path to uploads

Created by Lucian Sabo, 12th Aug 2011. (originally Lighthouse ticket #198):


I don't think it is a good idea to let users access the web root with all sensible croogo and cake files.
So, I restricted opening the web root folder. I only allow the user to access the upload folder, which is enough for a common user.

I think a CMS should not allow content editors to modify it's core files.
Of couse the changes are only naive. The filemanager needs to protect itself from malicious users passing disallowed paths by GET. It is still a good protection for the legitimate users shooting their foot.
If you think this is worth adding I can modify the class to enforce security on disallowed paths.

Here are the changes in fliemanager_controller:

define a new private property:
private $_defaultPath;

in beforeFilter():
add:
$this->_defaultPath = WWW_ROOT . 'uploads';

in admin_browse():
change:

if (isset($this->params['url']['path'])) {
$path = $this->params['url']['path'];
} else {
$path = APP;
}

to:

if (isset($this->params['url']['path'])) {
$path = $this->params['url']['path'];
} else {
$path = $this->_defaultPath;
}

and change
$regex = '/^' . preg_quote(APP, '/') . '/';
to
$regex = '/^' . preg_quote($this->_defaultPath, '/') . '/';

How to add extra fileds in newly added content type.

Created by symirna, 3rd Feb 2012. (originally Lighthouse ticket #231):


Hi

I am new to croogo cms. I want to add following fields in the content type form.

  1. A Date field
  2. Need to add Text field for each post that describes what the post is
  3. Need to add link field: Hyperlink to external website

Can any one suggest a way to add the above fields in content type form.

Installation displayed as complete w/o editing core.php

Created by polerin, 4th Oct 2010. (originally Lighthouse ticket #158):


Third step of the install, config directory writable, but core.php not.

Page displays success message, but at the top of the layout the a warning is displayed. Warning below

Warning and trace below.
Warning (2): fopen(/var/www/13_clients/coleman/config/core.php) [http://php.net/function.fopen]: failed to open stream: Permission denied [CORE/cake/libs/file.php, line 154]
Code | Context

$mode = "w"
$force = false

fopen - [internal], line ??
File::open() - CORE/cake/libs/file.php, line 154
File::write() - CORE/cake/libs/file.php, line 245
InstallController::finish() - APP/plugins/install/controllers/install_controller.php, line 234
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 204
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
[main] - APP/webroot/index.php, line 83

Fuzzy logic Quick search users

Created by Ryan Snowden, 5th Jul 2010. (originally Lighthouse ticket #115):


I have a huge user list and a plugin that extends the users. It would be beneficial to use a fuzzy logic PHP script like quicksilver to quickly find users and display their profiles.

I have done this and stuck it in the header. It uses js to do the finding. I have an algorithm i found to do it on the XHR-PHP side:

/**
     *  Quicksilver Score
     *
     *  A port of the Quicksilver string ranking algorithm
     *  (re-ported from Javascript to PHP by Kenzie Campbell)
     *  http://route19.com/logbook/view/quicksilver-score-in-php
     *
     *  score("hello world","axl") //=> 0.0
     *  score("hello world","ow") //=> 0.6
     *  score("hello world","hello world") //=> 1.0
     *
     * `@param` string $string 
     * `@param` string $abbreviation 
     * `@param` string $offset 
     * `@return` void
     * `@author` Kenzie Campbell
     */
    public function score($string, $abbreviation, $offset=0) {
        $string = strtolower($string);
        $abbreviation = strtolower($abbreviation);
        if(strlen($abbreviation) == 0) return 0.9;
        if(strlen($abbreviation) > strlen($string)) return 0.0;
        for ($i = strlen($abbreviation); $i > 0; $i--) {
            $sub_abbreviation = substr($abbreviation,0,$i);
            $index = strpos($string,$sub_abbreviation);
            if($index<0 or $index===false) continue;
            if($index + strlen($abbreviation) > strlen($string) + $offset) continue;
            $next_string = substr($string,$index+strlen($sub_abbreviation));
            $next_abbreviation = null;
            if($i >= strlen($abbreviation)) $next_abbreviation = '';
            else $next_abbreviation = substr($abbreviation,$i);
            $remaining_score = score($next_string,$next_abbreviation,$offset+$index);
            if ($remaining_score > 0) {
                $score = strlen($string)-strlen($next_string);
                if($index != 0) {
                    $j = 0;
                    $c = ord(substr($string,$index-1));
                    if($c==32 || $c == 9) {
                        for($j=($index-2); $j >= 0; $j--) {
                            $c = ord(substr($string,$j,1));
                            $score -= (($c == 32 || $c == 9) ? 1 : 0.15);
                        }
                    }
                    else $score -= $index;
                }
                $score += $remaining_score * strlen($next_string);
                $score /= strlen($string);
                return $score;
            }
        }
        return 0.0;
    }

page hierarchy modification

Created by spooknick, 27th Apr 2010. (originally Lighthouse ticket #77):


I would be nice to be able to change the page tree, not only by changing the parents but also rearranging the children one with another. And also to be able to display the tree in content list. The id doesn't help I think.
I love croogo

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.