The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
pages sidebar disappearing - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: pages sidebar disappearing (/showthread.php?tid=2148)



pages sidebar disappearing - J-Gamer - 2011-09-06

I'm trying my hands on making a plugin, and I have encountered a problem already...
I added a side menu on the "Pages" tab, but when I click it, all I get is the output of the function but all the side menu's are gone(i.e.: "View all pages","Create new page" and "Activities")
Here's the full code:
Code:
<?php
/*
Plugin Name: Activities
Description: Display activities
Version:
Author: J-Gamer
Author URI:
*/

# get correct id for plugin
$thisfile=basename(__FILE__, ".php");

register_plugin(
    $thisfile,    // ID of plugin, should be filename minus php
    'Activities',    // Title of plugin
    '',    // Version of plugin
    'Jeroen De Busser',    // Author of plugin
    '',    // Author URL
    '',    // Plugin Description
    '',    // Page type of plugin
    'activities_show'    // Function that displays content
);

add_action('pages-sidebar', 'createSideMenu', array($thisfile, 'Activities'));

# functions
function activities_show() {
    echo '<p>Activities will be edited here</p>';
}
?>

GS version: 3.0


pages sidebar disappearing - mvlcek - 2011-09-06

J-Gamer Wrote:I'm trying my hands on making a plugin, and I have encountered a problem already...
I added a side menu on the "Pages" tab, but when I click it, all I get is the output of the function but all the side menu's are gone(i.e.: "View all pages","Create new page" and "Activities")

Add 'pages' as 7th parameter of register_plugin:
Code:
register_plugin(
    $thisfile,    // ID of plugin, should be filename minus php
    'Activities',    // Title of plugin
    '',    // Version of plugin
    'Jeroen De Busser',    // Author of plugin
    '',    // Author URL
    '',    // Plugin Description
    'pages',    // Page type of plugin <== which tab to show when plugin is displayed
    'activities_show'    // Function that displays content
);



pages sidebar disappearing - J-Gamer - 2011-09-06

Thanks! That fixed it. It's a shame that the functions necessary for plugin development aren't fully documented...


pages sidebar disappearing - mvlcek - 2011-09-06

J-Gamer Wrote:Thanks! That fixed it. It's a shame that the functions necessary for plugin development aren't fully documented...

Feel free to add more information to the wiki!
Any forum user can also enhance the wiki.


pages sidebar disappearing - J-Gamer - 2011-09-06

Other question: do you set this option to other things like
Files
Theme
Backups
Plugins

If you want it to work on the other tabs?

EDIT: it does :p(you only need to change the sidebar creation as well)

EDIT2: and what if you want a single plugin to have side menu links on multiple pages? You can only specify one page in register_plugin AFAIK...