flat assembler
Message board for the users of flat assembler.

Index > Main > Thingamy latest version.

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Hi all.

Here is the latest version of Thingamy.

Please, give your opinions about design and behaviour (how it is now and how you think it should be).

btw, if you want to recompile it, you need the latest Fresh includes, because I made some additions here and there. They are probably compatible with those from the official Fresh release 1.1.C

Regards.
Post 23 Jan 2005, 23:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85
There's a bug on 'Open Article', if you click on the 'X' button it won't open after.

Lacks a table feature for articles.

The hability to edit and post articles would estimulate users to write and correct articles, but I guess most of them will just view articles. So I rather use HTML(there are plenty of such editors), 'cause of its avanced display/interaction features, than use BBCode/RichEdit. Still a simple HTML non-WYSIWYG-style editor could be provided.

The whole client it's OK as is. Just my two cents.
Post 24 Jan 2005, 00:37
View user's profile Send private message Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 340
Location: Trollhättan, Sweden
bubach
I think its a good start..
But maybe tabs for diffrent articles?
And why use html when standards change etc? BBcode is fine, but maybe you should add [img ] [email ] and [center ]?

Great work for a short amount of time!

/ Christoffer
Post 24 Jan 2005, 14:21
View user's profile Send private message Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
1st I want to say: it looks very nice!

But there is some notes on Thingamy:

1. If I edit some article or wrote new one and then hit Alt+X (or another kind of exit action) it just exits without asking me to save as a draft. IMHO, there must be a question for user: a) save as a draft, b) post immediately this one, c) post immediately all edited, d) exit without saving ?

2. There is something strange in menus drawing: some accel codes overwrites menu names e.g. "Help on ThingamyCtrl+F1", "Edit\Tags\URShift+Ctrl+L", "Edit\Tags\UnderlinCtrl+U" ?
Post 24 Jan 2005, 15:39
View user's profile Send private message ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
beppe85: I whould be happy to use HTML, but unfortunately there are 2 althernatives: 1. IE - big, slow and buggy. and 2. 3-th party HTML render - big, slow and not so buggy. Very Happy So, until there is no HTML rendering engine suitable for using with asm applications, I think RichEdit is not the best, but acceptable solution. Fortunately several people work on HTML engine in assembly (Pelaillo for example) - so in the future, we can change the viewer.

Also, I think about implementation of tables and images in RichEdit. While the tables are pretty hard, the images should work ok when I found how to insert them in the RichEdit text Very Happy (btw: any help on this issue will be great - the documentation is not clear about the problem.

iklin wrote:
1. If I edit some article or wrote new one and then hit Alt+X (or another kind of exit action) it just exits without asking me to save as a draft. IMHO, there must be a question for user: a) save as a draft, b) post immediately this one, c) post immediately all edited, d) exit without saving ?


Save functions are not implemented yet (and network functions as well). I plan to make them in 2..3 days.

Quote:
2. There is something strange in menus drawing: some accel codes overwrites menu names e.g. "Help on ThingamyCtrl+F1", "Edit\Tags\URShift+Ctrl+L", "Edit\Tags\UnderlinCtrl+U" ?


Yea, this is old known bug in Fresh library - when there is only one menu item, the size of the menu is wrong computed... I have to fix it some day...Smile

Regards.
Post 24 Jan 2005, 15:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
...at new address: http://thingamy.decard.net.

http://thingamy.decard.net/client/ - this directory contains scripts for the client. Currently following scripts are available:

getarticle.php?id=article_id - displays given article, or simple "0" (zero) if it cannot find given article. The article has the following format:

table articles (
id int not NULL primary key auto_increment,
title varchar(128) not NULL,
cat int not NULL,
authid int not NULL,
body text not NULL
);

getarticle.php returns all those fields separated by tab character. Body can contain tabs, but it is always a last field so that should be no problem.

getcat.php - returns all categories, just as we discussed before. You can also use getcat.php?parentid=XX, to get only categories under given parent category.

getlist.php - lists all article ID's, separated by tabs. You can also use getlist.php?catid=XX - to retrive only articles from given category.

On website itself, I implemented basci bbcode parsing (just a few tags now), and implandted Tommy's FASM syntax highlighter.

regards
Post 24 Jan 2005, 15:54
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
decard wrote:
...at new address: http://thingamy.decard.net.

http://thingamy.decard.net/client/ - this directory contains scripts for the client. Currently following scripts are available:

getarticle.php?id=article_id - displays given article, or simple "0" (zero) if it cannot find given article. The article has the following format:

table articles (
id int not NULL primary key auto_increment,
title varchar(128) not NULL,
cat int not NULL,
authid int not NULL,
body text not NULL
);

getarticle.php returns all those fields separated by tab character. Body can contain tabs, but it is always a last field so that should be no problem.

getcat.php - returns all categories, just as we discussed before. You can also use getcat.php?parentid=XX, to get only categories under given parent category.

getlist.php - lists all article ID's, separated by tabs. You can also use getlist.php?catid=XX - to retrive only articles from given category.

On website itself, I implemented basci bbcode parsing (just a few tags now), and implandted Tommy's FASM syntax highlighter.

regards


Hi, Decard.
It is great. Only one note: We need getcat.php?id=xx - to return information about only one category. The process of updating (as I see it) is following:
1. The client retrieves the whole list of articles ID's and compares them with it's own list of articles - IMHO, even if the count of the articles is pretty big, the list should stay with acceptable size. (whether?)
2. The client retrieves all the articles that are missing from the local database.
3. If the retrieved article have category that is not listed in client category tree - it downloads the information about this category (and for parent categoryes if needed) and adds these categories to the tree - so, there will be no need for downloading whole categories tree at once.


Regards
Post 24 Jan 2005, 16:12
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
done Wink
Post 24 Jan 2005, 17:01
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Thanks. Smile

btw: Did someone knows how I should connect through proxy server? Any links to the usefull info would be great.


Regards.
Post 24 Jan 2005, 17:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85
I made some research and found the following:

Here ( Some very long URL) says that Win98(RichEdit2.0) don't have table support. I don't know if there are any redists.

On this page ( http://www.biblioscape.com/rtf15_spec.htm ) I learned that tables are a option for a whole paragraph. It also contains the RTF codes for tables.

I tried using rich edit messages without luck.

But there's the EM_SETTEXTEX and EM_REPLACESEL which permits using RTF markup.


Description: Demo program(in Delphi) plus sample rtf file
Download
Filename: Tables.rar
Filesize: 169.28 KB
Downloaded: 344 Time(s)

Post 25 Jan 2005, 12:22
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Thanks, beppe85. I will check your info very carefully.

Your example program doesn't work for me, but the code from the example .rtf file, pasted in edit window of Thingamy works fine. So, it is possible to create simple tables in .rtf and I simply have to think about some bbCode tags about it.

Regards.
Post 25 Jan 2005, 12:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
2 JohnFound

1. This http://sulaiman.netadvant.com/Reitp.rar is from PSDK. There is example how to insert objects in RichEdit using OLE. But, IMO, this is a too complex way for Thingamy.

2. Do you look this http://www.kakeeware.com/i_kb.php. This browser uses Explorer OLE Control or Mozilla ActiveX. Freeware (+ MASM sources freely available). And there http://www.iol.ie/~locka/mozilla/control.htm is Mozilla ActiveX control.

If it will help you in some way... Confused
Post 25 Jan 2005, 16:37
View user's profile Send private message ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
iklin wrote:
2 JohnFound

1. This http://sulaiman.netadvant.com/Reitp.rar is from PSDK. There is example how to insert objects in RichEdit using OLE. But, IMO, this is a too complex way for Thingamy.

2. Do you look this http://www.kakeeware.com/i_kb.php. This browser uses Explorer OLE Control or Mozilla ActiveX. Freeware (+ MASM sources freely available). And there http://www.iol.ie/~locka/mozilla/control.htm is Mozilla ActiveX control.

If it will help you in some way... Confused


Thanks for the help, I will check the links.
btw: Thinking on the subject for .rtf, maybe it is better to not use the whole RichEdit API to format the text, because this binds the sources with Windows and RichEdit control more than I want. On the other hand, .rtf format is portable and standard format, so if I make direct .RTF formating and then only feed RichEdit with formated text, this will ensure easy transition to another .rtf viewer. (and IMHO this approach will be smaller, faster and more "assembly way" Smile )

btw: I am almost ready with the first version of the network layer. Tomorow it should be published...

Regards.
Post 25 Jan 2005, 18:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Hi all.
We have the next work version of Thingamy.
Now it can:
1. To create new empty database. Simply choose "Database|Open/Create database" and choose some not existing name.
2. To synchronize the database articles/categories with the online Thingamy server. (for now only with Decard's server at http://thingamy.decard.net but it is not a problem, as far as this is the only Thingamy server in the world. Wink ) - just open database (btw, there is one named "decard.tdb in the package) and choose "Database|Syncronize" from the menu.
3. To edit the articles source code and to preview the code in the article window.

It still can't post new articles, neither save them as a local drafts - this is the next point in to-do list. Wink

Regards.
Post 27 Jan 2005, 01:44
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
To Decard:

Hi, Mateusz.

Let's specify the format of the posted articles for Thingamy.
I think to use following format:
Code:
POST http://thingamy.decard.net/client/post.php HTTP/1.1<CRLF>
<CRLF>
CatID<TAB>Author<TAB>title<TAB>Body
    


Then your script returns single number > 0 for the articleID, that to be assigned to the article in the local database or 0 if error.


Can you handle such request in PHP (I am not so good in PHP...) or it is better to make URL encoding of the fields and to send them like web browsers:
Code:
POST http://thingamy.decard.net/client/post.php HTTP/1.1<CRLF>
<CRLF>
catid=CATID&autor=AUTHOR&title=TITLE&body=BODY<CRLF>
    


Where AUTHOR, TITLE and BODY are URL like encoded - with %20 for spaces for example?

Also, I am not sure about the authors. How we have to handle them? Do you think we have to use some registration or simply assign unique ID for every author string specified?

Regards.
Post 28 Jan 2005, 19:02
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Johnfound wrote:
Can you handle such request in PHP (I am not so good in PHP...) or it is better to make URL encoding of the fields and to send them like web browsers: (...)

Well, I can't. At least with my local Apache server... it returns this:
Quote:
<p>Your browser sent a request that this server could not understand.<br />
Request header field is missing ':' separator.<br />

is it a valid format for POST method?

Quote:
Where AUTHOR, TITLE and BODY are URL like encoded - with %20 for spaces for example?

I don't know actually Confused I have to find out how POST data should be kept...

Quote:
Also, I am not sure about the authors. How we have to handle them? Do you think we have to use some registration or simply assign unique ID for every author string specified?

Currently I use the second method - IMO author registration is not necessary.
Post 29 Jan 2005, 09:11
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I have done simple test (brutal Wink ) to obtain information that browser really sends with POST method. To make apache accept POST request, you need to send at least this:

Code:
POST /thingamy/client/post.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 38

lang=en&content=dfdsfdsfdsfdsf&add=add    

where Content-Lenght is a length of last line (witout CRLF) of course.
"application/x-www-form-urlencoded" proably mean that you have to code variables with urlencode() PHP function (actually its fasm version).

BTW, I met an ugly problem with PHP and MySQL: When I insert new record to a table, I don't know its ID field, so I pass NULL (it has auto_increment flag). But after adding a record, I would like to know ID number that was just assigned to that record. How can I read it? (using PHP functions....). Confused

regards
Post 29 Jan 2005, 09:39
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
decard wrote:
I have done simple test (brutal Wink ) to obtain information that browser really sends with POST method. To make apache accept POST request, you need to send at least this:

Code:
POST /thingamy/client/post.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 38

lang=en&content=dfdsfdsfdsfdsf&add=add    



OK, I thoght this can be the case. Nevermind, I have simple URL encode function now (btw: I added it to strlib.asm) and it is not a problem to send the request in proper form.

Quote:
When I insert new record to a table, I don't know its ID field, so I pass NULL (it has auto_increment flag). But after adding a record, I would like to know ID number that was just assigned to that record. How can I read it? (using PHP functions....). Confused


Actually it is common problem for autoincrement fields in any SQL database. As far as the latest added record have bigger ID, following SQL statement should do the job:
Code:
select max(ID) from Articles;    


Regards
Post 29 Jan 2005, 11:07
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
post.php is on the server now. POST variables that you have to pass:

title
catid
user
body

and script will return new article's ID (or 0 on error). User is actually an email address. You don't need to worry that he already exists in database - server checks that for you.

What about getting user's email? Is it just enough to create some script that will recive user ID and will return email? Maybe characters in email adress should be encrypted somehow?
Post 29 Jan 2005, 12:01
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Thank you. I will create post feature asap.

decard wrote:
What about getting user's email?


Well, actually I don't think it is good idea... IMHO forcing the author to give his e-mail is not very correct. Also, I can't see any way to hide these e-mails from spamers, if we make these e-mails to appear in the offline database. Of course the e-mail is OK, if the administration of the central database (you Wink ) want to contact author about his articles...

So, I suggest following: When the author post an article, he will add it's e-mail and I will post it to you, but there will be no way to extract the e-mails from the central database. Thingamy client will not atempt to identify the author (will ignore AuthorID, or better you can remove this field from the responce "getarticle.php" returns to the client.)
If some author want to give his name or nickname and/or some contact information - web site, e-mail, etc. - he simply can type this info in the article.
Of course you can make in the site some password protected page, that to allow administrator to check the authors e-mail when he needs to contact some of them.

What you mean about this approach?

Regards.
Post 29 Jan 2005, 12:39
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.