MyBB Community Forums

Full Version: Some ideas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
I'd like to say that I'm extremely impressed with the MyBB project - I usually don't bother praising the writers of free software (I'm a lazy sad bum, yeah), but this one is one of the best projects ever!

Anyways, onto the content:
Well, firstly you might notice the thing with my name - everything after it is reversed. This is done by placing the unicode Right-to-Left override character after it (I've done this to demonstate it - I apologize if this is inappropriate - feel free to edit it out if you do feel it's inappropriate here). Another effect of this is that quoting me will cause all the text to become reversed.
My suggestion is to probably block or replace such unicode characters in usernames etc. Using these characters can also have a few other effects, such as "blank" usernames and the ability for someone to impersonate another user.
Thanks Smile

Beside all that, I have some other suggestions, if you don't mind Smile

Minor suggestions

Add a "Goto page" textbox in the navigation (page) links for show forum and show thread, much like vBulletin's - shouldn't be too hard, though I guess it's a minor thing.

In a multi-page thread in show forum, it displays something like
1 2 3 4 ... last
I think it would be a lot more useful if it were something like:
1 2 3 ... 49 50
As, for example, you might've read up to page 49, then the next time you visit, page 50 shows up. I guess show latest post works, but I think it would be nice to have the last few pages, rather than the absolute last one.

Allow posts to be expanded/hidden, just like you can with the forum categories on Index (not that useful, but it's easy to do and makes it look like there's more features Toungue)

Maybe an option in the AdminCP to allow the editor to be shown on Quick reply + quick edit? I understand the reasons for not including it however.

Never tried this, so I can't confirm it, but I think it you can easily set an avatar to something larger than the max dimensions specified. For example, upload a valid image, set the avatar, then change the uploaded image. I guess one way would be to set MyBB to upload avatars set by URL, but this would disallow those who like you use random avatar generators. Ultimately, I don't think it can really be blocked, but one thing that can be done, is to stick the avatar in a DIV with the max-height and max-width dimensions set, to prevent the image from becoming horribly large in dimensions.

Not at home, so can't exactly remember, but IIRC, there's a bug in the parser, when you enter {{mybb-code}} then later have a code tag... A small thing I guess, but all that I did to fix it is replace the { and } with the appropriate &xxxxx; thingy.
Also, I believe there was another one which caused certain characters inside code tags to be replaced with {{mybb-code}} - I'll need to check this once I get home.

IIRC, the parser doesn't parse quotes ("). I think it should be " -> "
This will also prevent issues with people using custom MyCodes. For example, I've seen a common YouTube code:
\[youtube\](.*?)\[/youtube\]
As you can probably see, quotes aren't parsed, so if that was used, then a user could enter something like
[youtube]xxxxxx" style="position: absolute; left: 0; top: 0[/youtube]
etc etc. Although whoever added the code should probably change the regular expression to exclude quotes, I guess some admins aren't aware of this, so parsing quotes would help prevent this issue.

Expand/contract buttons to the textarea fields to allow the user to increase/decrease the size of those fields. Maybe allow an option in the UserCP or AdminCP to turn it on/off.



Larger suggestions

Search in current thread - very useful for larger threads, especially Toungue

Maybe modify the editor? It's somewhat buggy right now, but I guess you can't do much with Javascript. One thing that could possibiliy be done is to, when the user clicks the Bold button, for example, the code [b][/b] is inserted and the cursor is placed within the tags, rather than have a [b] and then a [Close tag] button.
However, I guess you guys decided to use a close Tag button for a reason...

I liked PunBB's hide picture options - useful for people like me with slow connections (I guess people like me are becomming few). Perhaps add an option to the UserCP to allow this, and, if an image is disabled, have a link, when clicked, will display the image through DHTML.
Another thing would be to use ALT text for images, IMO. Though it seems that the ALT text was specifically left blank. Dunno, but I changed mine to the URL of the image, so if the image goes down, at least a viewer will know that an image is meant to be there.



"Dream" suggestions
Probably won't be implemented soon, but it's nice to dream, right?

WYSIWYG Editor - probably suggested in the past

Allow a usergroup(s) to moderate particular forums - I believe this also has been suggested in the past, so I won't dwell on it.

Bux/Cash mod - yeah, it's probably only appropriate as a plugin, but I actually know many people who choose SMF over MyBB purely for the cash mod.

Multiple templates for a theme? I've messed with one of the templates to switch the PostBit template to orient the user's info horizontally (as opposed to the default vertical). It would be nice if the user somehow was able to choose between horizontal and vertical orientation for all themes. I don't know how this would be done though, so I'm just really chucking in a possible idea.

Quick reply via AJAX - I believe also has been mentioned before Toungue


Okay, sorry about throwing all these ideas, but I think they MAY be benficial. I hope you find my suggestions useful. I think I have a few more, but can't think of them right now.

Again, thanks a lot to the MyBB development team - this is one GREAT piece of (what should I call this? code?) ! Keep up the great work! I'
ZiNgA BuRgAMA Wrote:Add a "Goto page" textbox in the navigation (page) links for show forum and show thread, much like vBulletin's - shouldn't be too hard, though I guess it's a minor thing.
I think that would be quite useful as well.

ZiNgA BuRgAMA Wrote:Search in current thread - very useful for larger threads, especially Toungue
That's already in MyBB 1.4 Smile

ZiNgA BuRgAMA Wrote:Maybe modify the editor? It's somewhat buggy right now, but I guess you can't do much with Javascript. One thing that could possibiliy be done is to, when the user clicks the Bold button, for example, the code is inserted and the cursor is placed within the tags, rather than have a [b] and then a [Close tag] button.
However, I guess you guys decided to use a close Tag button for a reason...
It was designed that way, but if you didn't notice, you can also click Bold again to close the bold tag. The [Close Tag] button is only there for users who want to close them all at the same time Smile

ZiNgA BuRgAMA Wrote:I liked PunBB's hide picture options - useful for people like me with slow connections (I guess people like me are becomming few). Perhaps add an option to the UserCP to allow this, and, if an image is disabled, have a link, when clicked, will display the image through DHTML.
Another thing would be to use ALT text for images, IMO. Though it seems that the ALT text was specifically left blank. Dunno, but I changed mine to the URL of the image, so if the image goes down, at least a viewer will know that an image is meant to be there.
That's a pretty good idea Smile

ZiNgA BuRgAMA Wrote:WYSIWYG Editor - probably suggested in the past
That's planned for the future - which release, we are unsure of.

ZiNgA BuRgAMA Wrote:Multiple templates for a theme? I've messed with one of the templates to switch the PostBit template to orient the user's info horizontally (as opposed to the default vertical). It would be nice if the user somehow was able to choose between horizontal and vertical orientation for all themes. I don't know how this would be done though, so I'm just really chucking in a possible idea.
For that, you could export and then import the theme again, make the new theme a child theme of the original, and only change the template set.

ZiNgA BuRgAMA Wrote:Quick reply via AJAX - I believe also has been mentioned before Toungue
That's already in MyBB 1.4 too Smile
Hello,

We already block Unicode right-to-left:

/**
 * Checks for the length of a string, mb strings accounted for
 *
 * @param string The string to check the length of.
 * @return int The length of the string.
 */
function my_strlen($string)
{
    global $lang;

    $string = preg_replace("#&\#(0-9]+);#", "-", $string);

    if(strtolower($lang->settings['charset']) == "utf-8")
    {
        // Get rid of any excess RTL and LTR override for they are the workings of the devil
        $string = str_replace(dec_to_utf8(8238), "", $string);
        $string = str_replace(dec_to_utf8(8237), "", $string);

        // Remove dodgy whitspaces
        $string = str_replace(chr(0xCA), "", $string);
    }
	$string = trim($string);

    if(function_exists("mb_strlen"))
    {
        $string_length = mb_strlen($string);
    }
    else
    {
        $string_length = strlen($string);
    }

    return $string_length;
}

I ask that you remove the character from your username. The reason? That They are valid characters, but by putting it in my_strlen, it makes sure the piece of text being checked isn't fully composed of invisible characters

As for {{mybb-code}} I ask you to not use it, as there is no other alternative.
@Justin S.: Thanks Smile

Tikitiki Wrote:We already block Unicode right-to-left:

/**
 * Checks for the length of a string, mb strings accounted for
 *
 * @param string The string to check the length of.
 * @return int The length of the string.
 */
function my_strlen($string)
{
    global $lang;

    $string = preg_replace("#&\#(0-9]+);#", "-", $string);

    if(strtolower($lang->settings['charset']) == "utf-8")
    {
        // Get rid of any excess RTL and LTR override for they are the workings of the devil
        $string = str_replace(dec_to_utf8(8238), "", $string);
        $string = str_replace(dec_to_utf8(8237), "", $string);

        // Remove dodgy whitspaces
        $string = str_replace(chr(0xCA), "", $string);
    }
	$string = trim($string);

    if(function_exists("mb_strlen"))
    {
        $string_length = mb_strlen($string);
    }
    else
    {
        $string_length = strlen($string);
    }

    return $string_length;
}
Cool! Though one thing - it only removes those two characters. I guess they're the main ones, but there are other "hidden" unicode characters which can allow users to have blank usernames, or have the ability to impersonate another user. Here's a few more:
[Image: showda8.jpg]
IIRC, it's a range of characters, so just filter all characters within the range Smile
Great work though, thanks!

Tikitiki Wrote:I ask that you remove the character from your username.
I can't edit my username Sad Could an admin do it?
I did this only to demonstrate. Sorry if I'm causing too much trouble.

Tikitiki Wrote:As for {{mybb-code}} I ask you to not use it, as there is no other alternative.
Nah, I don't mind that, but I'm suggesting the { and } characters, entered by the user gets replaced with the &xxxx; equivalents. This is what I use in the parser:
		// If MyCode needs to be replaced, first filter out [code] and [php] tags.
		if($options['allow_mycode'] != "no")
		{
			//replace \, { and }s to save trouble later
			$message = str_replace("{", '{', $message);
			$message = str_replace("}", '}', $message);
			$message = str_replace("\\", '\', $message);
			$message = str_replace("\"", '"', $message);

			// First we split up the contents of code and php tags to ensure they're not parsed.
			preg_match_all("#\[(code|php)\](.*?)\[/\\1\](\r\n?|\n?)#si", $message, $code_matches, PREG_SET_ORDER);
			$message = preg_replace("#\[(code|php)\](.*?)\[/\\1\](\r\n?|\n?)#si", "{{mybb-code}}\n", $message);
		}
Oh, and replacing the \ character at that point fixes another bug with the parser.
*EDIT* Note that the '\' is really '\' - this is also a bug :|

Thanks a lot though! I'm really excited about v1.4 - MyBB is the best!!!
Please report all bugs in the bug report forums so we can keep track of them.
Tikitiki Wrote:Please report all bugs in the bug report forums so we can keep track of them.
Okay: http://community.mybboard.net/showthread.php?tid=17622
Smile