rainlab / blog-plugin Goto Github PK
View Code? Open in Web Editor NEWA robust blogging platform.
License: MIT License
A robust blogging platform.
License: MIT License
( octobercms/october#956 )
Hi
I want to duplicate a plugin for use another purpose. I am using Blog plugin from Rainlab for listing Stores and I'll use same plugin for listing campaigns and listing movies. Searched for some other blog plugin but there isn't i guess. How can I do that?
Thank you
Hey,
Does anyone know if there's support for backup/restore? Where are the blog posts stored by default? Are they in the database?
My whole goddamned install got nuked when upgrading to RC, and while I managed to recover all of my static content after a reinstall, my blog posts are kaput.
Any idea on how to get those back?
Thanks,
Mike
http://monosnap.com/image/p8fmzL4lrQjNVfT8MTUfmxNjurdpWU
http://monosnap.com/image/NmmYyICM9l6lBZgrc9SKQUUvDJpagB
I use 2 components
forums and Blog
in Blog for parPage use str
for Forum page but when go tu page 2 in Forum Blog do the same
can i use rainlab.translate plugin with this ?
I have installed the Blog plugin. I create a new category. Create a new blog post and assign it a category. Then I create a new page and add the Blog List component to that page. When I preview the page I receive the exception below. I'm fairly new to Laravel and extremely new to October CMS. Please let me know what additional information I can provide for troubleshooting or forgive me if this is a simple newb mistake.
The component 'RainLab\Blog\Components\Posts' does not contain a method 'paramName'.
//Posts.php
if ($pageNumberParam = $this->param('pageNumber')) {
// @deprecated remove if year >= 2015
$deprecatedPageNumber = $this->propertyOrParam('pageParam');
$currentPage = $this->property('pageNumber', $deprecatedPageNumber);
if ($currentPage > ($lastPage = $this->posts->getLastPage()) && $currentPage > 1)
return Redirect::to($this->currentPageUrl([$pageNumberParam => $lastPage]));
}
//ComponentBase.php
}
if (method_exists($this->controller, $method)) {
return call_user_func_array([$this->controller, $method], $parameters);
}
throw new CmsException(Lang::get('cms::lang.component.method_not_found', [
'name' => get_class($this),
'method' => $method
]));
}
That would be awesome if we could see the number of words entered on each blog post when we are editing. I tried to find where to add that functionality but unfortunately I was not successful. Can you show me where you add your custom event handlers to the ace editor so I can add this functionality and send you a pull request?
The Blog Plugin (http://octobercms.com/plugin/rainlab-blog) is quite good, but I have a huge pain point that is stopping me from using it (and therefore, OctoberCMS). I really need nested categories (categories and subcategories) in the blog, both for "clean" URLs for the end-user, and for SEO. I imagine a lot of other people would want this feature as well...I would really appreciate you making this a priority, given how much momentum octoberCMS is starting to pick up now.
See screenshots from wordpress here: https://wordpress.org/plugins/hierarchical-link-categories/screenshots/
Details:
This page: /october/backend/rainlab/blog/categories currently shows a flat list of categories. It would be very useful to have this list be hierarchical (so, you can add sub-categories to the tree). Optional / Nice to have: You can drag/drop categories and subcategories anywhere in the tree.
The front-end would show nested URLs like: /getting-pregnant/trying-to-conceive/article1.htm /getting-pregnant/trying-to-conceive/article2.htm In general: /{category1}/{sub-category2}/{sub-sub-category3}/article1.htm
Optional / Advanced feature: The Back end could allow the admin to select URLs that are either flat, or nested. If 'flat' is selected for the URL structure, the front-end for the 3 examples above would have URLs like: /trying-to-conceive/article1.htm /trying-to-conceive/article2.htm In general: /{sub-sub-category3}/article1.htm
The schema and sample data for categories would look something like this:
CREATE TABLE categories ( id int(10) unsigned NOT NULL AUTO_INCREMENT, id_parent int(10) unsigned DEFAULT NULL, name varchar(63) COLLATE utf8_unicode_ci NOT NULL, url varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, is_featured tinyint(1) NOT NULL DEFAULT '0', is_active tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*Sample Data for the table categories */
insert into categories(id,id_parent,name,url,is_featured,is_active) values (1,0,'Considering a Baby','/considering-a-baby',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (2,0,'Getting Pregnant','/getting-pregnant',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (3,0,'Pregnancy','/pregnancy',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (4,1,'Are We Ready?','/considering-a-baby/are-we-ready',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (5,2,'Trying To Conceive','/getting-pregnant/trying-to-conceive',0,1);
Today I started playing around with OctoberCMS and some plugins. But first I want to say, this CMS is the bomb! ๐
I think i've found a bug. I've created a few blog posts but the Author is empty and I'm unable to edit it. I can't find the Author field but maybe it should be filled as default?
Am I doing something wrong?
Thanks!
Guys, great Blog plugin! So easy to implement, really impressed :)
Just one little addition from me would be to add the query ->orderBy('updated_at', 'desc')
to each return
in the loadPosts()
functions in both the components/Posts.php
and the components/Category.php
files?
Only because, if you were to post multiple posts and publish them on the same day, currently the newer posts will appear below the older posts in the list.
If I use the syntax ![1](image)
in the content, then use the supplied upload panel, i get this error when trying to upload the image:
Error uploading file "image-1.jpg". SQLSTATE[42S22]: Column not found: 1054 Unknown column 'public' in 'field list' (SQL: insert into `system_files` (`public`, `file_name`, `file_size`, `content_type`, `disk_name`, `updated_at`, `created_at`) values (1, image-1.jpg, 69175, image/jpeg, 53a89f1eed23b962780263.jpg, 2014-06-23 22:41:50, 2014-06-23 22:41:50))
The code is correct in the formwidgets/Preview.php
as it is posting to the is_public
field, just don't think CMS is installing the version of the plugin which has this in, it's installing a previous version as the Preview.php
form widget is posting to a public
field and throwing the above error - may need a version bump to pull down the changes?
And before you ask, yes I have refreshed the plugin to make sure ;)
When accessing https://octobercms.com/blog/category/announcements/2 page, category links on the sidebar also will have page=2
Solution is simple, just disable $routePersistence;
Also we can add 3th parameter to
setUrl($pageName, $controller, $routePersistence = true)
function on the Models
RainLab\Blog\Models\Category
RainLab\Blog\Models\Post
When creating a new post, it throws a class not found error:
Class 'October\Rain\Support\Markdown' not found
Line 7 in models/Post.php has:
use October\Rain\Support\Markdown;
Has something changed with October causing this path to be wrong as changing line 7 to:
use Markdown;
Fixes the issue.
Hi RainLab, Prompt how to display the contents of the "Excerpt" in "meta=Description" on page post?
I made this.
function onEnd()
{
if(!$this->post){
$this->setStatusCode(404);
Response::make( $this->controller->run('404'), 404 );
return;
}
}
but it's not working when we don't have a 404 page. It must to show octobercms 404 and also
index route is /:page?1|^[0-9]+$
blog route is /:slug
It's only routes to blog not to page
Any idea?
I was so happy to see that this blog now works with the WYSIWYG editor. Makes my life so much easier when dealing with clients adding content.
I thought I was going crazy though, it was a bit odd at first here as it doesn't mirror the content on the left, it only accounts for the first paragraph, but I figured it was just a visual bug:
Low and behold, the actual saved output using the default {{ post.content_html|raw }}
on the blog turned out to be only the first paragraph too. Same amount that was displayed in the editor's live preview:
The only way to fix it on my end is by turning off the WYSIWYG editor and then the content begins to mirror on the right-hand side and outputs properly. Only problem is that I need the WYSIWYG editor for my clients to manage their blog posts.
Thanks!
With the new Media Manager update (awesome feature) it appears to have broken the feature image upload.
When uploading an image it now shows up blank, and you cannot access the image properties modal window.
(it gets stuck loading the properties box)
I checked the \storage\app\media and the image did upload successfully.
Many Thanks
The featured images on detail blog posts are not displayed.
I cannot set user/group permission to give this u/g access to blog plugin and blog plugin only.
Or I don't know smth? :)
I'm seeing this error:
An exception has been thrown during the rendering of a template ("The component 'RainLab\Blog\Components\Post' does not contain a method 'title'.").
On this page: http://crowdersoup.com/blog/post/find-replace-without-regex-javascript
Anyone else seeing this?
When I delete post with categories from backend panel and after that I see 'rainlab_blog_posts_categories' table the rows still exists after post deletion.
now only date incorrect Sort order in list of posts if 2 or more in one day
NOTE: This is a feature request
You should have the ability, in a specific tab, during blog post creation/editting to apply custom key-value pairs that can be accessed in the page.
Something like:
Key: [] Value: [_____________________________] [ + ]
pressing the [ + ] button would add another KeyValue pair
Which when put in like:
Key: [something____] Value: [Something about something or something________]
and then do this in the page:
{{ post.keyVal.something }}
Outputs Something about something or something
to the page.
This will help a lot with custom post types, such as:
In my usage I would have a youtube key and a disqus key which I would pass to partials to generate a specific youtube video and disqus thread.
is there a simple way to implement next and previous post navigation. So readers can move through the articles one by one without having to return to the post list page?
This may be more of a feature request, but I noticed this evening that if I check "published" and select a future date it still appears in the blog list immediately. Not only that, but I can also navigate directly to the blog post.
I would expect that selecting a future date would result in the post not showing in the post list until that date, and a 404 or "Cannot find post" message when it's navigated to directly. If this is not the desired behavior set me straight!
Thanks for the awesome plugins and CMS!
When you are viewing a detail's post, at the very bottom when says: "Posted in dummy".
This is the part of code which do that:
<p class="info">
Posted
{% if post.categories.count %} in {% endif %}
{% for category in post.categories %}
<a href="{{ categoryPage|page({'slug': category.slug}) }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
on {{ post.published_at|date('M d, Y') }}
</p>
There is no uri at the "href" attribute of the "a" tag.
That should be something like "blog/category/dummy" instead of you receive something like:
<p class="info">
Posted in <a href="">Dummy</a> on Jul 09, 2014
</p>
The plugin uses \components\posts\default.htm as default partial for rendering the posts-list. Where can I adjust this, so that I can use: \components\posts\custom.htm
I have my development localhost set as october/....
When I save a blogpost i get redirected to october/http://october/....
I use nginx as webserver.
Strange behavior :)
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'post_count' in 'order clause'
(SQL: select `rainlab_blog_categories`.* from `rainlab_blog_categories` order by `post_count`
desc limit 5 offset 0)" on line 625 of
C:\servers\xampp\htdocs\October\vendor\laravel\framework\src\Illuminate\Database\Connection.php
Can you check there isn't an issue with RC breaking the blog plugin. I have tried dozens of times to set this up as per instruction video on vimeo but although there are no errors clicking on the category from the list does not filter the results it just shows all results again. Also pagination does not seem to work, clicking on 'next' takes me to the 'blog post' page rather than page 2 of 'blog posts'
I have no error messages or screen shots but I hope my explanation is clear enough ;)
I realise I may have implemented the plugin wrong but I'm pretty sure all is at it should be, based on your video. If you can confirm everything is working as it should I can carry on my end
Is it correct that blog slug and category slug would both be ":slug"
Is it OK that the urls for my 3 pages are as follows
posts page = /articles/:page? - articles.htm
categories page = /articles/category/:slug/:page? - categories.htm
single post page = /articles/:slug - article-single.htm
FYI, I tried this without the :page slug (not bothered with pagination at the time) and still categories did not work , all posts were shown they were not filtered by category
Also is any of this stored in database? Is it possible if I misconfigured the plugin set-up and then amended it that the amendments didn't get written to database so that no matter how often I tweak the plugin settings it keeps using an incorrect one??
Thanks
D
Need on posts lit page display short article with Read more link. How can i do this?
Trying to reproduce the steps on https://vimeo.com/97088926 when I try to create a new blog post I have the following error:
Class 'October\Rain\Support\Markdown' not found
in /home/matias/Projects/Personal/october/plugins/rainlab/blog/models/Post.php line 149
There is an October\Rain\Support\Facades\Markdown class and it has an annotation mentioning that it resolves to October\Rain\Parse\Markdown
On a clean install with the latest git version of this plugin and build 225 of OctoberCMS the $post->url variable is returning null, thus linking post titles to the home page instead of the blog post.
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_dusty2.rainlab_blog_posts' doesn't exist (SQL: alter table rainlab_blog_posts
add seo_title
varchar(255) null, add seo_description
varchar(255) null, add seo_keywords
varchar(255) null, add canonical_url
varchar(255) null, add redirect_url
varchar(255) null, add robot_index
varchar(255) null, add robot_follow
varchar(255) null)" on line 614 of /home/admin/web/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Try again
When I delete the slug and I want to save the post with the new title, "The slug field is requiored" message is displayed.
A small improvement would be, when you change the title, the slug also would change automatically.
Hi, I've noticed that when you check a category for a blog post, the selected Category does not stay checked when you return to the post to edit again - if you then save the post, there are no categories assigned.
There is a forum topic here.
This seems to be CMS wide, not just the Blog plugin, but have posted the issue here as this plugin contains the issue.
Thanks
Hello,
I am trying to setup the featured image as the og:image. How can this be done?
In the facebook debugger I can see the featured image in the post but once I share it, the shared image changes to the blog logo.
Thanks
I'd like posts with non-english character title.
but, auto-slug feature not working.
How I can fix it? is there any code for non-english user's slug?
I just installed a fresh copy of october and all of a sudden the blog image upload stopped working. It took a while to track down the problem.
With parsedown~1.1.2, Markdown parses
![1](image)
as
<img alt="1" src="image" />
as expected by the TagProcessor filter.
When installing, I got parsedown~1.3 and now the Markdown parser returns
<img src="image" alt="1" />
thus breaking the regexp in the TagProcessor callback that replaces the slug img
tag with the proper markup for Dropzone.
I haven't tracked down exactly which build of erusev/parsedown that changes the order of the attributes, but there have been a lot of new versions the last few days.
Route: /backend/rainlab/blog/posts/create
Rendered: "Error in exception handler."
If creating a blog post and you let it "autoset" (ie, you don't specify anything manually) the published on date. It auto filled in "1999-12-31 18:00:00". This is obviously the wrong date.
How i can display attachment item in my posts list?
Please fix the documentation here.
Current (broken) code sample:
[blogPosts]
categoryFilter = ":slug"
Working (fixed) code sample:
[blogPosts]
categoryFilter = "{{ :slug }}"
Hey, I was wondering if there is an easy way to migrate from Wordpress to Blog! I'm planning on moving it, but I don't have much free time for it, if there is a way, please enlighten me! Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.