Thread Rating:
  • 18 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Jammerx2's Plugins
#31
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
PAKISTAN IT FORUM - http://www.pkitforum.com
Fresh Tips On Blogging - http://www.bloggingbite.com
WebHost Technies - http://www.myliteraturetechlife.com
Reply
#32
(2010-01-06, 03:22 PM)ralgith Wrote: Line 96 is probably the END of the function, just scroll up Wink
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.
[Image: 468x602b.png]
Reply
#33
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'");
}
PAKISTAN IT FORUM - http://www.pkitforum.com
Fresh Tips On Blogging - http://www.bloggingbite.com
WebHost Technies - http://www.myliteraturetechlife.com
Reply
#34
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");
}
[Image: 468x602b.png]
Reply
#35
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.
Reply
#36
(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.
[Image: 468x602b.png]
Reply
#37
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
Reply
#38
Woah, awesome.
Reply
#39
(2010-01-09, 04:15 PM)acrox999 Wrote: Woah, awesome.

Thanks.

A new plugin is in development.
Reply
#40
(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!
[Image: 468x602b.png]
Reply


Forum Jump:


Users browsing this thread: 23 Guest(s)