This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Changing code
#51

Just a quick update on recent progress.

I have been working on the link parsing feature today.

I have the basics of it working. It successfully converts all of these links (added spaces for preservation):

h ttp://www.test.com
h ttps://www.test.com
h ttp://test.com
w ww.test.com
w ww.test.com/test.php#test
tester@test.com
f tp.test.com

You will be able to turn the feature on and off in the admin panel.
Settings -> Processor -> Comment

Also it will have settings such as:
- Choose whether the links should open in a new window or not.
- Choose whether links should contain the 'rel=nofollow' tag.
- Choose whether to convert email links, web links or both.

Edit: Actually I should probably also add the 'rel=nofollow' and 'new window' options for the website field too.

Have you completed the interview?
Reply
#52

Nice job! The 'new window' option should be helpful for people who would like it to validate at xhtml strict. You know, I think that I might make a version that does just that? Do you think it's it worth it? Any update as to the Unicode decisions?

EDIT: to preserve the links, add &­#173; between the characters. Example: h­ttp://www.google.com. I added &­#173; after the 'h'. I did the same for the &­#173;

I'm giving you three guesses...
Reply
#53

I haven't thought anymore about utf-8. I'm going to concentrate on it once the link parsing feature is done. My current thinking is that I won't attempt to convert existing tables, and that Commentics will be utf-8 only. If the user doesn't want or know about utf-8 then they simply don't add the charset. Does that sound reasonable?

You're thinking of changing Commentics so that it validates as xhtml strict? That would be very welcome! Also it would be great if you had a look at validating the css too.

Have you completed the interview?
Reply
#54

I don't get the part about the tables. You'll need to convert them to Unicode in order for the comments to work in Unicode. Converting all of them to Unicode will help for translations.

(24-Jul-2010, 11:48 PM)Steven Wrote:  If the user doesn't want or know about utf-8 then they simply don't add the charset. Does that sound reasonable?
Yes, that's reasonable. Don't know why anyone wouldn't want it other than font issues. A meta tag can fix that, I think.

Glad you think that xhtml strict would be welcomed. The css too. The admin panel keeps throwing me css errors in Opera (a great browser that you should try out), since it's on a localhost. Unfortunately, I have to finish some other things first, so I'll only be able to start in a couple of weeks. No one should die from the lack of xhtml strict by that time, I hope XD.

Is it around twelve o'clock over there? On the demo page, it seems like it because a comment that was posted sometime today (in my timezone) says yesterday.

I'm giving you three guesses...
Reply
#55

I just wasn't sure whether the upgrade from v1.0 to v1.1 should attempt to convert already existing tables to utf-8. I need to look into how difficult (risky) that would be. Obviously a fresh install of v1.1 will set the tables as utf-8. Obviously upgraders would need to convert their tables themselves if they wanted to use utf-8.

Yeah I do like Opera, I used to use it as my main browser! It's also the browser which my mobile phone uses. However I find Firefox to be best. I customize it with tons of add-ons. I might look into your Opera css errors although I care most about Commentics working in Firefox, IE and Chrome.

It's about 1.40am here in the UK.

Have you completed the interview?
Reply
#56

1. FAQ on upgrading will help.
2. Don't worry about the errors. I just ignore them. It's nothing important, and I'll fix it when I need to, so it shouldn't matter at all.
3. I have a feeling that I have something to do with you sitting up so late Undecided. Sorry for keeping you up so late. I'll post earlier. If I'm keeping you awake, then just ignore my posts. I could wait 'till the morrow.
Good night -_-{Zzz..)

I'm giving you three guesses...
Reply
#57

Implementing utf-8 seems to, on a whole, be going to plan so far.

The only issue at present is validating fields such as name, town etc.

Part of the validation for those fields requires there to be at least one letter.

When entering 'foreign' letters it fails this validation as there are no a-z letters.

Aside from removing the 'at least one letter' requirement, do you have any ideas?

Have you completed the interview?
Reply
#58

Well, I don't know. Maybe a check against all characters of all alphabets...
really bad idea... I think that as long as the name isn't empty and has at least 1-3 of any non-numeric character, nobody would mind. This article might give you a heads up on other issues that might be encountered: http://www.phpwact.org/php/i18n/charsets

I'm giving you three guesses...
Reply
#59

I really knew I wouldn't enjoy this "utf-8".

It looks like I will have to remove the 'at least one letter' requirement then.

I couldn't see any 'major' issues from your link. It seems that counting the lengths of strings won't be totally accurate in some cases, but that's not the end of the world.

Interesting to see that PHP 6 will support it natively.

Have you completed the interview?
Reply
#60

Yeah, utf-8 is complicated. I only scanned the page. string lengths is all I saw too. Just randomly brought it up. Thought it might be useful.
Quote:Interesting to see that PHP 6 will support it natively.
It will?! That's great news. Where did you find that? I haven't really been up to date on php recently.
Oh yeah, if it interests you, a googlebot was on here a couple of hours ago, and your script seems to be featured on more sites.

Make sure that the email and website fields only check for ASCII characters. They shouldn't validate otherwise.

I'm giving you three guesses...
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by noblues
09-Jun-2014, 10:11 PM
Last Post by Steven
10-Oct-2013, 09:51 PM
Last Post by 2hands
30-Dec-2012, 01:34 AM
Last Post by 2hands
24-Jun-2012, 08:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)