Safe plugin?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
chief123
Regular
Posts: 5
Joined: Mon May 03, 2004 12:38 pm

Safe plugin?

Post by chief123 »

This is in reference to the thread at http://php-blog.sourceforge.net/forums/ ... .php?t=148 where it seemed that at the end it had gotten off topic a bit so I decided to post here.

Garvin says to use a real plugin for safety and reliability. Can anyone comment on using this code which is supposed to include a trusted script in the sidebars that generates a random quote.

Since I did this myself I wanted to make sure that this wasn't way out of whack despite whether it works or not.

Thanks for any comments.

Code: Select all

<?php 

class serendipity_plugin_rquote extends serendipity_plugin { 
    function introspect(&$propbag) 
    { 
        $propbag->add('name',          'Random Quote'); 
        $propbag->add('description',   'Lists random quote every time page is refreshed'); 
    } 

    function generate_content(&$title) 
    { 
        $title = "Quote of the day"; 
        
        include ("randomquote.php"); 
        
    } 
} 

?> 
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, that's perfectly the way it's supposed to be. :-)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply