Results 1 to 2 of 2

Thread: Class property list addon

  1. #1
    Join Date
    Aug 2006
    Posts
    26

    Default Class property list addon

    Hi all!

    I'm writing addon for OR which conects to database and makes list of class property but i have one bug when you go to class where is some listings are it shows error
    Code:
    Fatal error: Call to undefined function: menuconfig_load_template() in d:\www\OR\include\class\template\core.inc.php on line 83
    I'm not professional so maybe some on gonna give me advise. Thanks

    p.s. i took menuconfig addon like example to teach addon writing!


    Code:
    <?php
    
    function categoryconfig_install_addon() {
    	// do nothing
    }
    
    function categoryconfig_show_admin_icons() 	{	
    	// do nothing
    }
    
    function categoryconfig_load_template()
    	{
    	$template_array = array('addon_categoryconfig_link');
    	return $template_array;
    	}
    
    function categoryconfig_run_action_user_template()
    	{
    	switch ($_GET['action'])
    		{
    		case 'addon_categoryconfig':
    		$data = categoryconfig_display_addon_page();
    		break;
    		default:
    		$data = '';
    		break;
    		} // End switch ($_GET['action'])
    	return $data;
    	}
    
    function categoryconfig_run_action_admin_template()
    	{
    	switch ($_GET['action'])
    		{
    		case 'addon_categoryconfig_admin':
    		$data = categoryconfig_display_admin_page();
    		break;
    		default:
    		$data = '';
    		break;
    		} // End switch ($_GET['action'])
    	return $data;
    	}
    
    function categoryconfig_run_template_user_fields($tag = '')
    	{
    	switch ($tag)
    		{
    		case 'addon_categoryconfig_link':
    		$data = categoryconfig_display_addon_link();
    		break;
    		default:
    		$data = '';
    		break;
    		} // End switch ($_GET['action'])
    	return $data;
    	}
    
    /**
     * Addon Specific Functions
     **/
    
    function categoryconfig_display_addon_link()
    	{
            global $conn, $lang, $config;
            require_once($config['basepath'].'/include/misc.inc.php');
            $misc = new misc();
            $user = $misc->make_db_extra_safe($user);
            $sql33 = "SELECT class_id,class_name FROM default_en_class order by class_rank";
            $recordSet33 = $conn->Execute($sql33);
    
            while (!$recordSet33->EOF) {
            $class_id = $misc->make_db_unsafe ($recordSet33->fields[class_id]);
            $class_name = $misc->make_db_unsafe ($recordSet33->fields[class_name]);
            $display .= "<li><a href=\"index.php?action=searchresults&pclass[]=$class_id\">$class_name</a></li>";
            //$display .= "<li>";
            $recordSet33->MoveNext();            
            }
            return $display; }
    
    
    function categoryconfig_display_addon_page()
    	{
    	// do nothing
    	}
    
    function categoryconfig_display_admin_page()
    	{
    	// do nothing
    	}
    
    ?>

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Class property list addon

    Sounds like you still have a tag from the menuconfig addon in one of your template files but no longer have that addon. That or you changed the function names in the addon but left it in the menuconfig folder. The folder name must be the same as the addon name.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •