Some instructions to doing your test action.-
Backup any files i tell you to edit before trying this.
Open the index.php
Search For
'sticky' => array('LockTopic.php', 'Sticky'),
Add after
'test' => array('test.php', 'test'),
Open up the Modifications.english.php file in your languages directory.
Add this after another text string on the page.
$txt['test'] = 'Test';
Then create the test.php Page
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function test()
{
global $context, $mbname, $txt;
//Load the main test template
loadtemplate('test');
//Load the main test template
$context['sub_template'] = 'main';
//Set the page title
$context['page_title'] = $mbname . ' - ' . $txt['Test'];
}
?>
Next Create the test.template.php page.
<?php
/*
Test Page
*/
function template_main()
{
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;
echo'
<b>Add the code of the object you want displayed in between the echo tag</b>
';
}
?>
Where you see Add the code of the object you want displayed in between the echo tag
you add the code of the object that will be displayed in that action.
test.php Goes in the sources directory , test.template.php goes in the default themes directory.
Caps or small letters does matter!! if i dont use a capital letter you shouldnt either!!
Hope this is useful to someone.
Those were the instructions and you must follow all those directions to add a action correctly. It looked to me like you only did test.php and test.template.php so you must follow the other files as well.
Thanks,
Brianjw