Jump to the post that solved this thread.
Not Solved [General] Did something with templates. Need some assistance
Not Solved
(2019-12-18, 07:19 PM)noyle Wrote:
(2019-12-18, 06:45 PM)makpaolo Wrote:
(2019-12-18, 06:29 PM)noyle Wrote: If you haven't made any modification to the showthread template before this "edit by mistake", copy the content of this specific template from your theme installation file. Either a published theme or MyBB's default theme has a xml file for installation.

I'm a little confused what you mean by this.
There was modification to the showthread template, but I still have the XML file for the theme (there weren't too many edits specifically with showthread template, but CSS wise there has been a lot of editing)

My showthread template still has the original content, but it seems like the showthread_newthread takes control over that template or something.

Huh I've no idea why the actual page is wrong if the showthread template is still having the original content.

If I understand you correctly, the content of the showthread template should be the same as showthread_newthread's, either from AdminCP's template editing or from the forum's front-end. If this is the case, open that xml file, search for <template name="showthread", copy the content between <template name="showthread" version="18xx"><![CDATA[ and ]]></template> (don't cross other following templates) and replace the wrong content in current showthread template and save.

The showthread template in the Admin CP is the correct showthread code. It does not contain the showthread_newthread contents at all, but when you open a thread link, in the page source it will show the showthread_newthread contents. Very weird.

My showthread in the Admin CP right now is:
<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}";
	lang.post_deleted_error = "{$lang->post_deleted_error}";
	lang.softdelete_thread = "{$lang->soft_delete_thread}";
	lang.restore_thread = "{$lang->restore_thread}";
// -->
<!-- jeditable (jquery) -->
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1820"></script>
<script src="{$mybb->asset_url}/jscripts/jeditable/jeditable.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/thread.js?ver=1820"></script>
<body class="showthread">
	<div class="boxed page_header">
		<div class="page_head">
			<div class="page_head_title"><h1>{$thread['subject']}</h1></div>
			<div class="page_head_desc"></div>
	<div class="boxed">
		<div class="page_thead"><h2>Topic Title : {$thread['threadprefix']}{$thread['subject']}</h2></div>					
		<div class="page_headers">
			<div class="page_header_icon">
				<img src="{$theme['imgdir']}/showthread.png" alt="*">
				<div class="page_header_title">
					<div class="page_header_desc">
					<i class="fas fa-circle"></i> This topic has been commented on {$thread['replies']} times.<br>
					<i class="fas fa-circle"></i> Owner : {$thread['username']}
		<div class="page_header_buttons">
	<div class="mobile_float float_left" style="padding-bottom: 4px;">
	<div class="mobile_float float_right">
	<div id="posts">
	<div style="padding-top: 4px;" class="float_left">
	<div class="mobile_float float_right">
	<br class="clear" />
	<br />

	<div class="mobile_float float_right" style="text-align: right;">
	<br class="clear" />
	<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")
	// -->
	<script type="text/javascript">
		var thread_deleted = "{$thread_deleted}";
		if(thread_deleted == "1")
			$("#quick_reply_form, .new_reply_button, .thread_tools, .inline_rating").hide();
			$("#moderator_options_selector option.option_mirage").attr("disabled","disabled");

However, the source of any thread link will show (this is my showthread_newthread template pretty much):
<script src="https://mywebsite.com/jscripts/obfuscated.js"></script><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<a href="newthread.php?fid=38" class="btn button26 new_thread_button"><span>Post Thread</span></a>&nbsp;
Jump to the post that solved this thread.

Messages In This Thread
RE: Did something with templates. Need some assistance - by makpaolo - 2019-12-18, 07:22 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)