Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Aiheen aloitti: wim_bo - lokakuu 20, 2006, 09:06:00 AP

Otsikko: Adding a download button to admin
Kirjoitti: wim_bo - lokakuu 20, 2006, 09:06:00 AP
Hello,

I'm trying to add a download section per board. So that i can upload certain documents and make them public for the specific board.

I've added a button on the admin-side in the category "Manage Boards".
I've added the following code to the documents:

Sources/ManageBoards.php
to function ManageBoards()
'add_download' => array('AddDownload', 'manage_boards')

and a new function called AddDownload()
function AddDownload() {

global $txt, $db_prefix, $sourcedir, $modSettings;

loadTemplate('ManageBoards');

require_once($sourcedir . '/Subs-Boards.php');

$context['sub_template'] = 'add_download';
$context['page_title'] = 'Download';

}


Themes/default/ManageBoards.template.php
a new function called tmeplate_add_download
function template_add_download()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo 'test';

}


And this is my problem. If i click the button i've added i don't see 'test'.
What is wrong, what do i need to change to see the 'test' on the screen.

There is no error or some kind, so i don't miss any function or something like that.

Can anybody help me?

If you need the full code of the documents, i can e-mail them.