Giter VIP home page Giter VIP logo

blog-bundle's Introduction

This repository is no longer maintained

Due to lack of interest, we had to decide to discontinue this repository. The CMF project focusses on the Routing component and RoutingBundle, which are still in active use by other projects.

This repository will no longer be upgraded and marked as abandoned, but will be kept available for legacy projects or if somebody wants to experiment with the CMF.

You can contact us in the #symfony_cmf channel of the Symfony devs slack.

Symfony Content Management Framework

Build Status Latest Stable Version Total Downloads

This bundle is part of the Symfony Content Management Framework (CMF) and licensed under the MIT License.

Note the main purpose of this repository is to offer a composer package that ties together various packages that will be used in most CMF projects. The bulk of the development is done in other repositories on the https://github.com/symfony-cmf organization.

The Symfony CMF project makes it easier for developers to add CMS functionality to applications built with the Symfony PHP framework. Key development principles for the provided set of bundles are scalability, usability, documentation and testing.

Requirements

Documentation

For the install guide and reference, see:

Contributing

Pull requests are welcome. Please see our CONTRIBUTING guide.

Thanks to everyone who has contributed already.

blog-bundle's People

Contributors

bghosts avatar cordoval avatar dantleech avatar dbu avatar dinamic avatar emgiezet avatar lsmith77 avatar nykopol avatar petk avatar pulzarraider avatar shieldo avatar sunrum avatar wouterj avatar xabbuh avatar

Stargazers

 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

blog-bundle's Issues

DI configuration

after updating the cmf-sandbox, i got this error:

The definition for "symfony_cmf_blog.admin" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.  

i switched the sandbox to 0.1.* which solved the problem for now.

Locale-aware slug generator

The current slug generator is a bit limited in terms of handling different languages:

I tried to use it with my local language:

[ErrorException]
Notice: iconv(): Detected an illegal character in input string in ...\vendor\symfony-cmf\blog-bundle\Symfony\Cmf\Bundle\BlogBundle\Util\PostUtils.php line 20

Is there some library that can be integrated to provide locale-aware slug generator?

In all cases the developer knows which locale is being used for the document, so generic ones, I think, are outside the scope of the question.

Dependencies

Is there any issue that stops BlogBundle before gettin more relevant dependecies? For example BlogBundle needs doctrine/phpcr-bundle 1.0.0 but doctrine/phpcr-bundle 1.1.0 comes with freshly installed SymfonyCMF. There are others dependencies I've noticed.

In fact - I don't know how to install it correctly.

Missing method StrategyInterface::updateTags on PHPCRStringStrategy

Hi,
It generate a Fatal Error

PHP Fatal error: Class Symfony\Cmf\Bundle\BlogBundle\Tagging\PHPCRStringStrategy contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Cmf
Bundle\BlogBundle\Tagging\StrategyInterface::updateTags) in /[MyWorkspace]/vendor/symfony-cmf/blog-bundle/Symfony/Cmf/Bundle/BlogBundle/Tagging/PHPCRStringStrategy.php on
line 49

Improve routing for posts.

Try creating a route per post. I am thinking that maybe we can handle this is RoutingExtraBundle?

@sopjet says that he uses annotations, but would that add unnecessary coupling? This is how we did it in my CMS at my last job, so the appoach was to create a handler class for each routable entity, which is used by a Manager class which is connected to an event system (in our case we used Doctrine events). This isn't a proposal, but is maybe interesting.

The good thing about outsourcing stuff like this to a class is that you can inject services.

<?php

namespace Ylly\Extension\ArticleBundle\Routing;
use Ylly\Extension\SiteRoutingBundle\Routing\SiteRouteHandler;
use Ylly\Extension\SiteRoutingBundle\Entity\SiteRoute;
use Ylly\Extension\ArticleBundle\Entity\Article;
use Doctrine\ORM\EntityManager;

class ArticleRouteHandler extends SiteRouteHandler
{
    /** Get the defaults for the route */
    public function getDefaults(SiteRoute $route)
    {
        $articleId = $route->getForeignId();

        $defaults = array();
        $defaults['_controller'] = 'ArticleBundle:Site:article';
        $defaults['article_id'] = $articleId;

        return $defaults;
    }

    /** Return the entity (content) for the given route */
    public function getEntity(SiteRoute $route)
    {
        $repo = $this->getRepository('Ylly\Extension\ArticleBundle\Entity\Article');
        $article = $repo->findOneForSiteAndRootId($route->getSite(), $route->getForeignId());
        return $article;
    }

    /** The key was used by the routing table to reference and instantiate this class */
    /** I guess this would turn into a text field in the Route document */ 
    public function getKey()
    {
        return 'article_single';
    }

    /** To get the handler for an entity you pass the entity to the Manager
      * and the manager iterates over all the registered handlers until it
      * finds a Handler that handles it */
    public function handles($entity)
    {
        if ($entity instanceOf Article) {
            return true;
        }
        return false;
    }

    /** This method translates the entity to a full URL, in the CMF
      * this would probably just be a case of slugifying or performing
      * some othertransformation to the node name */
    public function translateEntityToUrl($entity)
    {
        $url = sprintf('/%s/article/%s',
            $this->getTranslationLocale($entity),
            $this->slugify($entity->tmpTitle ? $entity->tmpTitle : $entity->getTitle())
        );

        if (!$entity->getAutoRoute()) {
            $url = $entity->getCustomRoute();
        }

        return $url;
    }
}

Push "next blog post" logic etc to template

In relation to the blog post display page, @dbu says : i would love to push much more of this into the template. with cmf_children and cmf_next_linkable and cmf_prev_linkable, it should be possible to not need much custom controller logic anymore. cmf_children also has means for slicing the array to do pagination.

Symfony\Cmf\Component\Routing\RouteReferrersReadInterface' not found

Hello!

Im using blog bundle

"require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "symfony-cmf/symfony-cmf": "1.0.*",
        "symfony-cmf/simple-cms-bundle": "1.0.*",
        "symfony-cmf/search-bundle": "1.0.*",
        "symfony-cmf/create-bundle": "1.0.*",
        "symfony-cmf/routing-bundle": "1.1.*",
        "symfony-cmf/routing-auto-bundle": "1.0.0-alpha8@dev",
        "symfony-cmf/blog-bundle": "1.0.0-beta7@dev",
        "symfony-cmf/tree-browser-bundle": "1.0.*",
        "jackalope/jackalope-doctrine-dbal": "1.0.*",
        "jackalope/jackalope-jackrabbit": "1.0.*",
        "friendsofsymfony/user-bundle": "1.3.*@dev",
        "hwi/oauth-bundle": "dev-master",
        "doctrine/doctrine-bundle": "1.2.*",
        "doctrine/migrations": "1.0.x-dev",
        "doctrine/data-fixtures": "1.0.*",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/phpcr-odm": "1.0.*@dev",
        "sonata-project/cache-bundle": "2.1.*",
        "sonata-project/doctrine-phpcr-admin-bundle": "1.0.*",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/intl-bundle": "2.1.*",
        "eko/feedbundle": "1.0.*",
        "vich/uploader-bundle": "dev-master",
        "knplabs/gaufrette" : "dev-master",
        "knplabs/knp-gaufrette-bundle" : "dev-master",
        "sonata-project/user-bundle": "2.2.*@dev",
        "eko/feedbundle": "1.0.*",
        "lunetics/locale-bundle": "2.2.*",
        "liip/functional-test-bundle": "1.0.*",
        "jms/translation-bundle": "1.1.*",
        "symfony-cmf/routing": "1.1.0-beta2",
        "emgiezet/errbit-php": "dev-master",
        "Trsteel/ckeditor-bundle": "dev-master",
        "sonata-project/core-bundle": "dev-master",
        "helios-ag/fm-elfinder-bundle": "~1.4"
    },

And i cant find this interface... Just wested entire day with composer.phar update

PHP Fatal error:  Interface 'Symfony\Cmf\Component\Routing\RouteReferrersReadInterface' not found in /home/mgz/workspace/simcms/vendor/symfony-cmf/blog-bundle/Symfony/Cmf/Bundle/BlogBundle/Document/Blog.php on line 15
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

Any help will be gr8!

Cheers!
Max

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.