MyBB Community Forums

Full Version: New forum problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2022-09-14, 09:45 PM)nixer55 Wrote: [ -> ]Think @Matt has you sorted on the ssl stuff, but no idea what you mean by "when I got mybb 1.8.30 downloaded a 6-month stable version".  Never heard of that - makes me suspect a scripted install like Softaculous.  At least not MyBB official sources.

The other issue looks like the result of pasting data in the post editor.  As @mikser1 points out - turn on View Source before pasting.  I advise our members to so so before any paste operation.  Have for years. Wink

Thank you for your reply.

the current version is 1.8.30

Have you read this from post one?

===

font size problems that makes no sense since it comes and goes without reason here is an example of a post, I made to show this vividly:

LINK

which came from another mybb based forum LINK I posted 5 years earlier without problem and here is the original source for that post LINK

===

It posted fine on mybb forum in 2017 now it can't be REPOSTED from that mybb forum.

I REPOSTED a few others from the forum as shown HERE LINK and HERE LINK without a problem.

Then this thread page of successful REPOSTING from my old mybb forum (2009-2017) on wayback machine 8 of them.

HERE LINK

Wayback machine old forum LINK

It is helter skelter and on the current version this forum is running on which I did a search to find complaints about my problem which I find that goes back to 2019...., presumably fixed at 1.8.22 or something like that.
(2022-09-14, 10:36 PM)sunsettommy2 Wrote: [ -> ]
(2022-09-14, 09:45 PM)nixer55 Wrote: [ -> ]Think @Matt has you sorted on the ssl stuff, but no idea what you mean by "when I got mybb 1.8.30 downloaded a 6-month stable version".  Never heard of that - makes me suspect a scripted install like Softaculous.  At least not MyBB official sources.

The other issue looks like the result of pasting data in the post editor.  As @mikser1 points out - turn on View Source before pasting.  I advise our members to so so before any paste operation.  Have for years. Wink

Thank you for your reply.

the current version is 1.8.30

Have you read this from post one?

Edited...

I have actually.  Still don't get the 6 month stable version reference.

MyBB changed the editor around 1.8.19 or so from memory.  Even before that, pasting from external sources could have unforeseen results.  Your best bet nowadays is to turn on source mode before pasting external data in the editor.  Or run it through a plain text editor first.  But Source Mode achieves the same thing, and you can toggle it on and off.
(2022-09-14, 11:47 PM)nixer55 Wrote: [ -> ]
(2022-09-14, 10:36 PM)sunsettommy2 Wrote: [ -> ]
(2022-09-14, 09:45 PM)nixer55 Wrote: [ -> ]Think @Matt has you sorted on the ssl stuff, but no idea what you mean by "when I got mybb 1.8.30 downloaded a 6-month stable version".  Never heard of that - makes me suspect a scripted install like Softaculous.  At least not MyBB official sources.

The other issue looks like the result of pasting data in the post editor.  As @mikser1 points out - turn on View Source before pasting.  I advise our members to so so before any paste operation.  Have for years. Wink

Thank you for your reply.

the current version is 1.8.30

Have you read this from post one?

Edited...

I have actually.  Still don't get the 6 month stable version reference.

MyBB changed the editor around 1.8.19 or so from memory.  Even before that, pasting from external sources could have unforeseen results.  Your best bet nowadays is to turn on source mode before pasting external data in the editor.  Or run it through a plain text editor first.  But Source Mode achieves the same thing, and you can toggle it on and off.

Toggling or turn on source mode isn't going to fix the problem and shouldn't be necessary when it is working properly which was NEVER a problem in FOUR other mybb based forums I have posted in.

The current 1.8.30 version release was posted in March 2022 which is now 6 months ago yet no complaints of what I have described in those 6 months this current version here in General Support.

Thank you for your effort here.
Let's address the problem.

There is an icon on the right end of the editor's toolbar to toggle source mode on or off. If you paste your formatted copy into the text window with source mode off (that is, icon not highlighted), you will see unreadable text because of the size formatting. If, before creating the post, you toggle the source mode icon, you will then see all the formatting code in plain text.

for example:
[b][color=#ff0000][size=1][font=Arial]Gradually rising seas[/font][/size][/color][/b]
[align=justify][size=1] [/size][/align]
[align=justify][size=1]For 4,000 years, the world’s sea level has been inching up.[/size][/align]
[align=justify][size=1] [/size][/align]
[align=justify][size=1]This has been caused by [/size][/align]
[align=justify][size=1](a)[font=Times New Roman]   [/font][/size][size=1]the melting of the post-Flood ice and [/size][/align]
[align=justify][size=1](b)[font=Times New Roman]  [/font][/size][size=1]the gradual evaporation or outflow of inland basins to the sea.[/size][/align]
[align=justify][size=1] [/size][/align]
[align=justify][size=1]The gradual rise of the oceans is thus another clear relic of the Deluge.  Flood waters left behind on the land, in the form of ice or inland lakes, have been gradually returning to the oceans.  The result has been not only a drying out of the land, but a corresponding rise in sea level.[/size][/align]
[align=justify][size=1] [/size][/align]

This text is the default size without added formatting.
The following text is formatted using MyBB's current default editor.

size 1
size 2
size 3
size 4
size 5
size 6
size 7

which is coded as
[size=xx-small]size 1[/size]
[size=x-small]size 2[/size]
[size=small]size 3[/size]
[size=medium]size 4[/size]
[size=large]size 5[/size]
[size=x-large]size 6[/size]
[size=xx-large]size 7[/size]

If your formatted copy comes from a source where the editor actually used numbers instead of labels to format sizes, then the results will be as you see: tiny type that is unreadable.

And the reason for this is simple. Browsers interpret [size=1] to represent pixels. Hence, small and unreadable.

Now, let's address the fix. Simple. There won't be one until MyBB comes up with a more modern editor as default. Perhaps that's coming in 1.9

Now, let's address the workarounds.
1. The user could toggle source mode on so that formatting is dropped when pasting. Requires the user to know how to use the editor buttons.
2. The admin could force source mode on. That defeats the feature of copying formatted code, which includes all formatting.
3. The admin could force ignoring size code while permitting other formatting. Requires a MyCode replacement. See attached screenshot.
[attachment=45425]

One problem with workaround 3 is that pasting formatted code will appear tiny and unreadable until the post is created. It will not be feasible to edit the post because of how the browser will render it.

Another minor problem is that creating or editing custom MyCode requires a string replacement (changed in some recent version of 1.8) to be entered. In the past a null string was permitted. I have used phpMyAdmin to edit the mycode table entry.

Or, see this post by Taylor M for a much more concise response.
https://community.mybb.com/thread-236491...pid1379849
Thank you everyone who came to help me get this new forum running better.

Cheers.
Ok, here's a suitable fix that allows size formatting using "size=number" that renders size=1 to be readable.
At this point it requires a core code edit. I chose size=7 to be the minimum readable size for me, which closely corresponds to size=xx-small.
The difference may be pixels vs points and may result in differences between browsers and screens.
Since I don't thoroughly understand the mycode parser or other unrelated consequences yet, I will advise the reader that making this change make break something else. So be prepared to revert. And since it is a core edit, every forum update may require you to do it again if the distribution file changes.

In /inc/class_parser.php, line 825 (ver 1.8.30) begins function mycode_handle_size
Find and change on lines 831 and 835 where $size smaller than 1 is set to $size

		function mycode_handle_size($size, $text)
	{
		global $templates;

		$size = (int)$size;

		if($size < 7)  // core edit, original value 1
		{
			$size = 7;  // core edit, original value 1
		}

		if($size > 50)
		{
			$size = 50;
		}

		$text = str_replace("\'", "'", $text);

		eval("\$mycode_size = \"".$templates->get("mycode_size_int", 1, 0)."\";");
		return $mycode_size;
	}


results in the following
[attachment=45426]

instead of this forum's rendering of
[size=1]This is size 1 is limited to min size 7 pts.[/size]
[size=xx-small]This is size xx-small[/size]
[size=7]size 7[/size]
[size=10]size 10[/size]
[size=14]size 14[/size]
[size=19]size 19[/size]
[size=20]size 20[/size]
[size=30]size 30[/size]
[size=40]size 40[/size]
[size=50]size 50[/size]
[size=60]size 60[/size] is limited to max size 50 pts

as

This is size 1 is limited to min size 7 pts.
This is size xx-small
size 7
size 10
size 14
size 19
size 20
size 30
size 40
size 50
size 60 is limited to max size 50 pts
Pages: 1 2