Blog Plugin for WonderCMS 3.0.0

User avatar
StephanStanisic
Posts: 37
Joined: Fri Jul 05, 2019 8:51 pm

Blog Plugin for WonderCMS 3.0.0

Post by StephanStanisic »

Hi all!

This is a alpha version of the blog plugin that I've been working on today.

It does things a lot different that the previous attempts on creating a blog plugin (by the community).
This plugin has it's own database (not sure if that is the best solution yet), and with this you can keep the pages.

Take a look: https://www.blog.wonder.stanisic.nl/

Only for WonderCMS 3.0.0 (make sure to have a new copy of dev-3.0.0, see viewtopic.php?f=17&t=1255)

Image
Image
Image

Todo:
- Remove blog posts
- More? Open github issue.

Github: https://github.com/StephanStanisic/plugin-simpleblog
Last edited by StephanStanisic on Mon Oct 21, 2019 2:25 pm, edited 1 time in total.
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Blog Plugin for WonderCMS 3.0.0

Post by wiz »

Good work Stephan, really glad to see an apha of something being wanted for so long by the community.

1. I think I've managed to find a bug, when trying to create a new post (with WonderCMS installed in a subfolder), the incorrect path is called, returning in a 404 post:
Request URL:https://www.example.com/plugins/simpleblog/new.php
should be
Request URL:https://www.example.com/wcms-installed- ... og/new.php
Similar thing when trying to save content inside a blog post. Possibly a slug function issue?

2. Currently (security wise), you only check if the user is logged in. I would add the token check as an additional measure, to prevent phishing an admin by clicking on a shortened url that would take him to domain.com?new.php&page=something
Code snippet to help you out.

Code: Select all

$this->hashVerify($_POST['token'])
I would include the above anywhere there's a post.

Other than the above and the things you mentioned (deleting). I'm guessing the next most searched thing for this would be "search" for the blog section. I'll see if there's anything valuable I can produce. :)

I'll post the issues on GitHub.

Awesome work Stephan!
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: Blog Plugin for WonderCMS 3.0.0

Post by turboblack »

where exactly can I download the repository for which it all works? because I have version 3.00 and it doesn’t work for both local and hosting (I check on several at once). the plugin installs but nothing happens.
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Blog Plugin for WonderCMS 3.0.0

Post by wiz »

You can download the latest 3.0.0 version from: https://github.com/robiso/wondercms/arc ... l3.0.0.zip

After you download and unzip - login to your website and open Settings->Plugins.
From the list select "simple blog".

If the above doesn't work for you, please let me know what version of PHP you are using.
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: Blog Plugin for WonderCMS 3.0.0

Post by turboblack »

I had the version that you threw off to me in the summer. I thought it was her. it was also called 3.0.0)))
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Blog Plugin for WonderCMS 3.0.0

Post by wiz »

It's about time we start increasing the number. :D
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: Blog Plugin for WonderCMS 3.0.0

Post by turboblack »

such corrections are needed:
the editor does not see the editing area on the blog.
when updating the plugin, the blog base is reset, the data must be re-entered
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Blog Plugin for WonderCMS 3.0.0

Post by wiz »

Thanks for the report turbo.

We already know about the editor, however the database being reset is something new. Will report and thanks again.
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Blog Plugin for WonderCMS 3.0.0

Post by wiz »

The bug with the blog database being reset is now fixed.

Login to your WonderCMS website and click "Check for updates" to see the new plugin update.
User avatar
turboblack
Posts: 198
Joined: Fri Sep 19, 2014 1:53 pm

Re: Blog Plugin for WonderCMS 3.0.0

Post by turboblack »

Fatal error: Uncaught Error: Cannot access protected property Wcms::$dataPath in C:\xampp1\htdocs\3\plugins\simple-blog\class.SimpleBlog.php:25 Stack trace: #0 C:\xampp1\htdocs\3\plugins\simple-blog\simple-blog.php(7): SimpleBlog->__construct(true) #1 C:\xampp1\htdocs\3\index.php(1022): include('C:\\xampp1\\htdoc...') #2 C:\xampp1\htdocs\3\index.php(120): Wcms->loadPlugins() #3 C:\xampp1\htdocs\3\index.php(15): Wcms->init() #4 {main} thrown in C:\xampp1\htdocs\3\plugins\simple-blog\class.SimpleBlog.php on line 25
http://old.net.eu.org/ Get ready to hamsterization! 8-) code takes less than a kilobyte! shock!
https://github.com/turboblack/HamsterCMS new version for PHP 8 with new templates
Post Reply