MyBB Community Forums

Full Version: MyBBlog v1.1.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
It should be possible to change nearly everything related to MyBBlog with those hooks - I've one more thing in mind, which I'll add with the next version, but most of the plugin can be changed/modified/extended.
(2014-11-06, 11:42 AM)JonesĀ H Wrote: [ -> ]It should be possible to change nearly everything related to MyBBlog with those hooks - I've one more thing in mind, which I'll add with the next version, but most of the plugin can be changed/modified/extended.

nice I'm looking forward
Images are not working correctly :L
http://abstractos.net/mybblog.php
That's what mybb's format_avatar function returns - and if the user has no avatar it'll use the default avatar. And if you specified an invalid default avatar the image will be broken - not only in mybblog.
No, I mean images on articles
Here don't work:
http://abstractos.net/mybblog.php
But here ir do:
http://abstractos.net/mybblog.php?action=view&id=1

I think u missed something like ";"
And how should I've guessed that from your first post?

Anyways, that's simply caused by the "preview" function, it only shows the first 100 chars which is in the middle of the img tag.
You can either increase the preview size or disable parsing for the preview to fix that:
Modify inc/plugins/mybblog/modules/index.php, Line #27:
$preview = Helpers::preview($article->content);
to
$preview = Helpers::preview($article->content, [length], [append], [parse]);
[length] is the number of characters used as preview (default: 100)
[append] is the string which is appended to the preview (default: '...')
[parse] is a boolean whether or not the message/preview is parsed (default: true)

If you want to disable the parser and show the first 500 characters your line would look like that:
$preview = Helpers::preview($article->content, 500, '...', false);
Its any form to make that BBcode doesn't count as caracters and automatic close the bbcode? MyBB Really needs that and you can do it for your plugin.
By the way, I will just make a large number of caracters to disable preview, thanks for your support.
It's on my todo: http://jonesboard.de/todo-list/ But that's not that easy Wink
Instead of increasing it to a large numbre you should make it dynamically:
$preview = Helpers::preview($article->content, strlen($article->content));
Or if you want to disable parsing too:
$preview = $article->content;
I didn't look into it, but should it be possible to put the blog entries into the portal? Eventually for longer articles with a 'Read more' button?
You'd need to code a new module (it isn't possible by default).
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16