PDA

View Full Version : Fixing percent sign when posting code.



HenrikOlsson
- 15th June 2012, 07:20
Hi,
This has been mentioned several times now but I'll bring it up again since it's still a big problem.

When posting code between code tags and including binary numbers like ADCON=101011 the forum tends to remove the percent sign and some of the digits. It doesn't happen all the time:

ADCON=%101011 'same as above
but it sure does happen a lot - for example here (http://www.picbasic.co.uk/forum/showthread.php?t=16641&p=114486#post114486), here (http://www.picbasic.co.uk/forum/showthread.php?t=16656&p=114460#post114460) and here (http://www.picbasic.co.uk/forum/showthread.php?t=16659&p=114466#post114466) (and that's just the last couple days) but, for example, NOT in this post (http://www.picbasic.co.uk/forum/showthread.php?t=16615&p=114200#post114200).

What is going on? This issue really needs to be looked into IMHO.

/Henrik.

EDIT: Look it happend to me in this post. The thing is that at first it was fine, then I went into EDIT the post and after "reposting" it i was messed up.

Ioannis
- 15th June 2012, 08:32
Henrik, I edit your post and placed the missing sign.

How?

Simply by clicking the first A/A button on the edit window (Switch Editor to Source Mode).

Ioannis

HenrikOlsson
- 15th June 2012, 09:30
Hi,
Yes, it can be fixed by editing, editing and editing, switching between different modes and more editing - there really should be no need to.

And, even if you went in and added the % sign in my previous post there's still an issue with the lost digits.

Can the editors then be set to default to the correct mode? It seems that when first making the post it defaults to the one where % works (because at first it WAS there) but when editing posts it defaults to the one where % does not work (because after I edited my post it was gone).

People come here for help, they post their code for other members to look at and the forum messes it up. It gets hard for people to help. IMHO this is a real issue which has a bad impact on the usability of the forum.

/Henrik.

EDIT: Oh, look at my original post. Now the % sign and leading digits are gone from the text as well, not only the code window. It's just a mess this....

Ioannis
- 15th June 2012, 09:43
Well, the default is WYSIWYG, and as I understand it this should show the % sign. So it is not very much what I see...

This is Lesters job and not moderators thing to mess.

Uers just have to remember click on the A/A button prior to write the message.

Ioannis

HenrikOlsson
- 15th June 2012, 10:48
Testing:


ADCON = 101010

The above was written in the WYSIWYG editor which, at least for me, is the default editor when making a new post.

EDIT:
That showed up OK. Now I pressed Edit post, the editor looks different but the A/A button says Switch to Source mode so I guess I'm still in WYSIWYG mode.


ADCON = 101010

EDIT2: And that messed it up.

Ioannis
- 15th June 2012, 11:09
This is WYSIWYG mode:

6529

And this is Source mode:

6528

When the second is selected, the percentage sign is shown.

Ioannis

Darrel Taylor
- 15th June 2012, 19:39
At the top-right of the page, click on Settings.

In the My Settings section on the left, go to General Settings.

Scroll down to the "Miscellaneous Options".

For the "Message Editor Interface:" select the Standard Editor.

At the bottom of the page, click Save Changes.

Your default editor will now be "Source mode".

This could be made the forum default, but it would only apply to new users when they first join.
Each existing user will have to change the setting themself.
Depending on the forum permissions, this may not be available for everyone.

Please report if it is, or is not available to you.

Ioannis
- 15th June 2012, 19:58
Thanks Darrel, it works fine.

Ioannis

HenrikOlsson
- 15th June 2012, 22:05
Thanks Darrel!
Just did that, now let's see what happens

ANSEL=%00101101

EDIT: The above looked fine when first posted. Now I'm editing the message, it still looks OK in the editor.
EDIT2: And after the edit it still seems to be OK. Lets hope everyone here sees this and make the change to their profile because more and more "messed up" code gets posted.

/Henrik.

lester
- 16th June 2012, 09:13
If required, i can set ALL users to default to the standard editor.

just let me know, if that's the group decision.

HenrikOlsson
- 16th June 2012, 10:59
Thanks Lester!
I'm just one member but I think it's a good idea doing that.

/Henrik.

Heckler
- 16th June 2012, 22:59
I vote to make it the default

spcw1234
- 17th June 2012, 15:08
Also vote to make it default!

Ioannis
- 17th June 2012, 19:48
Before I vote, what are the cons?

Ioannis

ScaleRobotics
- 17th June 2012, 20:36
Before I vote, what are the cons?

Ioannis

The only con I see, is that the code posts won't be as neat, and will lose some formatting. But I think that sure beats losing content, like the first 2 msb after each % sign.

I think it all started when we had a wish for neat code ...... http://www.picbasic.co.uk/forum/showthread.php?t=15475

(http://www.picbasic.co.uk/forum/showthread.php?t=15475)
If we default all users to the standard editor, people that really loved the wysiwyg editor could still select it, making it a win/win.

Ioannis
- 17th June 2012, 22:03
Test for code appearance



label:
for i=1to 10
k=k+1
next i


With a little more effort (selecting Courier New) I think code looks OK.

Ioannis

ScaleRobotics
- 19th June 2012, 01:10
Due to popular demand, Lester has changed everyone's settings to use the standard editor as default. The wysiwyg editor ("what you see is what you get" .... well almost!) can still be selected by those that want it.

The wysiwyg editor was cutting off the first two bits after each %. I think there were a couple of other odities as well. If you still with to use the wysiwyg editor, it is still available. Just click on settings, select general settings, and mark the box for the editor of your choice. If you want to keep the standard editor, of course, you don't have to do anything.

6533

Darrel Taylor
- 19th June 2012, 03:51
It seems that the WYSIWYG setting has no affect.

The "Quick Reply" editor is always "Source Mode", and there's no button to switch to WYSIWYG.
But if you click the "Go Advanced" button, the editor is still in Source Mode, but there's a button for WYSIWYG.
It doesn't seem to matter which way the setting is.

Well, except for the "Basic Editor".
You don't want to select the Basic Editor.

So all in all, it works for me. :cool:

ScaleRobotics
- 19th June 2012, 07:42
Oops, I guess you're right. Currently you don't really get a choice, it just looks like you do.