• Hi I made this to use a program with wordpress.

    <?php
    /*
    Plugin Name: <font color="green">GWBBCODE Filter</font>
    Description: Parse gwbbcode in your content for WordPress
    Version: 1.0
    Author: T_Clauss
    */
    /*  Copyright 2008  T_Clauss  (email : T_Clauss@hotmail.com)
    
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */
    function Wp_gwbbcodeinintialize(){
        echo "<b>GWBBCODE Filter</b>gwbbcode was written by: <b>Liu Pi</b>For more information on gwbbcode visit: <b>http://gwshack.us/</b>More Options comming Soon...";
    }
    
    function addmyplugintoasubmenu() {
        add_submenu_page('options-general.php', 'GWBBCODE Filter Options', 'GWBBCODE Filter', 10, __FILE__, 'Wp_gwbbcodeinintialize');
    }
    add_action('admin_menu', 'addmyplugintoasubmenu');
    
    function Wp_gwbbcode($text) {
       $text = parse_gwbbcode($text);
          return $text;
       }
    add_filter('the_content', 'Wp_gwbbcode');
    ?>

    Now from the mysubmissions page when I click preiew i get an error 500.

    also to get gwbbcode to work i need to include this.

    if (!defined('GWBBCODE_ROOT')) {
    define('GWBBCODE_ROOT', './gwbbcode');
    require_once(GWBBCODE_ROOT.'/gwbbcode.inc.php');
    }

    Which I have inside <php? ?> in my index.php in wordpress, any suggestions? Posting from a form works fine just when doing the preview i get an error 500. I wasnt getting this b4 as it was working, all I did was change hosts. Same host different domain.

Viewing 1 replies (of 1 total)
  • Thread Starter t_clauss

    (@t_clauss)

    I will also not that if i remove this from my plugin everything works fine, I’m just confused now as I did have it working fine b4 no problems.

    function Wp_gwbbcode($text) {
       $text = parse_gwbbcode($text);
          return $text;
       }
    add_filter('the_content', 'Wp_gwbbcode');

    I am also using a modified i3theme. Which works w/o my plugin activated or those few lines.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: TDO Mini Forms] error 500 with a custom plugin’ is closed to new replies.