| « New b2evo out: Digg it | Moving on » |
Sideblog Plugin for b2evolution
Purpose
The Sideblog plugin allows you to insert another blog in the sidebar of your skin with simple plugin call. A sidebar blog can be used for brief posts, links, photos or any other list you want arranged chronologically.
Installation
Requires b2evolution 1.8 or later
- Download this file: _sideblog.plugin.txt.
- Replace the .txt in the filename with .php and upload it to your b2evolution plugins folder.
- In the backoffice, go to Settings > Plugins and find Sideblog in the list. Click "install".
Usage
To use the plugin, just add this code to the skin where you want the sidebar blog to appear:
<?php
// MostComments plugin:
$Plugins->call_by_code( 'sideblog', array(
'limit' => 5,
'blog' => 3,
) );
// Add parameters in the array.
?>
Limit is the number of posts you want to show. Blog is the blog you want to display there. Refer to the plugin source for other parameters you can adjust.
42 comments
One request, though: is there something I can add to the code so that it also displays the publish date of the entries on the referenced blog, maybe next to the post title?
I installed the plugin and put the code into (among the sidebar-items) the _main.php file of the custom-skin. Nothing appears.. What am I doing wrong?
What's the deal?
Just a simple question. I would insert with the help of sideblog plugin static info about contact, bio and site description.
How should I do this to see only the title on the sidebar? It is possible? I am interesting any possibility.
Thanks in advance!
Bonus question: This nice and clean skin (used on this page) available somewhere to b2evo 1.8.1?
I try to use for one categorie (add 'cat' => 1,), but don´t work.
Its possible?
New question :)
Have a way to limit the numbers of characters of the post to show? If you have a long post, limit to 100 characters to show and one link to "more".
I try this, but dont work. I change the code, upload the file, uninstall and reinstall the plugin. The code is:
if ($params['showauthor']) {
echo ' by ';
$Item->author();
}
if ($params['showpostcontent']) substr($Item->content( 1, false ), 0, 100);
echo $params['line_end'];
In _main.php, I try:
'showpostcontent' => 1,
'showpostcontent' => 100,
'showpostcontent' => false,
and without 'showpostcontent'
Have any other change in the source?
// MostComments plugin:
$Plugins->call_by_code( 'sideblog', array(
'limit' => 5,
'blog' => 1,
'showpostcontent' => false
) );
// Add parameters in the array.
Nothing shows up and I don't know what to do...
I use 1.8.2
The plugin works great here, just this modification don´t.
Thanks for the help and the plugin!
One question: can the limit be set for # of posts, not # of days?
But when I click on Plugins tab in Admin, or when I try to modify a user, I get the following error:
Warning: Cannot modify header information - headers already sent by (output started at _sideblog.plugin.php in _menutop.php on line 38.
Have you any hint?
It happens if the sideblog is installed twice!
Sorry.
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: timestamp_max in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: timestamp_min in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: unit in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: orderby in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: author in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: w in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: m in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: show_statuses in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 136
[Wed Dec 13 22:11:29 2006] [error] PHP Notice: Undefined variable: blog in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 114
[Fri Dec 15 18:52:19 2006] [error] PHP Notice: Undefined variable: blog in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 114
[Fri Dec 15 18:52:19 2006] [error] PHP Notice: Undefined variable: blog in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 114
[Fri Dec 15 18:52:18 2006] [error] PHP Notice: Undefined variable: blog in /home/comlist/public_html/plugins/_sideblog.plugin.php on line 114
Thanks Broc.
Here is the code...
function wordCut($text, $limit, $msg){
if (strlen($text) > $limit){
$txt1 = wordwrap($text, $limit, '[cut]');
$txt2 = explode('[cut]', $txt1);
$ourTxt = $txt2[0];
$finalTxt = $ourTxt.$msg;
}else{
$finalTxt = $text;
}
return $finalTxt;
}
if ($params['showpostcontent']) #$Item->content( 1, false);
echo '
';
echo wordCut($Item->content, 550);
echo '
';
echo '';
echo '... read more';
'';
to replace this....
if ($params['showpostcontent']) $Item->content( 1, false );
A sample can be seen here:
http://www.broclee.com/blog/index.php
Please feel free to make this available if you would like Dan. Thanks for the great add on. :)
Enjoy.
Broc
Thanks,
This is great. Thanks for sharing.
can teach my how to put the friends list into your side bar... i want to add to mine.
thanks for the plugin, it might be the first one i tried to use that just worked right away. The only thing is it doesn't go directly to external links. it goes to the actual blog post on my site (which is just a link) and then you have to click on the title again to follow through. is there any way to bypass this? and go through the external link?
thanks a bunch.
mike. g.
In other words, in the code that gets inserted in the skin, can I do something like:
'limit' => 5,
'blog' => 3,
'catarray' => 70,71,array(),
in one skin, and then
'limit' => 5,
'blog' => 4,
'catarray' => 75,78,array(),
in another skin, or do I need to install two separate instance of the sideblog plugin, and call each of them by a different code (i.e. sideblog1 and sideblog2) ? If it can be done as I described above, is my syntax correct?
'blog' => 3,
for both skins, but is the syntax of the 'catarray' correct?
That would be awesome for the purpose I am using it for, as I have a poetry blog I have setup in the SideBlog plugin.
After copying and installing the plugin, I put
$Plugins->call_by_code( 'sideblog', array(
'limit' => 5,
'blog' => 1,
) );
in _sidebar.inc.php of my skin
but received the following error:
Fatal error: Call to undefined function Blog_get_by_ID() in /nobel/raoul978/b2evolution/blogs/plugins/_sideblog.plugin.php on line 117
Since i'm a beginner in php, I would really appreciate your help with this!
:)
I'm running 2.4.0.
Leave a comment
Search Cloud
- i hate you songs
- songs for breaking up
- fake companies
- top 100 christian songs
- list of fake companies
- song about breaking up
- angry break up songs
- best angry break up songs
- songs about breaking up
- best broken heart songs
- country break up songs
- angry songs
- twit audible recommendations
- good worship songs
- hate you songs
- best presidents
- top worship songs
- sad break up songs
- best and worst presidents
- best breaking up songs
- break up songs
- religious
- fake company
- best break up songs
- 50 best break up songs
- top 100 break up songs
- good break up songs
- 50 best break up songs lyrics
- best break up song
- best angry songs
- fake company names
- b2evolution skins
- top 100 worship songs
- twit audible list
- emma games
- songs breaking up
- breaking up songs
- list of best presidents
- best breakup songs
- best moving on songs






Recent comments