Recent Topics

1 Dec 13, 2011 23:06    

My b2evolution Version: 4.1.x

I'm trying to implement a Google +1 button on my site for blog posts. Since I haven't found any plugins that do this, I'm working on the implementation myself. What would be the php code that I would add to my custom skin to get the permanent url, post title and excerpt? Thanks

2 Dec 14, 2011 16:39

$Item->get_permanent_url();
$Item->get('title');
$Item->get('excerpt');

3 Dec 14, 2011 23:09

I'm including the code in the _item_block.inc.php file in my custom skin right after the post content (so the user can +1 individual posts). All three are coming up with blank responses. If I use $Item->permanent_url(); I do get the correct url for each post.

4 Dec 14, 2011 23:20

The snippets I wrote 'return' values, if you want do display them use this instead

$Item->permanent_url();
$Item->disp('title');
$Item->disp('excerpt');

Example

my title is: <?php $Item->disp('title'); ?>
my title is: <?php echo $Item->get('title'); ?>


Form is loading...