In this guide I will describe you to make comments system and managing it using your own Database.
What you will need
Here is a list of items/resources you will need before getting started…
- A normal Kodular Creator Account ( Kodular Creator)
- A website (000webhost )
- A php script (PuraVidaApps )
- A working MySql database
How it looks from Designer
Here is its design…
Following have been used in making this comment system-
Note:- If you want to show comments in ListView Image and Text then replace ChatView by it
If you are continuing this guide then I assume you have created a Table named ‘Comments’ and four rows named as following-
Blocks are divided into three parts…
1.Save comment in database
I am running an INSERT command to add the given data to the table.
Command: INSERT INTO `Comments` (`Timestamp`, `Id`, `User`, `Comment`) VALUES (‘timestamp‘,’id‘,’image_url */* username‘,’comment‘)
You can use a condition block to check whether query was successful or not.
2.Load comments from Database
I have called all the comments from the table and added to chatview.
Since the data will be returned in the same format as it was added, I have split the data to get a list of values.
3.Load comments for specific ID
I am calling comments for a specific using WHERE clause so comments will be returned only for specific id.
Again we shall have to decode it in such a way that we can use it with ChatView.
Universal ‘Got Text’ event
Procedure to get ‘id’ for Chat View
Comments.apk (5.1 MB)
Here is Aia file download Link:-
Comments.aia (71.6 KB)
Hope it helps!