MyBB Community Forums

Full Version: forum creator bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello everyone

i have small problem 

i'm using form creator on my forum the plugin works great but the problem when someone post the thread there is "post thread button" inside the thread and if anyone used he can do new thread without the format 
[Image: ZOObw0q.png]
how i can remove the button from the thread ? please help
Paste here the code from admincp/templates & styles/ your theme/ show thread templates/showthread
here is the showthread code 


<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
// <!--
	lang.processing = '{$lang->thx_processing}';
// -->
</script>
<script type="text/javascript">
<!--
	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
	var quickrestore_confirm = "{$lang->quickrestore_confirm}";
	var allowEditReason = "{$mybb->settings['alloweditreason']}";
	lang.save_changes = "{$lang->save_changes}";
	lang.cancel_edit = "{$lang->cancel_edit}";
	lang.quick_edit_update_error = "{$lang->quick_edit_update_error}";
	lang.quick_reply_post_error = "{$lang->quick_reply_post_error}";
	lang.quick_delete_error = "{$lang->quick_delete_error}";
	lang.quick_delete_success = "{$lang->quick_delete_success}";
	lang.quick_delete_thread_success = "{$lang->quick_delete_thread_success}";
	lang.quick_restore_error = "{$lang->quick_restore_error}";
	lang.quick_restore_success = "{$lang->quick_restore_success}";
	lang.editreason = "{$lang->postbit_editreason}";
// -->
</script>

<script type="text/javascript">
var fieldtoclipboard = {
	tooltipobj: null,
	hidetooltiptimer: null,

	createtooltip:function(){
		var tooltip = document.createElement('div')
		tooltip.style.cssText = 
			'position:absolute; background:black; color:white; padding:4px;z-index:10000;'
			+ 'border-radius:3px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);'
			+ 'opacity:0;transition:opacity 0.3s'
		tooltip.innerHTML = 'Copied!'
		this.tooltipobj = tooltip
		document.body.appendChild(tooltip)
	},

	showtooltip:function(e){
		var evt = e || event
		clearTimeout(this.hidetooltiptimer)
		this.tooltipobj.style.left = evt.pageX - 10 + 'px'
		this.tooltipobj.style.top = evt.pageY + 15 + 'px'
		this.tooltipobj.style.opacity = 1
		this.hidetooltiptimer = setTimeout(function(){
			fieldtoclipboard.tooltipobj.style.opacity = 0
		}, 700) // time in milliseconds before tooltip disappears
	},

	selectelement:function(el){
    var range = document.createRange() // create new range object
    range.selectNodeContents(el)
    var selection = window.getSelection() // get Selection object from currently user selected text
    selection.removeAllRanges() // unselect any user selected text (if any)
    selection.addRange(range) // add range to Selection object to select it
	},
	
	copyfield:function(e, fieldref, callback){
		var field = (typeof fieldref == 'string')? document.getElementById(fieldref) : fieldref
		callbackref = callback || function(){}
		if (/(textarea)|(input)/i.test(field) && field.setSelectionRange){
			field.focus()
			field.setSelectionRange(0, field.value.length)
		}
		else if (field && document.createRange){
			this.selectelement(field)
		}
		else if (field == null){ // copy currently selected text on document
			field = {value:null}
		}
		var copysuccess // var to check whether execCommand successfully executed
		try{
			copysuccess = document.execCommand("copy")
		}catch(e){
			copysuccess = false
		}
		if (copysuccess){
			if (e){
				this.showtooltip(e)
			}
			callbackref(field.value || window.getSelection().toString())
		}
		return false
	},


	init:function(){
		this.createtooltip()
	}
}

fieldtoclipboard.init()



</script>

<script type="text/javascript">
$(".btn").on("click", function() {
    $(".alert").removeClass("in").show();
	$(".alert").delay(200).addClass("in").fadeOut(2000);
});
</script>

<!-- jeditable (jquery) -->
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1800"></script>
<script src="{$mybb->asset_url}/jscripts/jeditable/jeditable.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/thread.js?ver=1800"></script>
</head>
<body id="forums">
	{$header}{$announcement}
	{$threadnotesbox}
	{$pollbox}
	<div class="float_left">
		{$multipage}
	</div>
	<div class="float_right">
			{$newthread}{$newreply}
	</div>

	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder tfixed clear">
		<tr>
			<td class="thead">
				<div class="float_right">
					<span class="smalltext"><strong><a href="javascript:;" id="thread_modes">{$lang->thread_modes}</a>{$threadnoteslink}</strong></span>
				</div>
				<div>
					<strong>{$thread['threadprefix']}{$thread['subject']}</strong>
				</div>
			</td>
		</tr>
<tr><td id="posts_container">
	<div id="posts">
		{$posts}
	</div>
</td></tr>
		<tr>
			<td class="tfoot">
				<div class="float_right">{$search_thread}</div>
				
                  
                  
  <div style="margin-top: 4px; margin-left: 5px;" class="float_left">
    <span class="smalltext"><strong>Share Thread: </strong></span> &nbsp;
  <span class="socialicons">
    <a title="Digg" href="http://digg.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank">
  <i style="font-size: 16px;" class="fa fa-digg fa-fw"></i> </a> &nbsp;

<a title="Delicious" href="http://del.icio.us/post?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&amp;title={$thread['subject']}" target="_blank">  <i style="font-size: 16px;" class="fa fa-delicious  fa-fw"></i> </a> &nbsp;

<a title="Facebook" href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank">  <i style="font-size: 16px;" class="fa fa-facebook fa-fw"></i> </a> &nbsp;

<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank">  <i style="font-size: 16px;" class="fa fa-twitter fa-fw"></i> </a> &nbsp;

<a title="StumbleUpon" href="http://www.stumbleupon.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"> <i style="font-size: 16px;" class="fa fa-stumbleupon fa-fw"></i> </a> &nbsp;
</span>
</div>	
			</td>
		</tr>
	</table>
	<div class="float_left">
		{$multipage}
	</div>
	<div style="padding-top: 4px;" class="float_right">
			{$newthread}{$newreply}
	</div>
	<br class="clear" />
	{$quickreply}
	{$threadexbox}
	{$similarthreads}
	<br />
	<div class="float_left">
		<ul class="thread_tools">
			<li class="printable"><i style="font-size: 14px;" class="fa fa-print fa-fw"></i> <a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
			{$sendthread}
			<li class="subscription_{$add_remove_subscription}"><i style="font-size: 14px;" class="fa fa-check-circle-o fa-fw"></i> <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
			{$addpoll}
		</ul>
	</div>

	<div class="float_right" style="text-align: right;">
		{$moderationoptions}
		{$forumjump}
	</div>
	<br class="clear" />
	{$usersbrowsing}<!-- PLUGIN_USERS_BROWSED_TOPIC -->
	{$footer}
	<div id="thread_modes_popup" class="popup_menu" style="display: none;"><div class="popup_item_container"><a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->linear}</a></div><div class="popup_item_container"><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->threaded}</a></div></div>
	<script type="text/javascript">
	// <!--
		if(use_xmlhttprequest == "1")
		{
			$("#thread_modes").popupMenu();
		}
	// -->
	</script>
	<script type="text/javascript">
		$(".author_avatar img").error(function () {
			$(this).unbind("error").closest('.author_avatar').remove();
		});
	</script>
</body>
</html>
^ you can remove both concurrences of {$newthread}