Custon Block ACP

Current Version: 2.0.2
Released: 2013-10-27
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked
User avatar

Topic author
talonos
Portal Specialist
Posts: 242
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Custon Block ACP

Post by talonos »

Your Portal Version: 2.0.1
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Advanced Knowledge
Boardlink: http://demo.pretereo-stormrage.co.uk/board2

What have you done before the problem was there?
Created a new module using the template system from the knowledge base.

What have you already tryed to solve the problem?
knowledgeboard with no prevail and also internet research still with no luck

Description and Message
Created a new portal module with acp. if i use

Code: Select all

	public function install($module_id)
	{
		set_config('board3_wowheroesregion_' . $module_id, 'eu');
		set_config('board3_wowheroesrealm_' . $module_id, 'stormrage');
		set_config('board3_wowheroesguild_' . $module_id, 'pretereo');
		return true;
	}
in the module it will work without problems.

trying to change them settings from ACP is not working at all.

here a snippet of my acp file.

Code: Select all

<form id="acp_portal_wowheroes" method="post" action="{U_ACTION}">


		
	<fieldset>
              <legend>{L_PORTAL_WOWHEROES_TITLE}</legend>
			  
		<dl>
			<dt><label>{L_WOWHEROES_REGION}:</label><br />{L_WOWHEROES_REGION_EXPLAIN}</dt>
			<dd><input maxlength="3" size="3" type="text" name="wowregion" id="wowregion" value="{WOWREGION}"/>
		</dl>
        <dl>
			<dt><label>{L_WOWHEROES_REALM}:</label><br />{L_WOWHEROES_REALM_EXPLAIN}</dt>
			<dd><input maxlength="30" size="30" type="text" name="wowrealm" id="wowrealm" value="{WOWREALM}"/>
		</dl>
		<dl>
			<dt><label>{L_WOWHEROES_GUILD}:</label><br />{L_WOWHEROES_GUILD_EXPLAIN}</dt>
			<dd><input maxlength="30" size="30" type="text" name="wowguild" id="wowguild" value="{WOWGUILD}"/>
		</dl>
       
	<p class="submit-buttons">
		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
	</p>
	{S_FORM_TOKEN}
	</fieldset>
	</form>
the {WOW*****} values are set in the module file like so

Code: Select all

	public function get_template_side($module_id)
	{
		global $config, $template;

		$template->assign_vars(array(
			'WOWREGION'			=> $config['board3_wowheroesregion_' . $module_id],
			'WOWREALM'			=> $config['board3_wowheroesrealm_' . $module_id],
			'WOWGUILD'			=> $config['board3_wowheroesguild_' . $module_id],
		));

		return 'wowheroes.html';
	}
please could i get some help on this as once i've worked out what the problem is i can start converting allot of my old 1.0.6 mods over to 2.0.1[/i]
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: Custon Block ACP

Post by Marc »

You don't need an extra HTML file for the acp settings. Just set get_template_acp() to what you need (similar to this):

Code: Select all

	public function get_template_acp($module_id)
	{
		return array(
			'title'	=> 'ACP_PORTAL_WOWHEROES_SETTINGS',
			'vars'	=> array(
				'legend1'							=> 'ACP_PORTAL_WOWHEROES_SETTINGS',
				'board3_wowheroesregion_' . $module_id					=> array('lang' => 'PORTAL_WOWHEROES_REGION',	'validate' => 'string',		'type' => 'text:15:30',	'explain' => true),
			)
		);
	}
Function get_template_side() is for the actual output in the side columns of the portal and not for the ACP (hence the name).
User avatar

Topic author
talonos
Portal Specialist
Posts: 242
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Custon Block ACP

Post by talonos »

ahh ok so thats where my problem was. thanks for that Marc it works great now :)
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
Locked

Return to “Board3 Portal 2.0.x - English Support”