MOD Template Feature
MOD Template Feature
How did phpBB Modders Get This?
When posting, there is the MOD template dropdown with options.
Can i get the code?
And where to add it for it to work?
When posting, there is the MOD template dropdown with options.
Can i get the code?
And where to add it for it to work?
Re: MOD Template Feature
In fact, you can copy it right out of the page source. I can't find the file that contains the instructions anymore. Make sure you don't forget the make_mod_tpl javascript function.
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>
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>
Donate to phpBBModders.net - we're poor!
Re: MOD Template Feature
eviL<3 wrote:In fact, you can copy it right out of the page source. I can't find the file that contains the instructions anymore. Make sure you don't forget the make_mod_tpl javascript function.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>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>
I thought I saw the MOD topic on STG somewhere.
Re: MOD Template Feature
I don't think I ever released it as a MOD.
Donate to phpBBModders.net - we're poor!
Re: MOD Template Feature
Huh...I could've sworn...wait, maybe it was the posting template MOD that I'm thinking of.
Re: MOD Template Feature
Posting template is something else, that's a pre-filled post.
Donate to phpBBModders.net - we're poor!
Re: MOD Template Feature
eviL<3 wrote:In fact, you can copy it right out of the page source. I can't find the file that contains the instructions anymore. Make sure you don't forget the make_mod_tpl javascript function.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>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>
But what file do i put it in now?
Re: MOD Template Feature
posting_body.html (I hope I got that right )
Donate to phpBBModders.net - we're poor!
Re: MOD Template Feature
Perfect!
Here is how i did it.
#
#-----[ OPEN ]------------------------------------------
#
posting_buttons.html
#
#-----[ FIND ]------------------------------------------
#
#
#-----[ AFTER, ADD ]------------------------------------------
#
#
#-----[ FIND ]------------------------------------------
#
#
#-----[ AFTER, ADD ]------------------------------------------
#
Here is how i did it.
#
#-----[ OPEN ]------------------------------------------
#
posting_buttons.html
#
#-----[ FIND ]------------------------------------------
#
Code: Select all
var show_panel = 'options-panel';
// ]]>
</script>
#
#-----[ AFTER, ADD ]------------------------------------------
#
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>
#
#-----[ FIND ]------------------------------------------
#
Code: Select all
<!-- END custom_tags -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
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>