[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Forum maken met PHP en MySQL
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Forum maken met PHP en MySQL

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Forum maken met PHP en MySQL

Berichtdoor Stefan » 13 okt 2008 16:16

Ik ben nu al een tijdje bezig met maken van een forum, alleen nu vraag ik jullie of mijn databasestructuur goed is, en of ik er eventueel wat aan kan veranderen.

tabel forum:
forum_id int(11)
permission_id int(11)
role_id int(11)
categorie_id int(11)

tabel forum_categories
categorie_id int(11)
categorie_name varchar(255)
categorie_descr varchar(255)
categorie_sub int(11)
categorie_color char(10)
categorie_order int(11)
categorie_closed (1)

tabel forum_permissions
permission_id int(11)
permission_read enum('0', '1')
permission_add enum('0', '1')
permission_edit enum('0', '1')
permission_del enum('0', '1')
permission_close enum('0', '1')
permission_replace enum('0', '1')

tabel forum_topics
topic_id int(11)
topic_title varchar(50)
topic_content longtext
topic_status (1)
topic_type tinyint(1)
topic_datetime datetime
topic_ipaddr varchar(40)
topic_edit_datetime datetime
topic_edit_ipaddr varchar(40)
categorie_id int(11)
user_id int(11)

tabel forum_roles
role_id int(11)
role_name varchar(255)

tabel forum_replies
reply_id int(11)
reply_content longtext
reply_datetime datetime
reply_edit_datetime datetime
reply_ipaddr varchar(40)
reply_edit_ipaddr varchar(40)
topic_id int(11)
user_id int(11)

tabel users
user_id int(11)
user_name varchar (40)
role_id int(11)

Het forum wat ik tot nu toe werkt helemaal, alleen de reacties moet ik nog inbouwen. De permissies per rol per gebruiker werken prima! Kolommen met dezelfde naam zijn in de code met elkaar gelinkt.

Laat even wat van jullie horen, wat eventueel anders kan of misschien omdat het jusit wel goed is!
Opzoek naar een webdesigner? http://webtilize.net/
Avatar gebruiker
Stefan
wmpr
 
Berichten: 406
Geregistreerd: 27 dec 2007 14:08
Woonplaats: Ter Aar

Re: Forum maken met PHP en MySQL

Berichtdoor Derk » 13 okt 2008 16:59

doe je de topics nu in een Category (volgens mij schrijf jij dat fout) of doe je die in een topic?

Edit:
Ik zie dat je in je topic ook gelijk je eerste post opslaat? Dat is een beetje dubbel op. Je kunt beter de eerste post van je topic ook als post opslaan :)

Edit2:
ik heb ff een erd gemaakt met wat dingen die ik anders zou doen. Maar dat post ik nadat ik naar de winkel ben geweest...
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Forum maken met PHP en MySQL

Berichtdoor Stefan » 13 okt 2008 17:23

Opzoek naar een webdesigner? http://webtilize.net/
Avatar gebruiker
Stefan
wmpr
 
Berichten: 406
Geregistreerd: 27 dec 2007 14:08
Woonplaats: Ter Aar

Re: Forum maken met PHP en MySQL

Berichtdoor Derk » 13 okt 2008 17:46

http://zooimap.vedelaar.nl/ERD_nu.jpg
Dit is wat je nu hebt gepost.
http://zooimap.vedelaar.nl/ERD_edit.png
Zo zou ik het doen.
#1, die relatie, als je kijkt naar webmasterplein. Support is een category, en daarin zitten 3 forums. "HTML, CSS, Javascript", "PHP, ASP, SQL" en "Graphics". In een forum zit dan dus een topic, niet in een category.

#2, Als je de eerste post, in de forum_reply's zet, heb je de velden in Forum_topics niet nodig. Forum_posts zou daarom in dit geval ook een beter naam zijn voor de reply's tabel.
Ovirgens denk ik dat dit ook een beetje smaak is. Maargoed, als we naar je code gaan kijken, zo hoef je geen 2 edit pagina's te maken (alleen voor het topic title mischien).

#3, ik snap niet waar deze tabel voor is. Gelinkt aan een gebruiker en een forum?


Leuk dat je het post ovirgens, vind het altijd leuk te discussieren over databases :)
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Forum maken met PHP en MySQL

Berichtdoor libia » 13 okt 2008 17:52

Laatst bijgewerkt door libia op 14 okt 2008 10:23, in totaal 1 keer bewerkt.
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Forum maken met PHP en MySQL

Berichtdoor Stefan » 13 okt 2008 18:12

Opzoek naar een webdesigner? http://webtilize.net/
Avatar gebruiker
Stefan
wmpr
 
Berichten: 406
Geregistreerd: 27 dec 2007 14:08
Woonplaats: Ter Aar


Keer terug naar PHP, ASP, SQL



cron