MyBB Hacks

Full Version: My Feature Ideas
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
(01-29-2011 11:11 AM)ZiNgA BuRgA Wrote: [ -> ]I've thought about that one before, but:
  • MyBB's editor is "broken" (like many parts of MyBB itself) - its OOP model is crap and you cannot have more than one instance of it on a page; in other words, this will screw up the normal post editor if I put it there

Yes, Yumi. When XThreads had the Custom type of custom thread fields in some previous version, I use it to "steal" the message id from the default textarea. Unfortunately, it means that the default textarea lost the feature (if I use it together wit the custom thread fields). So, I give up with it Biggrin
Yumi, I have an idea (maybe for XThreads 2.0 ? Biggrin).
Is it possible that we have something like this in the value lists (for Listbox, Option Buttons and Check Boxes), Yumi?

Code:
1{|}My Text 1
2{|}My Text 2
3{|}My Text 3

Similar to the Formatting Map List feature, but it is for input fields.
So, the output of our selectable custom thread fields on newthread and editpost is simliar to (example for Listbox):

HTML Code
<select name="xthreads_myfield">
	<option value="1">My Text 1</option>
	<option value="2">My Text 2</option>
	<option value="3">My Text 3</option>
</select>



  • We can set the Underlying Data Type setting to Integer, if Allow multiple values for this field setting is set to No.
  • If we want to change the 'display text' later, we don't need to update all threads with the new value.
    For example, we can change the value list like this:

    Code:
    1{|}Changed Text 1
    2{|}My Text 2
    3{|}Changed Text 3

    without needed to update all threads that use value 1 and 3.

  • If we have a special chars inside the value list, we don't need to 'worry' that MyBB (1.6.4) will 'reject' our variable.
    For example:

    Code:
    {$filters_set['myfield']['selected']['Games, Entertainment']}

    because we can use:

    Code:
    {$filters_set['myfield']['selected'][1]}

    if we don't have Template Conditional or PHP In Template plugin installed.


That is one of my idea, Yumi (I don't know whether it is applicable or not).

I'm really sorry for bumping this thread Biggrin
Nah, that makes a lot of sense and is easy to implement Smile
That really sounds very helpful if you ask me (I know nobody asked me, haha).
(10-25-2011 12:21 PM)ZiNgA BuRgA Wrote: [ -> ]Nah, that makes a lot of sense and is easy to implement Smile

Thank you very much for considering it, Yumi Smile

(10-25-2011 02:40 PM)Sama34 Wrote: [ -> ]That really sounds very helpful if you ask me (I know nobody asked me, haha).

Biggrin
Yumi, I've downloaded from the github, and try it Yipi

I really like it. And really like the bonus (the <span> feature for listbox!) 50star.GIF

Thank you very much, Yumi! Love
(10-25-2011 08:02 AM)RateU Wrote: [ -> ]
  • If we have a special chars inside the value list, we don't need to 'worry' that MyBB (1.6.4) will 'reject' our variable.
    For example:

    Code:
    {$filters_set['myfield']['selected']['Games, Entertainment']}


It seems that it is MyBB bug?
http://dev.mybb.com/issues/1843
Possibly...
I gave them the code, so I don't really want to admit it. Tongue

A change in the matching regex should fix it.  I had never really thought about special characters there TBH.
(01-15-2012 09:48 AM)ZiNgA BuRgA Wrote: [ -> ]I had never really thought about special characters there TBH.

Yumi, I'm sorry for this stupid question. I would like to know whatever chars (commonly used as a text) I should prevent to be used in my filterable Value Lists?
I think I don't have this "issue" anymore because I use the dev XThreads version (XThreads can separate the key and the value), but I have not changed some filterable listbox custom fields yet.
Well MyBB allows letters, numbers and the space & underscore characters.
See the check_template() function in admin/inc/functions.php for the full listing.
Pages: 1 2 3 4 5 6
Reference URL's