26

Re: mbBlog - Blog system

Thanks for help but the problem still occurs with utf-8 and ISO-8859-1. When I use a sign like "à é è" now it cuts the word and the rest of the sentence is not displayed. E.g. "des données" becomes "des donn".

I only have to deal with this problem in mbBlog plugin, the charset in the test website's layout is set to charset=ISO-8859-1 and works well.

Thumbs up

Re: mbBlog - Blog system

Do you have it online somewhere so we can take a look?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

28

Re: mbBlog - Blog system

mvdkleijn wrote:

Do you have it online somewhere so we can take a look?

Other elements:

- when I add text directly into the database (phpmyadmin) the "é" is displayed like "é" on the blog page.

- Apart from the blog plugin, the other pages of the website give a warning when I validate: "The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation."

Can that warning be the cause?

Any ideas?

Thanks.

Last edited by Apache (2010-11-19 22:35)

Thumbs up

Re: mbBlog - Blog system

@Apache - I would highly recommend to switch to UTF-8, this is most likely the cause of your problem.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

In website development, its best to make sure all parts of your setup are using UTF-8. From DB to HTTP server to the actual html page. If the problem still exists after you've switched to utf-8, we can look further into the problem.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: mbBlog - Blog system

The responce headers I receive are iso-8859-1, those headers are HTTP headers.
Include this in your .htaccess:
AddDefaultCharset UTF-8

And it should send all pages as UTF-8.

Re: mbBlog - Blog system

Actually, that line is already in Wolf's .htaccess file. It could be that his server admin simply doesn't allow him to specify it. (in that case, complain to your server admin and have him change to UTF-8)

You still need to set the HTTP headers too by the way!

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

32

Re: mbBlog - Blog system

Thanks for help.

Martijn, I switched to UTF-8. Unfortunately that didn't help. Then I went back into the database and set mbblog's "collation" to "binary" instead of the "latin1_swedish_ci" that was mentioned. Seems that solved the problem.

Thumbs up

33

Re: mbBlog - Blog system

Yay, I finally joined the wolfcms forum. I'm sorry that I'm joining on a bad note though.

I've just done a fresh install of WolfCMS so I'm sorry to begin with if any of the following is just something I haven't done that I'm supposed to have with a fresh install. I have been playing with WolfCMS for about a month now and am loving it. I was dying for a simple CMS for simple sites and didn't want to use things like joomla for the simple projects.

I'm not sure if I'm doing something wrong, but I'm having trouble with the plugin. When I set the slug to nothing in the mbBlog settings, nothing changes on the home page.. it's still the home page.

If I set it to, well I used "blog", going to domain.com/blog pulls up the list of blog posts. Great until you click one, it produces a 404 error.

A suggestion, I like the intro option, that's incredibly useful for my end goal. But I'd like it if it worked like your other plugins where you place code where you want the blog list to appear, and then have it create pages (without it being pages because that was the goal.. but like pages you don't see in the main "pages" tab..). Sorry for not explaining very well.

Anyway, keep up the good work. I hope you don't mind, but I was using one of your plugins to learn how to build my own plugins.

Bah! Humbug!

34

Re: mbBlog - Blog system

dover wrote:

If I set it to, well I used "blog", going to domain.com/blog pulls up the list of blog posts. Great until you click one, it produces a 404 error.

Encountered a similar problem some time ago. Have a look at the url in the address bar when you get the error. There was a part of the url missing for me. Then check the bloglist and viewblog files within the mbblog directory and adapt the url of the posts there. Then it should work.

Last edited by Apache (2010-11-19 22:36)

Thumbs up

35

Re: mbBlog - Blog system

Does someone have a working version of "mbBlog - Blog system" for Wolf 0.7.3 ?

Thumbs up

36

Re: mbBlog - Blog system

It's not working for you!?
Anyway, Mike is "out" until mid February, so the plugin won't be updated before. In meantime, what is the problem? Do you get some errors or it's just won't work!?

Wolf CMS Paper Guy
Wolf CMS related blog / journal at Project 79 | Wolf CMS Docs

37

Re: mbBlog - Blog system

jackie wrote:

It's not working for you!?
Anyway, Mike is "out" until mid February, so the plugin won't be updated before. In meantime, what is the problem? Do you get some errors or it's just won't work!?

jackie,

I installed it again and it works now! Just had to adapt the pagination to work properly.

With debug on it shows some "Strict Standards: Non-static method" stuff but it's just on a test install so not a real problem.

Thumbs up

Re: mbBlog - Blog system

Just wondering if anyone has mbBlog working on v0.7.5?
I installed it but when accessing the blog on the front end all I get is a blank page.

I set the option "Blog Path" to blog and then tried to access via www.myurl.com/blog but just get a blank page.

Tried setting debug on but I get nothing.

Anyone shed any light?

Thanks

Ian

Thumbs up

Re: mbBlog - Blog system

Does your HTTP server's error log show anything?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: mbBlog - Blog system

Nope nothing in the error log.

Access log shows:

domain.co.uk XXX.XXX.XXX.XXX - - [07/May/2011:16:04:02 +0100] "GET /blog HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16"

domain.co.uk XXX.XXX.XXX.XXX - - [07/May/2011:16:04:03 +0100] "GET /favicon.ico HTTP/1.1" 404 1072 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16"

Bit baffled by this one!

Thumbs up

Re: mbBlog - Blog system

JBoostR wrote:

Just wondering if anyone has mbBlog working on v0.7.5?
I installed it but when accessing the blog on the front end all I get is a blank page.

I set the option "Blog Path" to blog and then tried to access via www.myurl.com/blog but just get a blank page.

Tried setting debug on but I get nothing.

Anyone shed any light?

Thanks

Ian

Just installed WolfCMS and mbblog and have noticed the same problem. Makes WolfCMS as a whole pretty much useless for me, as I need a blogging platform and that seems to be the only one (I can't figure out a way to make WolfCMS on it's own act as a usable blog for many users)

Anyway, I investigated a little bit, and I found it seems that when the page is loaded. Here's what I have so far:

From main.php it runs:

    if (Dispatcher::hasRoute($uri)) {
        Observer::notify('dispatch_route_found', $uri);
        Dispatcher::dispatch($uri);
        exit;
    }

with $uri equal to '/' ...which seems correct from my understanding.

From there dispatcher heads into:

        // Is there a literal match? If so we're done
        if (isset(self::$routes[$requested_url])) {
            self::$params = self::splitUrl(self::$routes[$requested_url]);
            return self::executeAction(self::getController(), self::getAction(), self::getParams());
        }

which of course goes to executeAction, which gets to:

        $controller->execute($action, $params);

where $action is 'mbblog' and params is a single element array, element 0 being 'index'

This then runs mbblog/MbblogController.php, which eventually runs it's 'index()' function, getting to this section of code at the end:

        if(defined("CMS_BACKEND"))
        {
               $this->display('mbblog/views/admin/index', $this->mbvars);
        } else
        {               
            $this->executeFrontendLayout();
            exit;
        }

where it takes the second path (else), runs executeFrontendLayout, which gets to this if block:

        if ($layout = $stmt->fetchObject()) {
        // if content-type not set, we set html as default
            if ($layout->content_type == '')
                $layout->content_type = 'text/html';

            // set content-type and charset of the page
            header('Content-Type: '.$layout->content_type.'; charset=UTF-8');

            // Provides compatibility with the Page class.
            // TODO - cleaner way of doing multiple inheritance?
            $this->url = CURRENT_URI;

            // execute the layout code
            eval('?>'.$layout->content);
        }

which it skips because $layout is undefined...then it drops out of the function and exits.

Thumbs up

42

Re: mbBlog - Blog system

urza9814 wrote:

... Makes WolfCMS as a whole pretty much useless for me, as I need a blogging platform and that seems to be the only one (I can't figure out a way to make WolfCMS on it's own act as a usable blog for many users) ...

Hi urza9814 - and welcome to the forums!

Is there a reason that Wolf's "out of the box" blogging capability won't work for you? I haven't used this plugin, though, so not sure what it offers that a vanilla Wolf install wouldn't. Maybe if you describe what functionality you're after, we can see if there is another way of achieving it without the frustrations you've encountered with the plugin.

Re: mbBlog - Blog system

I'm honestly not sure what this plugin offers either; I'm just hoping when I get it installed, it'll be what I need. But basically, I'm trying to set up a blog that will have a lot of different writers, and I want two things: first, users being able to register their own accounts, which doesn't seem to be possible on WolfCMS; and second is an easier way for users to login and make a post. It appears under the default WolfCMS that you can't give someone rights to JUST make posts and not have rights to edit the entire site, and there's no login link, no intuitive post function...basically I feel like I'd probably have to show every person who's going to be using it how to actually make a post...which isn't going to be feasable.

[edit]:
And now that I've got it working...this plugin doesn't help at all...

Last edited by urza9814 (2012-01-12 00:29)

Thumbs up

Re: mbBlog - Blog system

Also, I seem to have found the problem. I'm using the default 'Wolf' layout...it's attempting to run the following SQL query:

SELECT content_type, content FROM layout WHERE name = 'wolf';

which as no results. 'wolf' needs to be capitalized. To fix this, open the 'MbblogController.php' file (in the mbblog folder) and look for the following line (around line 450):

        $sql = 'SELECT content_type, content FROM '.TABLE_PREFIX.'layout WHERE name = '."'$this->frontend_layout'";

and add LOWER() around name, so it looks like this:

        $sql = 'SELECT content_type, content FROM '.TABLE_PREFIX.'layout WHERE LOWER(name) = '."'$this->frontend_layout'";

Also, for anyone else trying to use this plugin with SQLite, as I am, you'll want to make the following change to enable.php:

change this:

// setup the table
$table1 = "CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."mbblog` (
  `id` int(10) NOT NULL auto_increment,
  `posttitle` varchar(255) NOT NULL,
  `urltitle` varchar(255) NOT NULL,
  `author` varchar(50) NOT NULL,
  `date` int(10) NOT NULL,
  `body` longtext NOT NULL,
  `shortbody` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;";

to this:

// setup the table
$table1 = "CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."mbblog` (
  `id` INTEGER PRIMARY KEY,
  `posttitle` varchar(255) NOT NULL,
  `urltitle` varchar(255) NOT NULL,
  `author` varchar(50) NOT NULL,
  `date` int(10) NOT NULL,
  `body` longtext NOT NULL,
  `shortbody` text NOT NULL
)";

Thumbs up

Re: mbBlog - Blog system

urza9814 wrote:

first, users being able to register their own accounts, which doesn't seem to be possible on WolfCMS; and second is an easier way for users to login and make a post.

Please try if the Registered Users plugin suits your needs.

urza9814 wrote:

It appears under the default WolfCMS that you can't give someone rights to JUST make posts and not have rights to edit the entire site

Please try the Roles Manager plugin for this kind of right management.

I'm pretty sure you also want to tryout the Account plugin.

46

Re: mbBlog - Blog system

urza9814 wrote:

... But basically, I'm trying to set up a blog that will have a lot of different writers, and I want two things: first, users being able to register their own accounts, which doesn't seem to be possible on WolfCMS; and second is an easier way for users to login and make a post. It appears under the default WolfCMS that you can't give someone rights to JUST make posts and not have rights to edit the entire site, and there's no login link, no intuitive post function...

Glad you got it working, and thanks for sharing the code for those who would like to make use of mbBlog - much appreciated!

As for your goals in relation to Wolf:

1. multi-authored blog - we readily admit that Wolf is not an optimized, dedicated blogging engine. It's a light, simple, but powerful CMS that can do many things, "blogging" among them. If you want a dedicated platform for your scenario, then Habari comes to mind as one attractive option.

2. register own accounts - You would in any case be better off using Wolf's default "archive" plugin bundled with the out-of-the-box install in conjunction with the Accounts plugin. It's what manages users accounts on this site.

3. permissions - are very flexible, but you need to learn a bit about how they work, I guess. Have a look at the documentation in the wiki, and the very nice Roles Manager plugin that makes managing permissions quite simple.

4. teaching users - I suppose there will always be something to show them! wink But it is pretty simple, and if you want to show some simple documentation in the backend, you could either use the Notes plugin for that, or I think someone even devised a "documentation" plugin!

Anyway - those are just some quite thoughts and responses. Hope it's a help!

Re: mbBlog - Blog system

Hmm. Thanks for the tips. Hibari's a no-go (needs a higher PHP version than our crap University servers have installed, and I'm trying to avoid paying for hosting)...the accounts plugin doesn't appear to allow users to create their own accounts...but I'll look around some more and see what I can come up with. Not entirely opposed to modifying plugins if it's not too much effort, but we're trying to have something up by next week.

Thumbs up

Re: mbBlog - Blog system

urza9814 wrote:

Hmm. Thanks for the tips. Hibari's a no-go (needs a higher PHP version than our crap University servers have installed, and I'm trying to avoid paying for hosting)...the accounts plugin doesn't appear to allow users to create their own accounts...but I'll look around some more and see what I can come up with. Not entirely opposed to modifying plugins if it's not too much effort, but we're trying to have something up by next week.

The Registered Users plugin provides account self registration features.
The Account plugin provides a "My Account" page for users to which other plugins (or custom code) can add actions and profile info.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.