Yii 1.1: yii-blog

A huge improvement of the old and boring demo blog that comes with yii framework.
4 followers

Overview

A huge improvement of the old and boring demo blog that comes with yii framework.

This extension is a module that you can use in any existing Yii application.

Demo

Click here for the demo (To log in: admin / 123456)

Features

  • Can reply to comments
  • Can create categories and subcategories
  • Multilingual (The blog currently has 2 language packs available: English and Spanish)
  • Additional widgets: Search, Categories, Archives and Most commented posts
  • Share buttons
  • User management: Registration form, Subscription system, Password recovery, Internal messaging and Can ban annoying users
  • Integration with tinyMCE editor
  • Integration with captcha extended extension
  • Integration with PHP Mailer extension
  • Role based access control (RBAC): Guests, Readers, Authors, Editors, Publishers and Admins
  • Fully responsive
  • And much more!

Requirements

Yii 1.1.14 or above

Usage

  • Download the files and put them in protected/modules/blog
  • You must add this in *protected/config/main.php**:
'modules'=>array(
        'blog'=>array(
        //PHP Mailer details
            'emailHost' => 'youremailhost',
            'emailPort' => 'youremailport', 
            'emailUsername' => 'youremailusername',
            'emailPassword' => 'youremailpassword',     
            'emailAltMessage' => 'To view the message, please use an HTML compatible email viewer.',
        ),
),
  • You must add these rules in the urlManager array:
'urlManager'=>array(
   'urlFormat'=>'path',
   'showScriptName'=>false,
   'rules'=>array(
      '<lang:\w+>/blog/<category:\d+>/<post:\d+>/<title:.*?>'=>'blog/post/view',
      '<lang:\w+>/blog/tag/<tag:.*?>'=>'blog/post/index',
      '<lang:\w+>/blog/<category:\d+>'=> 'blog/post/index',
      '<lang:\w+>/blog'=> 'blog/post/index',
      '<lang:\w+>/blog/register'=> 'blog/user/register',
      '<lang:\w+>/blog/passwordrecovery'=> 'blog/user/passwordrecovery',
      '<lang:\w+>/blog/user/<user:\d+>'=> 'blog/user/view',
      '<lang:\w+>/blog/<controller:\w+>/<action:\w+>'=>'blog/<controller>/<action>',
   )
)
  • It uses a SQLite database, so you don't have to create tables.
  • The following folders must be writable: protected/modules/blog/data, protected/modules/blog/assets/images/flags and protected/modules/blog/assets/images/avatars
  • You can log in using: admin / 123456
  • If you want to customize the introductory text of the blog entries you will have to insert a page break using the tinyMCE editor
  • You should add the following code in your layout to print the language flags:
<?php
    if(isset($this->module->id) && $this->module->id == 'blog')
        $this->printBlogFlags();
?>
  • You should add the following code in your head section:
<head>
<!-- Other tags here -->
 
<?php if(isset($this->metaDescription)) : ?>
     <meta name="description" content="<?= $this->metaDescription ?>" />
<?php endif; ?>
<?php if(isset($this->metaKeywords)) : ?>
     <meta name="keywords" content="<?= $this->metaKeywords ?>" />
<?php endif; ?>
<?php if(isset($this->metaRobots)) : ?>
     <meta name="robots" content="<?= $this->metaRobots ?>" />
<?php endif; ?>
<?php if(isset($this->canonical)) : ?>
     <link rel="canonical" href="<?= $this->canonical ?>" />
<?php endif; ?> 
</head>

Donations

Donations are welcome. Thanks for your support!!!

Paypal

Total 12 comments

#20138 report it
Brad Koria at 2017/10/31 03:35am
Hire YII Developers

Amazing improvement, these features look great. I would like to appreciate your efforts and work done in pervious version. Keep up this dedication in Yii Web Development field.

#19263 report it
SomethingWicked at 2015/05/03 01:02pm
RE: Demo

ehm... I just tried to visit it... http://yiiblog.ho33.com/

#19262 report it
oligalma at 2015/05/03 09:33am
RE: Demo

Can you please tell me the steps you followed to get this error? Thanks.

#19216 report it
SomethingWicked at 2015/04/22 07:00am
Demo

It seems you have some problems with your demo:

Fatal error: Class 'Parameter' not found in /home/moginn/public_html/yiiblog/protected/components/Controller.php on line 61

#19018 report it
oligalma at 2015/02/25 02:50pm
RE: Non-static method

I've just uploaded a demo of Yii blog here: http://www.oligalma.com/yiimarket/en/blog

As you can see, it works fine!

#19015 report it
ferminako at 2015/02/25 09:24am
Non-static method

I've just modified php.ini and restart my local server running on linux mint, and I still get same error, so I'm goin to upload to a production server just to see if it works there, thanks anyway

Edit: after configuring some things is working on my production hosting but I cant make it works in local ... thank you, this problem should be mine.

Bye

#19013 report it
oligalma at 2015/02/25 09:08am
RE: Non-static method

It's strange, this error has never appeared to me. Look at this thread, there is a solution:

http://stackoverflow.com/questions/10720495/problems-to-install-couponic-on-localhost

If this doesn't work you may ask on Yii forum.

#19012 report it
ferminako at 2015/02/25 08:54am
Non-static method

Hi again, you was right, the problem was I had 1.1.13 but right know, after an upgrade to a higher version I still have the second problem in every Manage item: Non-static method CController::createUrl() should not be called statically, assuming $this from incompatible context

Where can be the problem?

#19011 report it
oligalma at 2015/02/25 07:57am
RE: Problem with CPasswordHelper and then with non-static method

I think you have to upgrade your framework version, because CPasswordHelper is available from Yii 1.1.14

#19009 report it
ferminako at 2015/02/25 07:16am
Problem with CPasswordHelper and then with non-static method

Hi moginn, first of all thank you so much for sare your work.

I've just downloaded it and include the framework folder inside it.

And it runs in my browser the problem comes when I've tried to login using admin|123456, I've got an error: include(CPasswordHelper.php): failed to open stream: No such file or directory

I thought the problem was that CPasswordHelper.php was not where yii expect it to be, and I've included CPasswordHelper.php under utils folder, but the problems continues, so I don't really know where is the problem now.

In order to give a try to your blog, I've commented in class UserIdentity.php the lines 24 and 25 ( else if(!CPasswordHelper::verifyPassword($this->password, $user->password)) $this->errorCode=self::ERROR_PASSWORD_INVALID;)

To skip the validation just to see how your blog works, once I've done it , I've got another problem, every time I've tried to enter on Manage Post or other sections I've got this:

Non-static method CController::createUrl() should not be called statically, assuming $this from incompatible context

Could you please help me?

Thanks in advance

#18851 report it
oligalma at 2015/01/23 06:08am
upgrade

You are right, yii2 version of the blog would be better!! I developed the blog in yii1 because my website is made in yii1 and I wanted to put a good blog on it. Yii2 version of the blog is something that I already have in mind. Maybe we could join forces with several developers to migrate this blog to yii2!

#18849 report it
salar at 2015/01/23 05:45am
upgrade

Hi, thanks for your effort but why not making the yii 2 version of the blog demo??

Leave a comment

Please to leave your comment.

Create extension
Downloads