MyBB Hacks

Full Version: How to format 'Product Review' text box font ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Installed XThreads and all seems to be working fine.
Am very much a diy beginner (not a developer) with forum software, php, css, etc.
Trying to create a simple MyBB (with XThread plug-in) 'Product Review' forum.
Have been trying to find info for how to edit format (font-size, etc) of the (xthread) custom textboxes ?
Attached only file where could find with 'key' name used in the PR sub-forum.
But could not figure out how to find .css file or what ever file needed to edit the textbox font size.
Tried some ACP editing at 'Custom Thread Fields', but nothing seemed to work.
Also, havent done as much searching yet, but wondering how to delete (or edit to include) the MyBB 'Your Message:' text box from list of custom (xthread) text boxes.
Please let me know, if possible, where to find info on the above question/s, and let me know if need additional question info.
Thanks very much for your help.
(12-06-2011 04:07 PM)akm Wrote: [ -> ]Have been trying to find info for how to edit format (font-size, etc) of the (xthread) custom textboxes ?
Do you mean the textbox (the textbox input form element) or the output?
If you mean the textbox input form element, XThreads uses textbox class, like other MyBB textbox.
If you mean the output, you can style it via Display Format or Formatting Map List or the templates.

(12-06-2011 04:07 PM)akm Wrote: [ -> ]but wondering how to delete (or edit to include) the MyBB 'Your Message:' text box from list of custom (xthread) text boxes.
Do you mean the default MyBB message textarea or just the text?
Basically, you can create a new newthread template in your Global Templates, copy paste your default newthread template codes to the new newthread template, and name it as prefix_newthread. Change the prefix with your product review template prefix (by default, pf).
With that way, you can have a custom newthread template (and style it) just for your product review forum (other forums will use the default newthread template).
(12-07-2011 01:59 AM)RateU Wrote: [ -> ]
(12-06-2011 04:07 PM)akm Wrote: [ -> ]Have been trying to find info for how to edit format (font-size, etc) of the (xthread) custom textboxes ?
Do you mean the textbox (the textbox input form element) or the output?
If you mean the output, you can style it via Display Format or Formatting Map List or the templates.
(12-06-2011 04:07 PM)akm Wrote: [ -> ]but wondering how to delete (or edit to include) the MyBB 'Your Message:' text box from list of custom (xthread) text boxes.
Basically, you can create a new newthread template in your Global Templates, copy paste your default newthread template codes to the new newthread template, and name it as prefix_newthread. Change the prefix with your product review template prefix (by default, pf).
With that way, you can have a custom newthread template (and style it) just for your product review forum (other forums will use the default newthread template).

Thank you very much for the reply.
Have attached a scrnshot of the text boxes.
Trying to make the 'sample text - 2' the same font/area as the 'sample text - 1 & 3' font/area, and eliminate the MyBB 'Your Message' display (both columns), much like the sample shown in the second attachment taken from the xthreads PR example.
Just trying to make all text larger and accessible (eg for older people, etc) and the input/output screens similar and as simple as possible... as show in scrnshot of output display where eliminated some of the 'graphics', and shortened the 'description'.
Hope the scrnshots help, not that well versed in the language of forum program technology (am working on it, but taking some time) so for me scrnshots are (hopefully) 'worth a thousand words'.

In regard to your reply specifics...
1. am somewhat familiar with templates and will try making a custom newthread template, per your direction, but not sure how to connect it to the specific sub-forum.
2. am not familiar with 'Display Format' or 'Formatting Map List' processes, is that part of the ACP ?

Thanks again for your help.
(12-07-2011 05:23 AM)akm Wrote: [ -> ]Trying to make the 'sample text - 2' the same font/area as the 'sample text - 1 & 3' font/area,
What class you used for the 'sample text - 1' textbox?
By default, MyBB uses .textbox (input.textbox) class, and XThreads uses that class too.
If you use your own class, maybe you need to edit your threadfields_inputrow template (in Global Templates).
For example:

HTML Code
<tr>
<td class="{$altbg}" width="20%"><strong>{$tf['title']}</strong></td>
<td class="{$altbg} myinput">{$inputfield}<small style="display: block;">{$tf['desc']}</small></td>
</tr>

and add this class to your global.css:

Code:
.myinput .textbox {
	font-size: 24px;
}


(12-07-2011 05:23 AM)akm Wrote: [ -> ]and eliminate the MyBB 'Your Message' display (both columns), much like the sample shown in the second attachment taken from the xthreads PR example.
The textarea (both columns) are in newthread and editpost template.
But, if you remove it from that templates, the textarea will be removed for other forums too, not for your Product Review forum only.
That's why you need to create a new newthread template with prefix. So, the textarea will be removed from your Product Review forum only.
The prefix must be the same as what Template Prefix you use for your Product Review forum.

(12-07-2011 05:23 AM)akm Wrote: [ -> ]1. am somewhat familiar with templates and will try making a custom newthread template, per your direction, but not sure how to connect it to the specific sub-forum.
As long as you use the same prefix with your forum's Template Prefix, XThreads will "connects" it automatically.

(12-07-2011 05:23 AM)akm Wrote: [ -> ]2. am not familiar with 'Display Format' or 'Formatting Map List' processes, is that part of the ACP ?
They are part of Custom Thread Fields settings.

Maybe you can look at the Testimonial example application:
http://mybbhacks.zingaburga.com/showthread.php?tid=567

It uses a custom newthread and editpost template (xttes_newthread and xttes_editpost_first templates), you can see the screenshots.
We use xttest_ as prefix for those templates because we use xttest_ as Template Prefix for the Testimonial forum. And XThreads will "connects" it automatically for us.
(12-07-2011 06:59 AM)RateU Wrote: [ -> ]
(12-07-2011 05:23 AM)akm Wrote: [ -> ]Trying to make the 'sample text - 2' the same font/area as the 'sample text - 1 & 3' font/area,
What class you used for the 'sample text - 1' textbox?
By default, MyBB uses .textbox (input.textbox) class, and XThreads uses that class too.
If you use your own class, maybe you need to edit your threadfields_inputrow template (in Global Templates).
For example:

HTML Code
<tr>
<td class="{$altbg}" width="20%"><strong>{$tf['title']}</strong></td>
<td class="{$altbg} myinput">{$inputfield}<small style="display: block;">{$tf['desc']}</small></td>
</tr>

and add this class to your global.css:

Code:
.myinput .textbox {
	font-size: 24px;
}

(12-07-2011 05:23 AM)akm Wrote: [ -> ]and eliminate the MyBB 'Your Message' display (both columns), much like the sample shown in the second attachment taken from the xthreads PR example.
The textarea (both columns) are in newthread and editpost template.
But, if you remove it from that templates, the textarea will be removed for other forums too, not for your Product Review forum only.
That's why you need to create a new newthread template with prefix. So, the textarea will be removed from your Product Review forum only.
The prefix must be the same as what Template Prefix you use for your Product Review forum.

(12-07-2011 05:23 AM)akm Wrote: [ -> ]1. am somewhat familiar with templates and will try making a custom newthread template, per your direction, but not sure how to connect it to the specific sub-forum.
As long as you use the same prefix with your forum's Template Prefix, XThreads will "connects" it automatically.
(12-07-2011 05:23 AM)akm Wrote: [ -> ]2. am not familiar with 'Display Format' or 'Formatting Map List' processes, is that part of the ACP ?
They are part of Custom Thread Fields settings.
Maybe you can look at the Testimonial example application:
http://mybbhacks.zingaburga.com/showthread.php?tid=567
It uses a custom newthread and editpost template (xttes_newthread and xttes_editpost_first templates), you can see the screenshots.
We use xttest_ as prefix for those templates because we use xttest_ as Template Prefix for the Testimonial forum. And XThreads will "connects" it automatically for us.

Thank you for the references and info !

Edited the 'threadfields_inputrow', per attachment-1, and seemed to have fixed the formatting per attachment-2.  Basis for most classes is from 'standard' MyBB classes chart got from http://community.mybb.com/thread-33809.html

1. attachment-4 is the template am assuming to edit and save as cc_newthread' (the cc being the 'template prefix' per attachment-3 ? ) ?

Actually in this PR forum, there shouldnt be replies, only editing of original posts, so may need to edit #1. template to delete 'reply' display ?

Thanks again for your help !
If you put the input textbox tag directly in the threadfields_inputrow template like that, other input type won't be displayed (textarea, listbox and etc). And, XThreads input type has a "dynamic" name, something like xthreads_key, depends on the key of the custom fields, not subject.
XThreads input fields defined in the {$inputfield} variable in the template.
What's wrong using the .myinput .textbox class? It doesn't work in IE browser?

For the Template Prefix, you can find it in edit/create forum page, not in edit/create custom fields:
AdminCP -> Forums & Posts -> Forum Management -> Edit your PR forum, scroll down the page. You'll find the Template Prefix setting there.

For the reply function, you can set the reply permission for your PR forum.
And, optionally (if you don't have it yet), you can create a new showthread template, copy paste your default showthread template to the new showthread template, and name it as prefix_showthread template (again, depends on the Template Prefix used for your PR forum. Then, style it as you want (maybe you want to remove the {$newreply} variable from the prefix_showthread template.
(12-08-2011 05:22 AM)RateU Wrote: [ -> ]If you put the input textbox tag directly in the threadfields_inputrow template like that, other input type won't be displayed (textarea, listbox and etc). And, XThreads input type has a "dynamic" name, something like xthreads_key, depends on the key of the custom fields, not subject.
XThreads input fields defined in the {$inputfield} variable in the template.
What's wrong using the .myinput .textbox class? It doesn't work in IE browser?
For the Template Prefix, you can find it in edit/create forum page, not in edit/create custom fields:
AdminCP -> Forums & Posts -> Forum Management -> Edit your PR forum, scroll down the page. You'll find the Template Prefix setting there.
For the reply function, you can set the reply permission for your PR forum.
And, optionally (if you don't have it yet), you can create a new showthread template, copy paste your default showthread template to the new showthread template, and name it as prefix_showthread template (again, depends on the Template Prefix used for your PR forum. Then, style it as you want (maybe you want to remove the {$newreply} variable from the prefix_showthread template.

Thank you for the followup.

1.  Have never been able to find the .textbox class.
Closest has been in /theme(1-3)/global#.css

Quote:input.textbox {
background: #ffffff;
color: #000000;
border: 1px solid #0f5c8e;
padding: 1px;
}
textarea {
background: #ffffff;
color: #000000;
border: 1px solid #0f5c8e;
padding: 2px;
line-height: 1.4;
font-family: Verdana, Arial, Sans-Serif;
font-size: 20px;

The standards which I found at http://community.mybb.com/thread-33809.html ('thread dispay' part attached) pointed to the .trow* class and that seemed to work for textboxes.
Modifying 'textarea' didnt seem to change anything that I could find, so left as is.


2.  Found ACP... 'Template Prefix', and read the 'full description' (quite helpful).  Appears will need to check out http://www.php.net/manual/en/index.php for 'variables and conditionals', but looks like you have put me on the right track.


3.  Am not quite sure what is meant by...

Quote: If you put the input textbox tag directly in the threadfields_inputrow template like that, other input type won't be displayed (textarea, listbox and etc). And, XThreads input type has a "dynamic" name, something like xthreads_key, depends on the key of the custom fields, not subject.
XThreads input fields defined in the {$inputfield} variable in the template.

In particular...
'other input type',
'input name has a dynamic name' (is that the 'template pefix' ? ),
'{$inputfield} variable'
...but will look at the php.net manual.


4.  The 'reply function' info looks pretty straight forward (at least from a php beginners standpoint at this stage), and will just need to get into it and see how it all works.

So, will be checking out some of the above terminolgy at php.net.
Do you have any other good php info sources ?
And, thanks again for all your help and getting me on the right track/s.
(12-09-2011 06:00 AM)akm Wrote: [ -> ]1.  Have never been able to find the .textbox class.
Closest has been in /theme(1-3)/global#.css
Well, from you quote, I see it right there in the first line...

(12-09-2011 06:00 AM)akm Wrote: [ -> ]Modifying 'textarea' didnt seem to change anything that I could find, so left as is.
It will affect any <textarea> tag, as per what CSS does.

(12-09-2011 06:00 AM)akm Wrote: [ -> ]3.  Am not quite sure what is meant by...
To simplify, just don't do it, because it will mess something else up.
(12-09-2011 09:30 AM)ZiNgA BuRgA Wrote: [ -> ]
(12-09-2011 06:00 AM)akm Wrote: [ -> ]1.  Have never been able to find the .textbox class.
Closest has been in /theme(1-3)/global#.css

Well, from you quote, I see it right there in the first line...

(12-09-2011 06:00 AM)akm Wrote: [ -> ]Modifying 'textarea' didnt seem to change anything that I could find, so left as is.

It will affect any <textarea> tag, as per what CSS does.

1.  Ooops!  Thought it needed to be '.textbox' without the '.input' part.
Just not that familiar with how CSS works yet.

(12-09-2011 09:30 AM)ZiNgA BuRgA Wrote: [ -> ]
(12-09-2011 06:00 AM)akm Wrote: [ -> ]3.  Am not quite sure what is meant by...

To simplify, just don't do it, because it will mess something else up.

3.  May play around with it a little bit to get (hopefully) a better ideal on how the 'variables' etc work.
Should be an interesting next few nights Smile

Also attached scrnshot of 'newthread' template from ACP.
If change name to templateprefix_newthread, then could edit (change fonts, delete 'reply' textbox display, etc) for use with PR forum that has same 'Template Prefix', per your earlier direction ?
Hopefully am getting closer to understanding the info.
Thanks again.
(12-10-2011 01:09 AM)akm Wrote: [ -> ]If change name to templateprefix_newthread, then could edit (change fonts, delete 'reply' textbox display, etc) for use with PR forum that has same 'Template Prefix', per your earlier direction ?
Try it.
Note, you may wish to place it in the Global template set though.
Pages: 1 2 3 4 5 6 7 8
Reference URL's