Not logged in. · Lost password · Register

All posts by ericlin (15)

topic: Embanding PHP and forms.  in the forum: General Help and Support Installation and Configuration
Avatar
ericlin #1
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
Thanks, Andi. This answered something really bothered me.
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #2
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1403
Yes, it works... I am so happy. Thank you soooooooooooooooo..... much.  :)))))
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #3
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1398
Purplepaisley, is it possible to show me how to do it within the template ? Thanks.
topic: Embanding PHP and forms.  in the forum: General Help and Support Installation and Configuration
Avatar
ericlin #4
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 284
Hi, I am wonder if you have got the answer for this question. I have similar problem now. Thanks.
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #5
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1372
Hi, I spend some effort and found (1) using a separate php fiile works perfectly(I made a mistake before)  (2)it does not work in dokuwiki, I traced to this line of code which does not work as that in (1) :                                                                                                                                 
        if($_POST[MTC]['do'] == 'add'){
            $this->_add_comment();
        }else if($_POST[MTC]['do'] == 'del'){
            $this->_del_comment();
        }

The result of $_POST[MTC]['do'] seems to be NULL.  Do you have idea why it does not work in my dokuwiki ?  Thanks
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #6
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1370
I created commenttest.php , which is:

<?php
require_once('mtc.class.php');
$MTC = new MTC();
$MTC->init();
$MTC->comments();
$MTC->comment_form();
?>

and execute it this way:  www.mydomain.com/commenttest.php , the result is the same :  the input form shows, no error messages, no data entered. .. At least I know it's not dokuwiki's problem .....  Thanks
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #7
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1365
Purplepaisly, I know I have used this word to often, but this is the only one I can think of:  thank you.
I checked the table using phpMyAdmin, and found: Space usage: data 0 bytes, index: 1024 bytes.
Looks likely the data has not been entered. Do you have any suggestion ? again, thank you.
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #8
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1358
Purplepaisley, Again, thanks for your help. I've (I guess) successfully created table "mtc_comments' (after I removed "CHARACTER SET utf8 COLLATE utf8_general_ci". So, it looks good now. I can see a form waiting for me to input data. However, when I tried to leave a message, it doesn't seem to work. It doesn't report any error or warning, but it also did not show the messages I just typed. 
  Question: Is it right thing to write the code like this: (at the start page)


<php>
require_once('mtc.class.php');
$MTC = new MTC();
$MTC->init();

$MTC->comment_form();
$MTC->comments();
</php>

Thank you one million times !!
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #9
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1355
that's what I got: :(

 MySQL said:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 1
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #10
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1353
Oh, I also found if I click on the db at left hand side, I got "Create new table on database db....."  Name:  _____  Number of fields: ___  Is this what I should do ? What data should I fill in ? Thanks
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #11
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1351
Purplepaisley, I found PHPmyadmin but don't know how to "run a mysql query". I can see some options here: "Server Choice", "My SQL (Export)", "phpMyAdmin(Language)", "phpMyAdmin documentation","Offical phpMyAdminHomepage" Could you tell me how to do it ? Thanks again.
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #12
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1349
Purplepaisley, Thanks for your reply. What I did was (1)using panel of my hosting service to create mySQL database. (2) Modify mtc.class.php for these variables: $db_host, $db_user,$db_pass,$db_name   Is there anything else I need to do ? Thanks again.
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #13
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1341
zyberdog, Thanks for your reply. I tried the Discussion plugin. However 2 problems bother me. (1) It does not have the spam preventing feature. (2) Looks like if I install the sidebar template,  the discussion will not work. Thanks again for your reply and any other replies you may make. :)
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #14
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1338
Hi, Thanks for your reply.
I tried "My Two Cents" and got:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/45/d184410608/htdocs/t2/mtc.class.php on line 95

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /homepages/45/d184410608/htdocs/t2/mtc.class.php on line 98

Do you know why I got those errors ?  Sorry I don't know much about php.

Thanks

Eric
topic: how to integrate a guest book in a dokuwiki page  in the forum: General Help and Support Syntax and Usage
Avatar
ericlin #15
Member since Nov 2006 · 15 posts
Group memberships: Members
Show profile · Link to this post
Subject: how to integrate a guest book in a dokuwiki page
Hi, I'm trying to put  a guestbook in a dokuwiki page, so that everyone can leave me a message.
I download a php guestbook. I don't have problem to execut it using an external link(but this will
be in a new window, which is not what I want)
But when I tried to put it in an existing dokuwiki page using:
<php>
include("guest.php");
</php>

I got the following error:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/45/d184410608/htdocs/lib/tpl/sidebar/main.php:3) in /homepages/45/d184410608/htdocs/guest.php on line 90

Does anyone know what I should do ? Thanks.
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-14, 08:33:37 (UTC +01:00)