Recent Topics

1 Sep 02, 2005 22:01    

As it stands now, whenever there's a problem with a URL in a post, a message comes up saying one of three things:

Found invalid URL: Invalid URL
Found invalid URL: URI scheme not allowed
Found invalid URL: URL not allowed

There isn't enough feedback to determine WHICH url is causing the problem and WHY.

An improved method would include more feedback.

By changing the return values for each of the above messages in the /b2evocore/_functions.php file, users could be presented with information that will allow them to more quickly correct the problems. (I've outlined the steps needed to add this in the current production release - 0.9.0.12 - in [url=http://forums.b2evolution.net/viewtopic.php?p=25077]this post[/url]).

Briefly:

Addtional feedback code:

(1) For Invalid URLs:
return T_('Invalid URL - <strong>['.$url.']</strong>');

(2) For disallowed URI schemes:
return T_('URI scheme not allowed - <strong>['.$scheme.']</strong>');

(3) For blacklisted words:
return T_('<strong>['.$url.']</strong> - not allowed because of blacklisted word - <strong>['.$block.']</strong>');

Such an enhancement would increase user satisfaction and the ease with which "Invalid URLs" are detected and corrected.

Hope this helps.

-stk :D

2 Sep 02, 2005 22:18

After trying to help someone on the forum track down one of these errors the other day I was about to suggest the same thing. I wouldn't have posted the code to fix it, though, so I'm glad I waited.

3 Sep 02, 2005 22:29

Wow ... I'm one post away from being "an expert"! :lol:

Glad you like the changes. This "Invalid URL" thing has bugged me for a long time. I used to just turn off the HTML-checker, but then, two weeks later, I'd realize that I forgot to turn it back on. 8| Ouch.

Just this morning, I was thinking about modifying the code so that it skips the URL check for admin-posts (I'm the only one who posts to our blog), but then realized that I needn't be THAT drastic .... just having more feedback would help.

Tracking down WHICH url used to be a real pain. I think the above will make it TONS easier.

Hope so, anyway.

Cheers,

-stk :)

4 Sep 02, 2005 22:52

Another thing I've thought of would be to have a checkbox in the post editing area (for admins only) that turns off the html checker during that post only. It would be opt-in, so you would only use it when you need it, such as when you know the code will work, but you don't want to go edit _formatting.php because this is the only time you'll need to post the code in question.

5 Sep 03, 2005 00:42

Yes, I've thought of that too. It would be useful.

I'll second that feature request.

Another one I'd like: an easier way of editing the allowed HTML. (Like the way a spell checker works) ...

WARNING: attribute "class" not allowed in tag <p>
What do you want to do: [ignore] [ignore all] [add] [edit allowed tags] ?

-stk

6 Sep 03, 2005 00:46

_formatting.php is a pretty scary file. I know that html checking is important, but if it's too hard to do what you want, then some people may turn it off altogether.

7 Sep 03, 2005 19:48

I tried to add the <script> HTML (with some of its attributes) tag to /conf/_formatting.php... First, that file looks pretty cool, but when you try something by yourself, after half an hour of miscellenaous trials and errors, you just leave that file as it was at the beginning and open your [url=www.phpmyadmin.net/]phpMyAdmin[/url] page to insert your tags without any checking...

A "Don't check HTML" checkbox would be fine. However, in order to avoid security issues, it would be fine to restrict it to Administrator or other trusted users...


Form is loading...