Git Product home page Git Product logo

bloghub-plugin's Introduction

BlogHub - OctoberCMS Plugin

BlogHub extends the RainLab.Blog OctoberCMS plugin with many necessary and helpful features such as Moderatable Comments, Promotable Tags, Custom Meta Fields, additional Archives, basic Statistics, Views counter and more.

This extension is especially designed for our own OctoberCMS templates, but can also be used by any OctoberCMS user and developer, of course. Check out the documentation for all details.

Features

The following list just provides a slight overview, visit the documentation for more details.

  • Moderatable Blog Comments, with like, dislike, favorite, ajax and more
  • Custom global and theme-related Post Meta Fields
  • Promotable Blog Tags, with title, description and color
  • View and Visitor Counter, for each single post
  • Additional Template Components, to create author, date, tag archives and more
  • Extended Post Model, with many additional values and properties
  • Extended User Model, also with many additional values and properties
  • Dashboard Widgets, for your comments, posts and statistics

Important Notes

  1. The RatMD.BlogHub extension adds the possibility to use author archive pages. It is highly recommended using the "Author Slug" field for each backend user so that the login name - which would be used instead - is not disclosed. You can also disable the use of the login name with the [bloghubBase] component, as described in the documentation.

  2. The Blog comments currently requires to add the {% framework %} October-specific TWIG tag to your template layouts, when not already included. We're working on an AJAX-less / -optional solution for a future update.

Requirements

Copyright

Copyright © 2022 - 2024 rat.md.

Published under the MIT-License.

bloghub-plugin's People

Contributors

alexwenzel avatar andrea-tecnotrade avatar chrisvidal avatar sambrishes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bloghub-plugin's Issues

2 Elements using the same ID

Chrome Warning:

[DOM] Found 2 elements with non-unique id #bloghubCommentSection6368b0bd2e5b6_username: (More info: https://goo.gl/9p2vKq) 
<input id=​"bloghubCommentSection6368b0bd2e5b6_username" type=​"text" name=​"comment_name" value=​"Sam" placeholder=​"Your Username" class=​"form-control" readonly>​
<input id=​"bloghubCommentSection6368b0bd2e5b6_username" type=​"text" name=​"comment_user" autocomplete=​"off" value placeholder=​"Your Username" class=​"form-control from-control-bloghub-special-assignment">​

Error installing

Hello, after trying to install the plugin on october 3.0 I've a missing table error
How can I fix that?
Thanks for your job!

Wrong columns type

column 'author_table' in table 'ratmd_bloghub_comments' need to be string to work properly

'$table->string('author_table')->nullable();'

Tos not working

$this->page['showCommentFormTos'] = $this->config('form_tos_checkbox') === '0';

'0' need to be '1' to get right condition

Install issue

Not sure which version of MySQL you are using on your local dev env?
But it does not migrate properly on

 mysql --version
mysql  Ver 8.0.23 for osx10.16 on x86_64

I think a solution would be to remove the default value

- v1.0.0 Initial Release of RatMD.BlogHub
Rollback failed! Reason: "SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'posts' can't have a default value (SQL: create table `ratmd_bloghub_visitors` (`id` int unsigned not null auto_increment primary key, `user` varchar(64) not null, `posts` json not null default '[]', `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci' engine = InnoDB)"

In Connection.php line 669:
                                                                                                                                     
  SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'posts' can't have a default value (S  
  QL: create table `ratmd_bloghub_visitors` (`id` int unsigned not null auto_increment primary key, `user` varchar(64) not null, `p  
  osts` json not null default '[]', `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate  
   'utf8mb4_unicode_ci' engine = InnoDB)          

Method in CommentSection wrong condition

Method need to be

    protected function getFrontendUser()
    {
        if (PluginManager::instance()->hasPlugin('RainLab.User')) {
            $rainLabAuth = \RainLab\User\Classes\AuthManager::instance();
            if ($rainLabAuth->check()) {
                return $rainLabAuth->getUser();
            } else {
                return null;
            }
        } else {
            return null;
        }
    }

Instead of (when plugin is activated returning null)

    protected function getFrontendUser()
    {
        if (PluginManager::instance()->hasPlugin('RainLab.User')) {
            return null;
        }

        $rainLabAuth = \RainLab\User\Classes\AuthManager::instance();
        if ($rainLabAuth->check()) {
            return $rainLabAuth->getUser();
        } else {
            return null;
        }
    }

sql error when using [bloghubTags] component

hello,

i got an error when using your [bloghubTags] component:

image

I think, this is because some columns are not correct added during migration.
When i remove the lines 97 and 98 inside plugins/ratmd/bloghub/components/Tags.php, everything works for me.

I installed your plugin 1.3.8.

all the best

Meta values aren't stored on new posts

Theme based meta declarations aren't stored on new posts, only on existing ones. Probably happens on general-declared meta values as well.

  • Found in OC 3.1 (may occurs on previous releases as well)

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.