Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to format 'Product Review' text box font ?
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #21
RE: How to format 'Product Review' text box font ?
(01-06-2012 07:06 AM)RateU Wrote:  It will happen till you fix the custom thread fields that causing the problem. You need to know which custom thread fields causing the problem. Maybe you have a non standard conditional structure inside the Display Format or Blank Replacement Value.
Just for temporary, I think you can commenting out this line from inc/plugins/xthreads.php:

PHP Code:
@include_once MYBB_ROOT.'cache/xthreads_evalcache.php';

Fix the custom thread fields which causing the problem, then revert the code above back.


Thanks so much for the help !
Did as suggested and worked fine.
Not sure what did to cause problem, but may have tried to do too much while filling out the 'add thread field' form or something.
Anyway, am back at it.
Thanks again !
01-06-2012 07:42 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #22
RE: How to format 'Product Review' text box font ?
Having a problem with showing thread.

All textboxes (including xthreads) show when edit thread (image #2 on scrnshot attached, using custom formatted 'subject' and 'message' fields since couldnt figure simple workaround for eg 'subject missing error message').  

But, when update, the xthreads are not showing in the thread display (image #1).

Tried editing acp/templates/key_showthreads, but that doesnt seem to change anything.  Maybe something need to do with acp/templates/showthreads, havent tried that yet.

Assume it is a template that need to edit, but cant figure out which one.

Or maybe something else am missing ?

Ps:  Hope above isnt too confusing, as get more into this, gets more difficult to describe what am trying to communicate.


Attached File(s) Thumbnail(s)
   

Thanks again for your help !
01-07-2012 07:36 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #23
RE: How to format 'Product Review' text box font ?
It's not "<key>_showthread", it's "<template prefix>showthread".
You put the key of the thread field as a variable in the template, eg {$threadfields['key']}

My Blog
01-07-2012 10:21 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #24
RE: How to format 'Product Review' text box font ?
(01-07-2012 10:21 AM)ZiNgA BuRgA Wrote:  It's not "<key>_showthread", it's "<template prefix>showthread".
You put the key of the thread field as a variable in the template, eg {$threadfields['key']}

Oops!
Now am feeling like a total idiot.  Erf
Thank u for getting me turned around and for ur patience.

So, if...
#3. (per attached scrnshot) make thread (textbox) key=ph
#4. make thread prefix=cr_
#5. make new template cr_showthread
...then all the changes made to cr_showthread should show up in 'test' forum threads ?

Eg, in cr_showthread code may be...
<div id="posts">{$first_post}{$posts}{$threadfields['ph']}</div>

That doesnt seem to effect anything at the 'test' thread displays, so sure am not getting it yet.
Is the above logic closer ?

Ps:  Difference between {$threadfields} and $extra_threadfields} ?


Attached File(s) Thumbnail(s)
   

Thanks again for your help !
01-07-2012 12:00 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #25
RE: How to format 'Product Review' text box font ?
(01-07-2012 12:00 PM)akm Wrote:  #4. make thread prefix=cr_
Not Thread Prefix, but Template Prefix.
AdminCP -> Forums & Posts -> Forum Management -> Edit/create a forum, scroll down the page. You'll find the Template Prefix setting there.


(01-07-2012 12:00 PM)akm Wrote:  Ps:  Difference between {$threadfields} and $extra_threadfields} ?
As far as I know, $extra_threadfields is used for displaying the series of XThreads input fields. So, the working area for that variable are in newthread and editpost (and in quickthread if you use quickthread).
$threadfields is an array for displaying the value of a custom thread fields (output).

01-08-2012 01:41 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #26
RE: How to format 'Product Review' text box font ?
(01-08-2012 01:41 AM)RateU Wrote:  
(01-07-2012 12:00 PM)akm Wrote:  #4. make thread prefix=cr_
Not Thread Prefix, but Template Prefix.
AdminCP -> Forums & Posts -> Forum Management -> Edit/create a forum, scroll down the page. You'll find the Template Prefix setting there.
(01-07-2012 12:00 PM)akm Wrote:  Ps:  Difference between {$threadfields} and $extra_threadfields} ?
As far as I know, $extra_threadfields is used for displaying the series of XThreads input fields. So, the working area for that variable are in newthread and editpost (and in quickthread if you use quickthread).
$threadfields is an array for displaying the value of a custom thread fields (output).

Meant to type cr_template. Guess too much going on here Ouch
Deleted all forums, keys, prefixes etc and started over.
Created a new custom thread field, key=hp_.
Created a new template prefix=cr_.
Created new showthread template=cr_showthread. which assumed controlled the following selected source display...

Quote: <td class="trow2 post_content ">
<span class="smalltext"><strong>test subject </strong></span>
<div id="pid_1" class="post_body">
test message
</div>


But, apparently not the template which controls that display, because the custom thread is not showing at the thread display.
Should the variable be {$threadfields['hp_']} ?
Is there a place (wiki, forum thread, etc) to go for a description of which templates control which part of displays ?
Will keep trying to find with word search and trial-and-error, but seem to be getting more errors than not.  Arf
Are there certain /forum files hold the 'templates' ?

Thanks again for your help !
01-10-2012 12:28 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #27
RE: How to format 'Product Review' text box font ?
(01-10-2012 12:28 AM)akm Wrote:  Should the variable be {$threadfields['hp_']} ?
{$threadfields['key']} or {$GLOBALS['threadfields']['key']}, depends on your threadfields key (I don't know whether it is ph or hp).

(01-10-2012 12:28 AM)akm Wrote:  Is there a place (wiki, forum thread, etc) to go for a description of which templates control which part of displays ?
You can do this:
(12-24-2011 10:58 PM)ZiNgA BuRgA Wrote:  Also viewing the source of the page helps as it'll show which template stuff is being pulled from.

01-10-2012 01:36 AM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #28
RE: How to format 'Product Review' text box font ?
Thank you for the followup.

(01-10-2012 01:36 AM)RateU Wrote:  
(01-10-2012 12:28 AM)akm Wrote:  Should the variable be {$threadfields['hp_']} ?
{$threadfields['key']} or {$GLOBALS['threadfields']['key']}, depends on your threadfields key (I don't know whether it is ph or hp).

key=hp_

(01-10-2012 12:28 AM)akm Wrote:  Is there a place (wiki, forum thread, etc) to go for a description of which templates control which part of displays ?
(01-10-2012 01:36 AM)RateU Wrote:  You can do this:

Didnt see any link etc after ...this: ?

(12-24-2011 10:58 PM)ZiNgA BuRgA Wrote:  Also viewing the source of the page helps as it'll show which template stuff is being pulled from.

Have been trying to do that, but not that good at it yet, will do some more t&e for that.

Thanks again for your help !
01-10-2012 03:24 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #29
RE: How to format 'Product Review' text box font ?
Make sure you've got HTML comments enabled (it is by default).  View source of one of your pages and see if you can find:

HTML Code
<!-- start: headerinclude -->

The above indicates the start of the headerinclude template (obviously).

I'm not sure what you mean by 'creating template prefix', since you don't create one, but assign one.  Maybe I'm just being pedantic with terminology here, but I'm not sure exactly where you're looking at.

I'll try to explain what the template prefix does exactly, if it's confusing you.  Basically, it's to allow you to use different templates in different forums (in other words, have unique templates for some forums). To do this, we need some way to separate normal templates with ones we only want to apply for a specific forum - this is done by assigning a unique prefix to the name of the template.
So if forum X has a prefix of "cr_", when MyBB tries to load the showthread template, it will first look to see if it can find cr_showthread, and if not found, will fall back to showthread.  Note that cr_showthread effectively replaces showthread in this case.


My Blog
01-10-2012 12:31 PM
Find all posts by this user Quote this message in a reply
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #30
RE: How to format 'Product Review' text box font ?
(01-10-2012 12:31 PM)ZiNgA BuRgA Wrote:  Make sure you've got HTML comments enabled (it is by default).  View source of one of your pages and see if you can find:

HTML Code
<!-- start: headerinclude -->

The above indicates the start of the headerinclude template (obviously).

I'm not sure what you mean by 'creating template prefix', since you don't create one, but assign one.  Maybe I'm just being pedantic with terminology here, but I'm not sure exactly where you're looking at.

I'll try to explain what the template prefix does exactly, if it's confusing you.  Basically, it's to allow you to use different templates in different forums (in other words, have unique templates for some forums). To do this, we need some way to separate normal templates with ones we only want to apply for a specific forum - this is done by assigning a unique prefix to the name of the template.
So if forum X has a prefix of "cr_", when MyBB tries to load the showthread template, it will first look to see if it can find cr_showthread, and if not found, will fall back to showthread.  Note that cr_showthread effectively replaces showthread in this case.


Thank you for the followup !

Think am getting the  <!-- start: template --> and <!-- end: template --> thing/s, but in the example in last post, the code source from the thread display appears to be after <!-- end: template --> and before <!-- start: template -->.

Also, have created prefix_templates (eg prefix_postbit_edit, comment omitted) which show under ACP/ManageTemplates/UngroupedTemplates, and those modifications have been displayed (or not as per example case) in the one forum selected under ACP/Config/ThreadPrefixes.

The custom field is displayed for new threads and when editing, but when click 'Post Thread' or 'Update Post', the custom field is not displayed in the thread view.

Quote:<tr>
<td class="trow2"><strong>{$lang->cr_subject}:</strong></td>
<td class="trow2">
{$prefixselect}<input type="text" class="textbox" name="subject"
size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2" valign="top"><strong>{$lang->cr_your_message}:</strong><br /></td>
<td class="trow2">
{$prefixselect}<input type="text" class="textbox" name="message"
size="40" maxlength="85" value="{$message}" id="message" tabindex="3" />
</td>
</tr>
{$extra_threadfields}{$posticons}
<tr>
<td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>
<td class="trow1"><span class="smalltext">
<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1"

Tried all this (except not prefix_template editing) with a new installation (different server, no customization) of MyBB with XThreads, created custom thread field, it displays when create thread but not when post thread/display or when edit/update post.

Not sure what missing, where to look, what to do ?

Have been using info at http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=305&highlight=prod as a guide, but not seeing info for above question, but may be missing something ?

Thanks again for your help !
(This post was last modified: 01-11-2012 05:09 AM by akm.)
01-11-2012 05:07 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: