In language/en/mods/ I made a file called donor_test.php which has:
Code: Select all
<?php
/**
*
* @package acp
* @version $Id: donor_test.php,v 1.0.0 2009/17/09 13:35 Havok $
* @copyright (c) 2009 Serious Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (empty($lang) || !is_array($lang))
{
$lang = array();
}
$lang = array_merge($lang, array(
// Donor Block
'ACP_PORTAL_DONOR_INFO' => 'Donor',
'ACP_DONOR_INFO' => 'Donor',
'ACP_DONOR_SETTINGS' => 'Donor block settings',
'ACP_DONOR_SETTINGS_EXPLAIN' => 'Here you can change the status of the donor block.',
'ACP_DONOR_BLOCK_SETTINGS' => 'Donor block display settings',
'PORTAL_DISPLAY_DONOR' => 'Display Donor Block',
'PORTAL_DISPLAY_DONOR_EXPLAIN' => 'Display the donor block on your portal.',
'PORTAL_DONOR_GOAL' => 'Monthly Goal',
'PORTAL_DONOR_GOAL_EXPLAIN' => 'Your monthly donation goal.',
'PORTAL_DONOR_DATE' => 'Due date',
'PORTAL_DONOR_DATE_EXPLAIN' => 'Your monthly goal due date.',
'PORTAL_DONOR_TOTAL_OVER => 'Total earnings',
'PORTAL_DONOR_TOTAL_OVER_EXPLAIN => 'Your total earnings for the month.',
));
?>
Code: Select all
if ($config['portal_donor'])
{
$template->assign_vars(array(
'S_DISPLAY_DONOR' => true,
'PORTAL_DONOR_GOAL' => $config['portal_donor_goal'],
'PORTAL_DONOR_DATE' => $config['portal_donor_date'],
'PORTAL_DONOR_TOTAL_OVER' => $config['portal_donor_total_over'],
));
}
Code: Select all
<?php
/*
*
* @version $Id: donor.php,v 1.0.0 2009/17/09 13:35 Havok $
* @copyright (c) 2009 Serious Grouo
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB') or !defined('IN_PORTAL'))
{
die('Hacking attempt');
exit;
}
/**
*/
$template->assign_vars(array(
'S_DISPLAY_DONOR' => true,
));
?>
Code: Select all
case 'donormod':
$display_vars = array(
'title' => 'ACP_PORTAL_DONOR_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_DONOR_SETTINGS',
'portal_display_donor' => array('lang' => 'PORTAL_DISPLAY_DONOR' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_donor_goal' => array('lang' => 'PORTAL_DONOR_GOAL' , 'validate' => 'string', 'type' => 'textarea:1:1', 'explain' => true),
'portal_donor_date' => array('lang' => 'PORTAL_DONOR_DATE' , 'validate' => 'string', 'type' => 'textarea:1:1', 'explain' => true),
'portal_donor_total_over' => array('lang' => 'PORTAL_DONOR_TOTAL_OVER' , 'validate' => 'string', 'type' => 'textarea:1:1', 'explain' => true),
)
);
break;
Code: Select all
'donormod' => array('title' => 'ACP_DONOR_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_DONOR_CONFIGURATION')),
And of course I made the necessary edits to styles/prosilver/template/portal/portal_body.html and put the block's html file in styles/prosilver/template/portal/block/.
My problem is in the ACP it displays the settings like:
PORTAL_DISPLAY_DONOR:
PORTAL_DONOR_GOAL:
etc...
Rather than what I set it to in donor_test.php in the mods folder.
I also added the ACP stuff to the Portal Administration part of the Portal ACP, they show up like that, but the custom section for the block does not show up in the ACP at all.
Did I forget something or do something wrong or what?
Thanks and sorry for this being so sloppy, lol.