Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 18 users online :: 0 Registered, 0 Hidden and 18 Guests :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Creating a database table
Page 1 of 1 • Share
This topic will guide you through the steps of creating a database table.
Creating a database table
To create a new table go to your database control panel. ( the topic you created during installation ) If you're using the latest version you'll see an option in the navigation titled new table. Click this button and it will open a popup with a textarea.
In this textarea you'll be able to create your table; It is recommended you use bbcode tables. For it to show in the database list correctly, two vital attributes need to be included :
Class : The classname of your database table should be database_table. e.g. class="database_table"
ID : The ID of your new table should be a special one that refers to the purpose of the table. Take fa_likes as an example.
The basic layout should look something like this :
As you can see in the example above, there's a default table row; this row will serve as the header label. These labels will help you identify what purpose the values of later rows serve.
When finished click submit and the new database table should be created.
Manual modifications of the newly added table can currently be made by clicking edit database from the navigation, and clicking the edit button on the post it belongs to.
Creating a database table
To create a new table go to your database control panel. ( the topic you created during installation ) If you're using the latest version you'll see an option in the navigation titled new table. Click this button and it will open a popup with a textarea.
In this textarea you'll be able to create your table; It is recommended you use bbcode tables. For it to show in the database list correctly, two vital attributes need to be included :
Class : The classname of your database table should be database_table. e.g. class="database_table"
ID : The ID of your new table should be a special one that refers to the purpose of the table. Take fa_likes as an example.
The basic layout should look something like this :
- Code:
[table id="fa_test_table" class="database_table"]
[tr][td]Header 1[/td][/tr]
[/table]
As you can see in the example above, there's a default table row; this row will serve as the header label. These labels will help you identify what purpose the values of later rows serve.
When finished click submit and the new database table should be created.
Manual modifications of the newly added table can currently be made by clicking edit database from the navigation, and clicking the edit button on the post it belongs to.
A database is a for storing data. The tables I'm using help layout that data so it's easily read and retrieved when I need it. The table below holds the id of a post and the people who liked that post.brandon_g wrote:What exactly is a database table?
Inside the table we have rows and cells. In the above table I attach a special ID to one of the cells, so I can easily retrieve the data I need and display it in the post.
You can actually view the database and its tables here : https://fmdesign.forumotion.com/t252-database
Correct, it's a topic.
There's no other way offered by Forumotion to store simple data such as the kind I've stored so far. I wanted to make it similar to a standard database table such as mySQL. It's just a bunch of bbcode tables, you can add as many columns, rows, etc as you want.. The only drawback would be the message character limit.
There's no other way offered by Forumotion to store simple data such as the kind I've stored so far. I wanted to make it similar to a standard database table such as mySQL. It's just a bunch of bbcode tables, you can add as many columns, rows, etc as you want.. The only drawback would be the message character limit.
If the database is for storing staff-specific data, then yes.brandon_g wrote:Ah ok, should it be a hidden topic, like in a staff lounge or admin lounge or something.
For public data, like the plugins I'm developing, you can find instructions here : https://fmdesign.forumotion.com/t281-a-database-for-your-forumotion-forum
Unfortunately the first plugin is currently phpbb3 specific, but I'll look into supporting all versions for it eventually.
Ok, So why does it have to public to store public data, is this for the forums data, i mean is it like an automated thing the forum just takes from or does a humah moderator have to manually update it?
It has to be public, because all members will be able to moderate the forum which the topic is in. This allows them to freely edit any database table, except they're not really editing it, a script programmed to do so, is. Take the like button installed here for example,
When you click the like button, you're editing the database table which contains the likes and updating it with a new row or your name.
The forum itself will be hidden from all members except admins, but the topics within the forum can still be viewed. Having it completely open like I've done has some security risks like I've highlighted in the installation topic. As long as everything is taken into account and you're aware, you'll be fine. I've done it like so, so members can update and see the changes to the forum instantly.
When you click the like button, you're editing the database table which contains the likes and updating it with a new row or your name.
The forum itself will be hidden from all members except admins, but the topics within the forum can still be viewed. Having it completely open like I've done has some security risks like I've highlighted in the installation topic. As long as everything is taken into account and you're aware, you'll be fine. I've done it like so, so members can update and see the changes to the forum instantly.
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum