posted by frik85 on Tue 6th Mar 2007 18:55
Conversations IMHO, the comment function should work like this: write a text as usual and then highlight the text using the mouse/keyboard and click on bold, italic or link. Bold and italic shall surround the highlighted text with the related bbcode tags. The link button shall open a input-promt where the user can insert the hyperlink and the highlighted text will get surrounded with the additional "code". If nothing is highlighted, it may work as it is implemented in the current beta version.
Previous ConversationNext Conversation
Comments:
... addition
by frik85 on Tue 6th Mar 2007 19:23 UTC
frik85
Member since:
2006-01-26

The "live" preview shall be on-the-fly (with a short timeout after the latest textbox 'onchange' event) and to implement such feature shall be a piece of cake.

"No more than 8192 characters are allowed" ... says the comment info text beneat this comment textbox; why exactly 8192 chars? Average joe is not interested in such detailed info ;)
.. but a count-down feature like the "submit conversation" might be useful (instead).

There is a (small) bug in the live-preview of "submit conversations". There is a link withs points to a conversations which don't exist and an error shows up.

An hint for the "Your Account" (right) sidebar navigation names. The links shall be labeled without the "your" infront, which would increase readability. The visual layout might look even better if the "*" chars get replaced with a similar symbol using a transparent gif and using CSS to apply it.

I have read that the OSNews staff has been working hard to support most browsers around the globe. That's a nice thing.
Please keep in mind that 'still' about 40% of all internet users use Internet Explorer 6!
( http://www.w3schools.com/browsers/browsers_stats.asp )
And Internet Explorer up to version 6 don't support transparents PNG files ... except you add a few lines of CSS to add a special (DirectX powered) filter. Please consider using transparent GIF files or adding about two extra lines of CSS for IE 4-6.


If there are any questions, I will try to answer them.


btw. I just found out what's the URI of OSNews v4, there has been a link to it in the following news entry content ;-)
http://www.osnews.com/story.php/17439/OneCare-Fails-Second-Virus-Te...

Reply Score: 2

frik85
Member since:
2006-01-26

I have taken a look at OSNews v4 ajax.js file and found a lot of code redundancy. I know it is a beta 'release' and several things might change, etc.
Nevertheless, just in case you haven't heard about:

Using browser switches is not a "best practise". Better test most functions which might cause problems, if it work on the client, if not provide a fallback solution. I am speaking about code line 1 to 15 (just in case), labeled "AJAX init".

The following functions "swRSS", "bookmark", "recommendThis", "starOn", "starOff", "suggest", "chkUsername" and "m" can be replaced by just two functions and one switch-case to avoide code redundancy and improve maintain time and cost (and of course file size).

If someone is interested to alter the ajax code, please have a look at the following page:
http://developer.mozilla.org/en/docs/AJAX:Getting_Started

... especially "Step 3 - A Simple Example" explains everything and is probably THE way to go.
It means one ajax function does everything, and one "helper" function does the right task, with a switch-case.

I want to point to the following code line which will help you a lot of troubles in future:

httpRequest.onreadystatechange = function() { alertContents(httpRequest); };

... "alertContents" is the helper-function and "httpRequest" is the HTTP-request ... bingo it is just that easy ;-)

If someone at OSNews think, there is no need to alter anything, that's fine, it's your code. I was just trying to provide some feedback (beta phase) and be a bit helpful.


If someone has questions about it, please feel free to ask.


btw. I have been using "AJAX" for a lot of applications since 2002 (back then it was trident and gecko 'only') and I know what I am writing about.

Reply Score: 2

... more
by frik85 on Tue 6th Mar 2007 20:02 UTC
frik85
Member since:
2006-01-26

http://www4.osnews.com/images/login.gif looks weird on e.g. (in Firefox 2, without logged in):
http://www4.osnews.com/post?n=45edb910&t=conv


The comment-textbox shall be a bit more integrated to the comment view of a news-entry.
Clicking "reply" shall show a textbox below the "original" comment. The submit process could be implemented using AJAX form-"POST".

A little bit of javascript code shall do the job:

http_request.onreadystatechange = function() { helper(http_request, action, objid); };
http_request.open('POST', url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);


... "parameters" are the textbox value (and titel-value) put together in urlencoded format, like this:

parameters = "titel=" + encodeURI(document.getElementById("commentbox").innerHTML);

where "commentbox" is the ID of the comment textbox and "helper" is the helper function.


... as mentioned above, just a suggestion.

Reply Score: 2

... even more feedback
by frik85 on Tue 6th Mar 2007 20:27 UTC
frik85
Member since:
2006-01-26

"-" (voting down) is not well implemented and simply don't work with IE 6.
An javascript error occur, after clicking on "cancel" on the first (of many, as the ajax.js says) messagboxes.


"preferences" usability issues?

Picture change function:
MsgBox says 'If you follow this link, you will lose all information in this form.' ... :S

I though I would have to input all account data again (email address, pwd, etc.), but it was not the case, more later.


"Your current account picture is:"
... the same as before (at least the preview) and no link backwards is available.

No data bits got lost and the picture was online, good. I was able to find back by clicking on "* Your preferences" link located at the sidebar.



http://www4.osnews.com/topics ... looks especially in IE 6 a bit "unsorted".
To make it short it looks more like a weird tag-cloud, than anything else. It looks as it was supposed in Firefox 2 and IE 7.

It might be your intention not to make it especially compatible with IE 6 as Microsoft already released IE 7 and trys to push it to WinXP installations too.

Reply Score: 2

RE: ... even more feedback
by Adam S on Wed 7th Mar 2007 13:36 in reply to "... even more feedback"
Adam S Member since:
2005-04-01

"-" (voting down) is not well implemented and simply don't work with IE 6.
An javascript error occur, after clicking on "cancel" on the first (of many, as the ajax.js says) messagboxes.

I don't have IE6. Can you provide me the errors? Opera and Firefox should give you some detail.

Picture change function:
MsgBox says 'If you follow this link, you will lose all information in this form.' ... :S

I can make this clearer. Ultimately, you will lose unsaved changes.

"Your current account picture is:"
... the same as before (at least the preview) and no link backwards is available.

Sure there is. In the sidebar. But I can add another.

http://www4.osnews.com/topics ... looks especially in IE 6 a bit "unsorted".

It uses plain, standard CSS for organization. Do you have a screenshot of what "unsorted" looks like?

Thanks for the feedback.

Reply Score: 1

RE[2]: ... even more feedback
by frik85 on Wed 7th Mar 2007 15:53 in reply to "RE: ... even more feedback"
frik85 Member since:
2006-01-26

"-" (voting down) is not well implemented and simply don't work with IE 6.
An javascript error occur, after clicking on "cancel" on the first (of many, as the ajax.js says) messagboxes.


http://img120.imageshack.us/img120/6205/osnewsv4bugs02ff9.jpg
... basicly it's the same error that another user pointed out earlier in the "conversations" forum, and you answered that you fixed it ..., well maybe for gecko but not for trident/jscript (aka IE).


http://www4.osnews.com/topics ... looks especially in IE 6 a bit "unsorted".

It uses plain, standard CSS for organization. Do you have a screenshot of what "unsorted" looks like?


http://img441.imageshack.us/img441/4672/osnewsv4bugs01oa8.jpg

Reply Score: 2

frik85
Member since:
2006-01-26

test textbox security
<script language="javascript" type="text/javascript">
alert('test');
</script>

Reply Score: 2

frik85 Member since:
2006-01-26

current implementation is not secure, cross side scripting attacks are possible.

Please review and double proof your php (afaik) backend code, just to make sure simple CSS is not possible in final version.

Reply Score: 2

Adam S Member since:
2005-04-01

I will respond in detail later. The script is very safe, I just had it in reduced mode as I was testing full UTF-8 and htmlspecialchars.

I've turned on the full function again. The script is now blocked again.

Reply Score: 1

frik85 Member since:
2006-01-26

okay, good to hear, thanks for the response

Reply Score: 2

General Responses
by Adam S on Wed 7th Mar 2007 13:28 UTC
Adam S
Member since:
2005-04-01

IMHO, the comment function should work like this:
write a text as usual [...] Bold and italic shall surround the highlighted text with the related bbcode tags

There is no *efficient* javascript (that I can write or find) that can capture text from a textarea. I don't want to load a huge javascript like tinyMCE. I can select text on the page, but not from inside a textarea. If you have a script that does this, please pass it along.

The "live" preview shall be on-the-fly

No, we don't want to use event handlers like onkeydown or onchange, and furthermore, I tend to find as-you-type previews to be extremely annoying and distracting. You're right, it would be easy to do, but we're not going to do it.

There is a (small) bug in the live-preview of "submit conversations". There is a link withs points to a conversations which don't exist and an error shows up.

I will fix all the preview links. Thanks.

The links shall be labeled without the "your" infront, which would increase readability.

Increases readability according to whom? I am undecided on this one. "Bookmarks" is not particularly descriptive - whose bookmarks?

Please keep in mind that 'still' about 40% of all internet users use Internet Explorer 6!

Yes, I know about, and intend to add, the ActiveX scripts to allow transparent PNGs and just haven't yet. I'm not overly concerned about it though. We are aiming for a technical userbase.

I have taken a look at OSNews v4 ajax.js file and found a lot of code redundancy.

All scripts are unoptimized as of yet. My goal is easy code maintenance though, since we have a tendency to change things often.

The comment-textbox shall be a bit more integrated to the comment view of a news-entry

That's not going to happen right now. Maybe later.

Okay, more in the next comment.

Reply Score: 1

RE: General Responses
by frik85 on Wed 7th Mar 2007 16:12 in reply to "General Responses"
frik85 Member since:
2006-01-26

There is no *efficient* javascript (that I can write or find) that can capture text from a textarea. I don't want to load a huge javascript like tinyMCE.

TinyMCE is too bloated, it is good for admin backend, but not for frontend.


I can select text on the page, but not from inside a textarea. If you have a script that does this, please pass it along.

One solution would be like this examples:
http://javascript.internet.com/page-details/highlighted-text.html

Just capture the selection and then insert the captured text only after the user clicked on the button.


Increases readability according to whom? I am undecided on this one. "Bookmarks" is not particularly descriptive - whose bookmarks?

"Account"
* Profil
* Comments
* Starred Stories
* ...

Have you heard that Microsoft removed the "My" of all "my documents", etc. folder names, just for the same reason. The "my" is not needed, and just make it harder to find the right menu entry.
A user trys to scan the menu entries, and probably read only the first word of each row to speed the process up a bit. If the user try that technique on OSNews v4 he/she only reads "your", "your", ...
I know that it's my account, because he don't think I have access to other accounts ;)

Reply Score: 2

RE[2]: General Responses
by stestagg on Thu 8th Mar 2007 14:29 in reply to "RE: General Responses"
stestagg Member since:
2006-06-03

I think that Frik sounded a bit critical in many of his posts, and that your code is yours to do as you please with, as long as it works in the end ;) .

However I agree with him on this one, the enless list of 'your' prefixes is just fluff. The context is determined by the title: 'Your Account' and it just takes longer to have to read then discard all the 'your's in the list.

Reply Score: 2

more about the comment function
by frik85 on Wed 7th Mar 2007 16:26 UTC
frik85
Member since:
2006-01-26

The "quote" function doesn't work as expected.
The quote text shall be in the textbox by default or the "import" button shall work correct.
Currently the "reply text import" button import bogus text (too many

) plus additionally the "live"-preview feature is not matured enough to handle nested quotes nor bogus text with too many quote-tags.
IE jscript just shows an error message.
Hint: test the script in Firefox 2 (using debug console) and in IE 6 or 7, if the script works fine in IE and FF than it will probably work fine in Safari and Opera too.

I think OSNews v4 have at least two (if not three) different "forks" of the comment function code.
Every comment submit looks slightly different, plus it behaves different and has different bugs/glitches.
Why not use one comment code and use it for the whole website?


Live preview:
The live preview shall like this, onchange event of the textbox call a function which contains a clearTimeout() and a timeout(), after the preview function will be called.
Every onchange event clears any old timeouts which haven't run to zero yet.

window.clearTimeout(active);
active =window.setTimeout("commentpreview()", 10000);

... timeout is set to 10 seconds

Reply Score: 2

comment edit function
by frik85 on Wed 7th Mar 2007 16:29 in reply to "more about the comment function"
frik85 Member since:
2006-01-26

There shall be a comment edit function which is active for e.g. 10 mins to allow the user to fix spelling mistakes, etc.
Especially, as the comment submit is on a seperated page, someone else may have already posted about the very same thing, and it would be great to adjust the personal comment short after submitting it.

Reply Score: 2

RE: comment edit function
by Adam S on Wed 7th Mar 2007 19:12 in reply to "comment edit function"
Adam S Member since:
2005-04-01

You do realize this is a BETA version of the site, right?

The main site has an edit function, but the conversation code does not yet. It's not a bug, it's a feature I haven't put in yet.

I appreciate your feedback, but you have to give me some time to complete the code before you report missing features.

That said, I will look into any parsing errors.

Reply Score: 1

RE[2]: comment edit function
by frik85 on Wed 7th Mar 2007 20:47 in reply to "RE: comment edit function"
frik85 Member since:
2006-01-26

I know that OSNews v4 is in beta status and I am just giving feedback.

Although, as far as I remember there have been discussions about removing "edit comment" function completely. That's why I have mentioned it, as it is (IMHO) an important feature.

Reply Score: 2