PDA

View Full Version : Content of addon wrong site of menu


eon
12-22-2005, 03:04 PM
I try to convert my modification of Pixelpost 1.4.3 to an addon for Pixelpost 1.5.
But my form is been showed above the menu.
Image:
http://tweakers.net/ext/f/5f4ec4ccd360563f5ddfa7821ada14f8/full.png

This are the setting of the addon.
// Same info as non admin addons
$addon_name = "Admin Addtext addon";
$addon_description = "Use text instand of an image. Useful as an introduction on your photo's";
$addon_version = "0.5";

// The workspace. Where to activate the function inside index.php
$addon_workspace = "admin_main_menu";

// menu where the addon should appear in admin panel. in this case: images menu
$addon_menu = "NEW TEXT";

// What would be the title of submenu of this addon: 12cropimage
$addon_admin_submenu = "";

// What is the function
$addon_function_name = "";

Anyone an idea to solve this?

Connie
12-22-2005, 03:36 PM
eon,

I am sure there is no existing menue
"// menu where the addon should appear in admin panel. in this case: images menu
$addon_menu = "NEW TEXT";

where you wan to integrate your Addon? NEW TEXT is no existing menue ...

eon
12-22-2005, 03:54 PM
Oke, I made a new one. This ia a new area for me. FUN :)
I want to made a new menu "New Text" with his own content.
// Same info as non admin addons
$addon_name = "Admin Addtext addon";
$addon_description = "Use text instand of an image. Useful as an introduction on your photo's";
$addon_version = "0.5";

$addon_workspace = "admin_main_menu";
$addon_menu = "NEW-TEXT";
add_admin_functions('',$addon_workspace,$addon_men u,'');

$addon_workspace = "admin_main_menu_contents";
$addon_function_name = "addtext";
$addon_admin_submenu = "";
// add the function
add_admin_functions($addon_function_name,$addon_wo rkspace,$addon_menu,$addon_admin_submenu);

Now I have the menu, but no content. :)

eon
12-22-2005, 04:14 PM
Now I tried the admin_newitem.php code. But here I have the same problem.
I see the menubutton, but no content. :confused:

Used code:
<?php
$addon_name = "test";
$addon_description = "test";
$addon_version = "test";

// add the new page title to the main menu
$addon_workspace = "admin_main_menu";
$addon_menu = "NEWITEM";
add_admin_functions('',$addon_workspace,$addon_men u,'');

// assign a function name to make the content of the new page
// add the function
$addon_workspace = 'admin_main_menu_contents';
$addon_function_name = 'new_item_show_page';
$addon_admin_submenu = "";

add_admin_functions($addon_function_name,$addon_wo rkspace,$addon_menu,$addon_admin_submenu);

// the function to write the content of the new page
function new_item_show_page()
{
global $addon_admin_functions;
global $pixelpost_db_prefix;
if ($_GET['view']=='newitem'){
echo "
<div class='caption'>
NEWITEM
</div>
<div class='jcaption'>
Some Section Title...
</div>
";
echo "<p/> This is really a <b>new page</b>!!";
}// end if

}

?>

eon
12-22-2005, 08:26 PM
Find the solution here (http://forum.pixelpost.org/showthread.php?t=2985).