Posting template

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
JobKnockey
Registered User
Posts: 140
Joined: Tue Feb 02, 2010 6:38 pm

Re: Posting template

Post by JobKnockey » Thu Mar 25, 2010 4:25 am

How do I fix this? [phpBB Debug] PHP Notice: in file /includes/acp/acp_forums.php on line 2004: array_merge() [function.array-merge]: Argument #1 is not an array

JobKnockey
Registered User
Posts: 140
Joined: Tue Feb 02, 2010 6:38 pm

Re: Posting template

Post by JobKnockey » Thu Mar 25, 2010 4:42 am

There seems to be a problem with the

Code: Select all

$lang = array_merge($lang, array(
	'FORUM_POST_TPL'					=> 'Posting template',
	'FORUM_POST_TPL_EXPLAIN'			=> 'The posting template is the text that appears in the textarea when starting a new topic in this forum. If you dont wish to use it, just leave it blank.',
Line: 2004));

Any ideas what this indicates?

This is the code, plus above code for reference:

Code: Select all

	/**
	* Display copy permission page
	* Not used at the moment - we will have a look at it for 3.0.7
	*/
	function copy_permission_page($forum_data)
	{
		global $phpEx, $phpbb_admin_path, $template, $user;

		$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
		$action = append_sid($this->u_action . "&parent_id={$this->parent_id}&f={$forum_data['forum_id']}&action=copy_perm");

		$l_acl = sprintf($user->lang['COPY_TO_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');

		$this->tpl_name = 'acp_forums_copy_perm';

		$template->assign_vars(array(
			'U_ACL'				=> append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url),
			'L_ACL_LINK'		=> $l_acl,
			'L_BACK_LINK'		=> adm_back_link($this->u_action . '&parent_id=' . $this->parent_id),
			'S_COPY_ACTION'		=> $action,
			'S_FORUM_OPTIONS'	=> make_forum_select($forum_data['parent_id'], $forum_data['forum_id'], false, false, false),
		));
	}

}

//-- mod : Posting Template ------------------------------------------------------------
//-- add
$lang = array_merge($lang, array(
	'FORUM_POST_TPL'					=> 'Posting template',
	'FORUM_POST_TPL_EXPLAIN'			=> 'The posting template is the text that appears in the textarea when starting a new topic in this forum. If you don\'t wish to use it, just leave it blank.',
));
//-- fin mod : Posting Template --------------------------------------------------------

?>

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Posting template

Post by igorw » Thu Mar 25, 2010 6:47 am

Wrong file! It should go in language/en/acp/forums.php. NOT includes/acp/acp_forums.php.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

JobKnockey
Registered User
Posts: 140
Joined: Tue Feb 02, 2010 6:38 pm

Re: Posting template

Post by JobKnockey » Thu Mar 25, 2010 8:27 am

Wow, you rock!

Thanks.

JobKnockey
Registered User
Posts: 140
Joined: Tue Feb 02, 2010 6:38 pm

Re: Posting template

Post by JobKnockey » Thu Mar 25, 2010 1:39 pm

I still don't seem to be able to create templates... I'm not getting errors any more.

JobKnockey
Registered User
Posts: 140
Joined: Tue Feb 02, 2010 6:38 pm

Re: Posting template

Post by JobKnockey » Thu Mar 25, 2010 1:45 pm

Could this somehow be substituted or complemented by adding fields, drop down boxes and radio buttons which automatically insert certain information?

Instead of typing a location, it could be selected from a down down box and automatically inserted. If someone wanted a response within a certain amount of time, this could be detailed through a drop down box selection.

In addition, what about the ability to insert words into the title of the thread, like 'WANTED' or whatever?

Delta191
Registered User
Posts: 4
Joined: Thu Jul 09, 2009 5:40 pm

Re: Posting template

Post by Delta191 » Fri Apr 23, 2010 7:47 pm

is there a later version out? 3.0.7 ?

Dragoth
Registered User
Posts: 52
Joined: Mon May 04, 2009 3:30 pm

Re: Posting template

Post by Dragoth » Mon May 03, 2010 8:21 pm

eviL<3 wrote:Ah, that is not part of this MOD. It's really simple actually. You just need to add these two things to the template:

Code: Select all

	<select name="addbbcode21" onchange="insert_text(make_mod_tpl(this.form.addbbcode21.options[this.form.addbbcode21.selectedIndex].value), false);this.form.addbbcode21.selectedIndex = 0;">
		<option value="0" selected="selected" style="font-weight: bold;">MOD template</option>
		<option value="OPEN">OPEN</option>
		<option value="FIND">FIND</option>
		<option value="BEFORE, ADD">BEFORE, ADD</option>
		<option value="AFTER, ADD">AFTER, ADD</option>

		<option value="REPLACE WITH">REPLACE WITH</option>
		<option value="IN-LINE FIND">IN-LINE FIND</option>
		<option value="IN-LINE BEFORE, ADD">IN-LINE BEFORE, ADD</option>
		<option value="IN-LINE AFTER, ADD">IN-LINE AFTER, ADD</option>
		<option value="IN-LINE REPLACE WITH">IN-LINE REPLACE WITH</option>
		<option value="SQL">SQL</option>

		<option value="COPY">COPY</option>
		<option value="DIY INSTRUCTIONS">DIY INSTRUCTIONS</option>
	</select>

Code: Select all

<script type="text/javascript">
// <![CDATA[
	function make_mod_tpl(action)
	{
		var mod_insert_tpl = '#' + "\n";
		mod_insert_tpl += '#-----[ ' + action + ' ]------------------------------------------' + "\n";
		mod_insert_tpl += '#' + "\n";
		return mod_insert_tpl;
	}
// ]]>
</script>
hey evil were does it go

Dragoth
Registered User
Posts: 52
Joined: Mon May 04, 2009 3:30 pm

Re: Posting template

Post by Dragoth » Mon May 03, 2010 8:22 pm

Delta191 wrote:is there a later version out? 3.0.7 ?
i works with 3.0.7

Locked

Return to “[3.0.x] MOD Database Releases”