Recent Topics

1 Jun 15, 2006 00:41    

Hello,

I want to use a render plugin to trigger the display of additional content (image, form) for each post. Current b2evolution version is 0.9.2.
How can I access the post_renderers field of a post? I don't want to display the names of the render plugins but I want to check if a special plugin was used.

Thanks in advance
Hardy

2 Jun 15, 2006 10:30

Where in the code are you trying to access this information? (in your skin ? in a plugin renderer function?)

¥

3 Jun 15, 2006 10:36

Hello,

I try to access it in a skin. ($Item->xy seems to be only for output).
In the end it should work this way:
If (plugin used) {display icon; echo form}

4 Jun 15, 2006 10:41

In that case you need something like :-

<?php
if ( strpos( $Item->renderers, '<renderer name>' ) )
{
    // do action
}
?>

¥

5 Jun 15, 2006 11:29

Your solution works for everything but renderers.
For renderers I have to check if it is in the array:


<?php 
if ( in_array( '<renderer name>' , $Item->renderers) )
{
    // action;
}
?>


Thank you for your help.

6 Jun 15, 2006 11:32

lol, oops, forgot it returned an array :p

Glad you solved it ;)

¥


Form is loading...