MyBB Hacks

Full Version: Having a bit of trouble
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all!
I'm super excited to get this plugin working, it looks really powerful and it's given me a lot of ideas for how to run my forum!  I'm having a little bit of trouble, however, and was hoping that I could get a little bit of help.

I've tried to do the simplest of the listed plugins - the thread description - and I'm having a lot of trouble getting it to work for me.  I've added the custom field, and when I make a new thread/edit an existing one, the description field comes up... it just doesn't take the information and display my inputs ... at all.  The table at the head of the thread DOES appear, but it's the title of the input field, then a blank box to the right.

I'm working on a template that's not the default, and I've been able to locate most of the template addons and either make sure that they're not impacted, or fixed them so that they aren't commented out/removed/etc..  I've tried using the global option in the locations that I want it to be displayed (showthread template and the forumdisplay_thread template), but it's to no avail. Strangely, the field DOES show if I indicate a blank replacement value, but not if I input an entry.  It also DOES NOT save the inputs that I put in there.

I'm not sure what I'm doing wrong - I've followed the tutorial provided to the "T" (minus the blank entry input), and followed the described modifications... if anyone could help, I'd really appreciate it!

These are the two files I mentioned that I've edited, if anyone can see an amature mistake I might have made, feel free to slap me x)

forumdisplay_thread

Code:
<tr>
	<td style="width:2px;" colspan="2" align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.png" alt="{$folder_label}" title="{$folder_label}" /></td>
	<td class="{$bgcolor}{$thread_type_class}">
		{$attachment_count}
		<div>
			<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
			{$GLOBALS['threadfields']['tdescript']}<div class="author smalltext">{$threadfields['tdesc']} {$thread['profilelink']}</div> 
			</div>
	</td>
	<td width="25" colspan="2" align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
	{$rating}
	<td width="120" class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;" align="right">
		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
	</td>
{$modbit}
</tr>


showthread

Code:
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
// -->
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/thankyoulike.js?ver=150"></script>
<script type="text/javascript">
<!--
	var tylEnabled = "{$mybb->settings['g33k_thankyoulike_enabled']}";
	var tylCollapsible = "{$mybb->settings['g33k_thankyoulike_collapsible']}";
	var tylUser = "{$mybb->user['uid']}";
-->
</script>
</head>
<body>
	{$header}
	{$pollbox}
	<div class="float_left">
		{$multipage}

	</div>

<div class="float_right"><span class="smalltext"><a href="showthread.php?tid={$tid}&action=usernotes"><img src="http://aevum-live.net/forum/images/english/threadnote.png" /></a>{$newreply}</span></div>
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
		<tr>
			<td class="thead" colspan="2">
				<div>
					<strong>{$thread['threadprefix']}<span title="Thread ID #: {$tid}">{$thread['subject']}</span></strong>
<Br />{$GLOBALS['threadfields']['tdesc']}				
</div>
			</td>
		</tr>
		{$threadfields_display}{$classic_header}
	</table>
	<div id="posts">
		{$first_post}{$posts}
	</div>
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="border-top-width: 0;">
		<tr>
			<td colspan="2" style="vertical-align: middle;" class="tfoot">				
				<ul class="thread_tools">
					<li class="subscription_{$add_remove_subscription}"><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>
				</ul>
			</td>
		</tr>
	</table>
<div class="float_right">{$newreply}</div>
	<div class="float_left">
		{$multipage}
	</div>	
	<br style="clear: both;" />
	{$quickreply}
	{$threadexbox}
	{$similarthreads}
	<br />

	<div class="float_right" style="text-align: right;">
		{$moderationoptions}
		{$forumjump}
	</div>
	<br style="clear: both;" />
	{$usersbrowsing}
	{$footer}
</body>
</html>

I assume that "doesn't save the inputs" means that if you edit the thread field, save it, then go back to edit it again, the value you just put in doesn't show?  If that's the case, what does come up?  A blank value?

With the table that appears above the thread, you say it has the thread field name then a blank box on the right.  In regards to this blank box:
a) if you've entered no value for the field, but have set a blank replacement value, does it show the blank replacement value?
b) if you have entered a value, and there's a blank replacement value, what shows?

Also, what is the Key specified for this field?  I see references to 'tdesc' and 'tdescript' in your templates, though the Key used in the tutorial is 'desc'.
Wow, that was fast!  Thanks for getting back to me.

That's correct - it doesn't seem that when I fill in the field option that it doesn't save the data, so it pulls up the Blank Field reference input instead.

Regarding the blank box;
a) Yep - I have it set up presently to show "BLANK FIELD" as my blank display
b) Even when I enter something, it shows as "BLANK FIELD", regardless of what I may have put in.

Haa, whoops!  I did try to use both of those filed names, jut to see if switching something gave me a different result.  It hasn't changed anything, The title of the field is presently 'tdesc'.

I've gone ahead and added a couple of screen caps;

[attachment=922]
This one is the post page of a thread I'm trying to edit;

[attachment=923]
Top of thread after that input was added;

[attachment=924]
Forum display of where I'd like the thread values to appear;

[attachment=925]
Return back to the thread itself under "Full Edit" option - my entry has totally dissapeared, which leads me to believe it wasn't actually saved rather than having done a magic trick Smile
So basically values aren't saving for you for some reason.
Are your editpost/newthread templates fairly standard?

Can you try setting up a clean forum somewhere and see if it saves values there?
Thanks.
Those were some of the least edited templates that I had, LOL!  On the fresh install, I added the PHP conditionals and Xthreads, and it showed up immediately.  I figured the next step would be to see which plugin affected Xthreads and remove it, and the first one I cleared out fixed it!

As a side note, the plugin that was impacting it was this MOD.  I don't know if there's a workaround for it just for prosperity's sake or what have you, but it's solved!
If you really need the plugin, try changing this line:

PHP Code:
return $DetecterMessage['message'];

to:

PHP Code:
return $Detecter;

(02-12-2013 10:36 PM)a.live Wrote: [ -> ]As a side note, the plugin that was impacting it was this MOD.  I don't know if there's a workaround for it just for prosperity's sake or what have you, but it's solved!
Oh lord, I'm surprised that plugin even works.
There seem to be other relatively severe problems just with a quick scan of the code.
Thanks for the work around RateU, but I'm not committed to that plugin (or really confident enough that I wouldn't run something else afoul trying to tinker with that code, knowing my luck!).

Thanks again you guys, not only is the plugin itself impressive, but the support here is amazing!
Reference URL's