Posts: 180
Threads: 40
Joined: Sep 2009
Reputation:
1
2010-01-06, 03:40 PM
(This post was last modified: 2010-01-06, 03:42 PM by killer.)
i activated multi attachment but new thread or reply thread still give option to upload one attachment..
plz help
updated:
I can see multi attachment option in default template but not in my custom
Posts: 919
Threads: 146
Joined: Sep 2009
Reputation:
0
2010-01-06, 03:44 PM
(This post was last modified: 2010-01-06, 10:24 PM by Skiilz.)
(2010-01-06, 03:22 PM)ralgith Wrote: Line 96 is probably the END of the function, just scroll up Yes its the end of the function.
Error in the Plugins Page:
Fatal error: Cannot redeclare replace_temp_set() (previously declared in /home/a3230294/public_html/forums/inc/plugins/classicnavigation.php:16) in /home/a3230294/public_html/forums/inc/plugins/ma.php on line 96
_________________________________________________
(2010-01-06, 03:40 PM)killer Wrote: i activated multi attachment but new thread or reply thread still give option to upload one attachment..
plz help
updated:
I can see multi attachment option in default template but not in my custom
Go to the ma.php plugin and search for "template" them check the template edit that the plugin does and do it manually.
Posts: 180
Threads: 40
Joined: Sep 2009
Reputation:
1
do you mean this
function replace_temp_set($title,$find,$replace) {
global $db;
$title = $db->escape_string( $title );
$query = $db->simple_select("templates", "*", "title='$title' AND sid='-2'");
if( $db->num_rows( $query ) > 0 ) {
$rows = $db->fetch_array( $query );
$temp = str_replace($find,$replace, $rows['template']);
$updatetemp = array("template" => $db->escape_string($temp), "dateline" => TIME_NOW);
$db->update_query("templates", $updatetemp, "title='$title'");
}
Posts: 919
Threads: 146
Joined: Sep 2009
Reputation:
0
2010-01-06, 10:20 PM
(This post was last modified: 2010-01-06, 10:22 PM by Skiilz.)
This: (but I don't what template...)
include MYBB_ROOT."/inc/adminfunctions_templates.php";
$current = '<tr>
<td class="trow1" width="1"><img src="{$theme[\'imgdir\']}/paperclip.gif" alt="" /></td>
<td class="trow1" style="white-space: nowrap"><strong>{$lang->new_attachment}</strong> <input type="file" name="attachment" size="30" class="fileupload" /></td><td class="trow1" align="center"><input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}" tabindex="12" />
</td>
</tr>';
$newer = '<script type="text/javascript">
window.onload=addInput;
var num = 0;
function addInput()
{
num++;
var br = document.createElement(\'br\');
var b = document.createElement(\'b\');
var text = document.createTextNode(\'Upload Attachment: \');
b.appendChild(text);
var x = document.getElementById("uploads1");
input = document.createElement("input");
input.setAttribute("type", "file");
input.setAttribute("name", \'attachment\' + num);
input.setAttribute("size", "30");
input.setAttribute("class", "fileupload");
x.appendChild(b);
x.appendChild(input);
x.appendChild(br);
var number = document.getElementById(\'numbersa\');
number.setAttribute(\'value\',num);
}
</script>
<tr>
<td class="trow1" colspan="3" id="uploads1"><div id="uploads"></div></td>
</tr>
<tr>
<td class="trow1" colspan="3">
<center><input type="button" onmousedown="addInput();" value="Another Attachment"/> <input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}" tabindex="12" /></center>
</td>
</tr>
<input type="hidden" id="numbersa" name="numbersa" value="test" />';
find_replace_templatesets("post_attachments_new", "#".preg_quote("$current")."#i", "$newer");
}
Posts: 1,637
Threads: 10
Joined: Dec 2009
Reputation:
91
2010-01-07, 03:54 AM
(This post was last modified: 2010-01-07, 03:56 AM by Jammerx2.)
It's because they also use replace_temp_set, if that doesn't work just rename the function and rename it when the function is called.
Posts: 919
Threads: 146
Joined: Sep 2009
Reputation:
0
(2010-01-07, 03:54 AM)Jammerx2 Wrote: It's because they also use replace_temp_set, if that doesn't work just rename the function and rename it when the function is called. I didn't understand.. Can you do it by steps please.
Thank you.
Posts: 1,637
Threads: 10
Joined: Dec 2009
Reputation:
91
Open ma.php, find and replace:
Quote:replace_temp_set
with
Quote:replace_template_set
Note: Only do this if you have the same error as Skiilz
Posts: 86
Threads: 6
Joined: Oct 2008
Reputation:
2
Posts: 1,637
Threads: 10
Joined: Dec 2009
Reputation:
91
(2010-01-09, 04:15 PM)acrox999 Wrote: Woah, awesome.
Thanks.
A new plugin is in development.
Posts: 919
Threads: 146
Joined: Sep 2009
Reputation:
0
(2010-01-13, 12:48 AM)Jammerx2 Wrote: (2010-01-09, 04:15 PM)acrox999 Wrote: Woah, awesome.
Thanks.
A new plugin is in development. Isssa! Can't wait to see what it will add to MyBB!
|