[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/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/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/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/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 - [php]Reactiesysteem zonder 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

[php]Reactiesysteem zonder mysql

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

[php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 15 feb 2006 14:41

Iedereen ken die weblogs/blogs wel he, leuke daarvan is vind ik is dat je als bezoeker gelijk kan reageren op zo'n stukje. Je leest dan het verhaal, en onderaan staat meestal gelijk al het formuliertje om te reageren. Nu wil ik in de toekomt op mijn website bij sommige items dat mensen net zo kunnen reageren als bij een web-log. Nu heb ik een script gevonden zonder mysql, die erg op dat systeem lijkt, maar het nog niet helemaal is.
Ik heb de volgende bestanden erbij!

update.php
comments.dat
entries.dat

Vraag, hoe voeg ik het het formulier in een bestaande pagina, en hoe verbouw ik het script waardoor het ongeveer het zelfde is als bij een weblog.
Het script is te vinden bij http://www.anouksweb.nl/ en dan ga je naar PHP dan naar systemen, en dan reactiesysteempje (zipfile)
Laatst bijgewerkt door Marcello op 01 jan 1970 01:00, in totaal 8 keer bewerkt.
Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 14:44

Plaats anders even een link naar waar je het script vandaan hebt, dan kunnen we het zelf uitproberen Smile

Sowieso is een script met MySQL een stuk handiger voor dit soort dingen, vooral omdat alles dan wat makkelijker te beheren is.
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 15 feb 2006 15:03

Verrek de hele code past er niet eens op Confused
edit: en dan ga je naar PHP dan naar systemen, en dan reactiesysteempje (zipfile)
Laatst bijgewerkt door Marcello op 01 jan 1970 01:00, in totaal 3 keer bewerkt.
Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 15:05

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 15 feb 2006 15:17

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 15:47

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor LinkinTED » 15 feb 2006 17:20

Met PHP kun je bestanden schrijven. Zoals reeds vermeld werkt een (MySQL) database fijner en makkelijker.

Ik heb een artikel over bestanden schrijven geschreven: .
Slicer nodig? ( xHTML | CSS | Semantische opbouw | Div )
http://www.iSlice.nl/
Avatar gebruiker
LinkinTED
wmpr
 
Berichten: 131
Geregistreerd: 14 jan 2006 16:47

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 15 feb 2006 17:26

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor LinkinTED » 15 feb 2006 17:51

Slicer nodig? ( xHTML | CSS | Semantische opbouw | Div )
http://www.iSlice.nl/
Avatar gebruiker
LinkinTED
wmpr
 
Berichten: 131
Geregistreerd: 14 jan 2006 16:47

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 18:42

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Derk » 15 feb 2006 20:31

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [php]Reactiesysteem zonder mysql

Berichtdoor julien » 15 feb 2006 22:03

Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Derk » 15 feb 2006 22:07

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 23:23

Dat is weer een mooie tut Derk Razz

Ik ben nu bezig met zo'n script... Ik moet alleen nog even het adminpaneel maken (en dat is het saaist ^^)
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Derk » 15 feb 2006 23:25

Je hebt nu al een reactiesysteem inelkaar geflanst?
Als het op Mysql werkt kan Marcello het nu ook zelf installeeren Very Happy

Ik ben hard bezig met het maken van de remake van mijn site. Maar deze tut staat er al op Very Happy Ik moet nog een groot deel van de tuts overzetten en een groot deel van de paginas. Ook moet ik mijn teller er nog in verwerken
En eigenlijk wil ik het aanteindelijk nog op een CMS laten werken, maar niet die oude... Ik heb eens in de bron gekeken, het is een wonder dat dat werkt Razz

Derk
Laatst bijgewerkt door Derk op 01 jan 1970 01:00, in totaal 1 keer bewerkt.
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 15 feb 2006 23:27

Ja, kostte me een kwartiertje... Maar nu moet ik het adminpaneel maken en dat is saai werk ^^

Het ondersteunt zelfs meerdere artikelen Very Happy

(en ja, het is MySQL gebaseerd Razz)
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 16 feb 2006 02:20

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 16 feb 2006 08:29

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 16 feb 2006 10:01

Er zit nog een foutje in vrees ik, ik zie dubbelposts, grrrrrr Mad
Ideeen hoe ik dit moet oplossen? denk je dat je eindelijk iets voor elkaar hebt is het nog niet goed. Sad
Het script (eigelijk een gastenboek script) een bestand gb.php
en een txt bestand. (777)
[code="html"]<?

$amount=15;

if ($_GET['action']=='write') {
header('location: gb.php?action=read&start=0');
$file=fopen('gastenboek.txt','a');

$message=str_replace("\r",'',$message);
$message=str_replace("\n",'{{',$_GET['message']);
fwrite($file,$_GET['name'].'|||'.$_GET['email'].'|||'.date('d-m-Y').'|||'.$_GET['url'].'|||'.$message."\n");
fclose($file);

}

$start=(isset($_GET['start'])?$_GET['start']:0);
$gastenboek=Array();
$gastenboek=file('gastenboek.txt');

?>

<SCRIPT language="JavaScript">
function validate(form) {
if (form.name.value=="") {
alert("Vul je naam in");
return false;
} else if (form.message.value=="") {
alert("Vul je bericht in");
return false;
}
}
</SCRIPT>

<P>
<TABLE width="100%" cellspacing="0" cellpadding="0" >
<TR>
<TD class="standard"><b>Reacties</b><br></TD>
</TR>
</TABLE>
<TABLE width="100%" cellspacing="0" cellpadding="0">
<TR>
<TD class="side"> Berichten <? echo $start+1; ?> tot en met <? echo min($start+$amount,sizeof($gastenboek)); ?>.
<HR> <TABLE width="100%" >
<?
$gastenboek=array_reverse($gastenboek);
for ($i=$start;$i<$start+$amount && $i<sizeof($gastenboek);$i++) {
list($name,$email,$date,$url,$message)=explode('|||',$gastenboek[$i]);
$message=str_replace('{{',"\n",$message);
echo '<TR><TD><B>'.($email!=""?'<A href="mailto:'.$email.'">'.$name.'</A>':$name).'</B></TD><TD align="right"><B>'.$date.'</B></TD></TR>'."\n";
echo ($url!=""?'<TR><TD colspan="2"><A href="'.$url.'" target="_blank">'.$url.'</A></TD></TR>':'')."\n";
echo '<TR><TD colspan="2"><SPAN>'.str_replace("\n",'<BR>',htmlspecialchars($message)).'</SPAN></TD></TR>'."\n";
echo '<TR><TD colspan="2"><HR></TD></TR>'."\n";
}
?>
</TABLE>
<CENTER>
<?
if ($start>0) echo '<A href="gb.php?start='.max(0,$start-$amount).'"><<<</A> ';
if ($start+$amount<sizeof($gastenboek)) echo ' <A href="gb.php?start='.($start+$amount).'">>>></A>';
?> </CENTER></TD>
</TR>
</TABLE>
<P>
<TABLE width="100%" cellspacing="0" cellpadding="0" >
<TR>
<TD class="standard">Reageer</TD>
</TR>
</TABLE>
<TABLE width="100%" cellspacing="0" cellpadding="0" >
<TR>
<TD class="side"> <FORM action="gb.php" method="GET" onSubmit="return validate(this);">
<INPUT type="hidden" name="action" value="write">
<TABLE class="standard">
<TR>
<TD>Naam:</TD>
<TD><INPUT type="text" name="name" size="30"></TD>
</TR>
<TR>
<TD>E-Mail:</TD>
<TD><INPUT type="text" name="email" size="30">
(optioneel)</TD>
</TR>
<TR>
<TD>Homepage:</TD>
<TD><INPUT name="url" type="text" value="http://" size="30">
(optioneel)</TD>
</TR>
<TR>
<TD>Bericht:</TD>
<TD><TEXTAREA name="message" cols="30" rows="5"></TEXTAREA></TD>
</TR>
</TABLE>
<INPUT type="submit" value="Verstuur">
</FORM></TD>
</TR>
</TABLE>[/code]

[mod="Anthony"]Code tags aangezet[/mod]
Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 17 feb 2006 14:10

http://members.lycos.nl/webcreator/gb.php de berichten komen dus 2 keer, eerst zie je 1 bericht, als je weer kijkt ff later staan er 2 berichten dubbel dus.:help:
Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor KillerSponge » 17 feb 2006 14:37

Ik zie denk ik al waar het aan ligt. Als je op "verstuur" klikt, gaat hij naar gb.php?action=read&start=0 . Als je dan op refresh drukt, post hij het bericht nog een keer.

Tenminste, ik heb net wat commentaar gepost, en dat kwam er maar één keer in Smile
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Marcello » 17 feb 2006 17:37

Avatar gebruiker
Marcello
wmpr
 
Berichten: 257
Geregistreerd: 29 nov 2003 20:55
Woonplaats: Groningen

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Derk » 18 feb 2006 16:37

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: [php]Reactiesysteem zonder mysql

Berichtdoor Dotcpu » 19 feb 2006 02:31

Dotcpu
wmpr
 
Berichten: 59
Geregistreerd: 11 nov 2005 18:49


Keer terug naar PHP, ASP, SQL



cron