Home
FAQ
Contact
Home
Help
Search
Login
Register
Thingamablog Forums
>
Community
>
General Discussion
>
Comments for TAMB
Username
Password
Thingamablog Forums
>
Community
>
General Discussion
>
Comments for TAMB
Pages:
1
[
2
]
3
4
« previous
next »
Print
Author
Topic: Comments for TAMB (Read 6103 times)
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #15 on:
November 24, 2009, 12:04:04 AM »
Hi bil, I've completed all the steps you listed, Thingamablog now publishes as .php and is accessible as expected, I've modified the front page template (as below) but I don't get a button or and option to add a comment.... Also, is there a way to bypass the approval process? As I mentioned, my blog is secured and all comments should be posted straight away without moderation. Anyway, here's the front page...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$Charset$>" />
<title><$BlogTitle$></title>
<link rel="stylesheet" href="styles-site.css" type="text/css" />
</head>
<body>
<div id="banner">
<h1><$BlogTitle$></h1>
<span class="description"><$BlogDescription$></span>
</div>
<div id="content">
<div class="blog">
<!-- This section specifies the layout for each entry -->
<BlogEntry>
<DayHeader><h2 class="date"><$DayHeaderDate$></h2></DayHeader>
<div class="blogbody">
<a name="<$EntryID$>"></a>
<EntryTitle>
<h3 class="title"><$EntryTitle$></h3>
</EntryTitle>
<$EntryBody$>
<div class="posted">
Posted by <a href="mailto:<$EntryAuthorEmail$>"><$EntryAuthor$></a> at <a href="<$EntryPermalink$>" title="permanent link"><$EntryTime$></a><br>
<EntryModifiedDate><i>Edited on: <$EntryModifiedDate$></i><br></EntryModifiedDate>
Categories: <EntryCategories glue=", "><a href="<$CategoryLink$>"><$CategoryName$></a></EntryCategories><br>
</div>
<!-- This enables comments -->
<?php
$article="<$EntryID$>";
$base='./comments';
include './comments/comments.php';
?>
</div>
</BlogEntry>
</div><!--end blog -->
</div> <!-- end content -->
Hope this helps...
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #16 on:
November 24, 2009, 06:21:00 PM »
Quote from: Reaper on November 24, 2009, 12:04:04 AM
Hi bil, I've completed all the steps you listed, Thingamablog now publishes as .php and is accessible as expected, I've modified the front page template (as below) but I don't get a button or and option to add a comment.... Also, is there a way to bypass the approval process? As I mentioned, my blog is secured and all comments should be posted straight away without moderation. Anyway, here's the front page...
...
<!-- This enables comments -->
<?php
$article="<$EntryID$>";
$base='./comments';
include './comments/comments.php';
?>
</div>
</BlogEntry>
</div><!--end blog -->
</div> <!-- end content -->
Hope this helps...
Reaper,
I think the first thing to check would be that php is working correctly. Easiest way to do that is to put a file, eg. test.php, with this as the contents:
<?php
phpinfo();
?>
If you call that file and get nothing, php isn't working. What you should get is a large page with build and variable info for your installation.
If php is working, post what flavor of web server, php version and os you're using on the server, and I'll set up a virtual machine and try to match your configuration, see if I can replicate it. I've done some work with windows servers, but not with php on them.
In terms of bypassing the recaptcha, the last version I posted has a variable in the conf file that turns on or off the use of that. Works for me, but YMMV.
Bob,
I'll have some time to play this week, and will put up a url here when I have one. I'm trying to migrate my pages to TAMB...
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #17 on:
November 24, 2009, 06:31:35 PM »
Hi bil,
Here's the first part of the output from the .php file I created...
PHP Version 5.3.1
System Windows NT SHERIDAN 6.1 build 7600 ((null)) i586
Build Date Nov 19 2009 09:58:49
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File D:\Program Files (x86)\PHP\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC9
PHP Extension Build API20090626,TS,VC9
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*
So it seems to be working. Its running on a Windows 2008 R2 Server with IIS 7.0....
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #18 on:
November 24, 2009, 10:25:37 PM »
Me again, I have found that if I go into the front page editor in Thingamablog, the piece of php code I pasted in to enable comments is only treated as code (highlighted in blue) for this portion;
<?php
$article="<$EntryID$>";
The reset of it is just black text. If I take the < and > out, the whole codec snippet becomes blue. Unfortunately it still doesnt work. If I replace this php code;
<!-- This enables comments -->
<?php
$article="<$EntryID$>";
$base='./comments';
include './comments/comments.php';
?>
With this,
<?php
phpinfo();
?>
I get the php info diplay on screen when I open the blog.... Seems not to like the comments code snippet. Hope this helps.
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #19 on:
November 24, 2009, 11:23:03 PM »
Me yet again... Disregard most of the above, seems I am an idiot.... apparently it helps if you put the 'comments' folder in the right place... go figure! Anyway, got the comments button now, when I click it, I get this on the top of the screen...
Notice: Undefined index: session_key in D:\Thingamablog\comments\index.php on line 340
Array
(
[article] => 9
[origin] => /blog/
)
Array
(
[session_key] => 20521
[counter] => 0
)
Can we hiide that now? Also I then have to click another button to cut down on spam etc... can I cull that as well, just want my users to go straight to the comment entry screen. On that screen, I don't need them to enter an email address. After I enter my details and a comment, I get this error when I click submit;
Notice: Undefined variable: now in D:\Thingamablog\comments\index.php on line 285 Notice: Undefined variable: user in D:\Thingamablog\comments\index.php on line 288
Error: The email domain for
bill.peterson@drgbd.com
cannot be verified. This may mean that the email address you provided is not valid according to DNS records, and any email sent to that address might not be delivered. This should not affect the submission of your comment.
No matter what email address I enter, valid or not, I get the same message. The next issue is approval. Can I have the comments posted immediately without approval? If possible, that would solve the next issue which is not being able to run the 'confirm.php'. Getting errors about permissions which perhaps I can discuss later.. Thank you so much for your patience with me.
«
Last Edit: November 25, 2009, 10:23:51 PM by Reaper
»
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #20 on:
November 26, 2009, 08:26:50 PM »
Hi bil, I have worked through all the issues I was having and been able to modify the code so the flow is now as I need it to be and the comments post immediately without approval. Also, in your 'confirm.php' you have this entry,
require_once '../general_functions-1.4.php'
When it should read
require_once '../general_functions-1.5.php'
Still working on getting the author notified by email when comments are added, we use MS Exchange and need to supply a username/password. Might try a 3rd party tool like 'blat'
Anyway ,thank you for a fantastic addition to Thingamablog!
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #21 on:
November 27, 2009, 07:02:16 AM »
Quote from: Reaper on November 26, 2009, 08:26:50 PM
Hi bil, I have worked through all the issues I was having and been able to modify the code so the flow is now as I need it to be and the comments post immediately without approval. Also, in your 'confirm.php' you have this entry,
require_once '../general_functions-1.4.php'
When it should read
require_once '../general_functions-1.5.php'
Still working on getting the author notified by email when comments are added, we use MS Exchange and need to supply a username/password. Might try a 3rd party tool like 'blat'
Anyway ,thank you for a fantastic addition to Thingamablog!
You're welcome. Caught the file reference yesterday, I'll post a revised version later today or early tomorrow, lots of minor bug fixes and toggling of the recaptcha and confirmation features....
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #22 on:
November 28, 2009, 10:42:28 AM »
Ok, new version is 0.9d, and it's up at
https://wwwx.cs.unc.edu/~hays/dev/php/thingamacomment-0.9d.tgz
.
Bob, the permanent url for this will be up at:
https://wwwx.cs.unc.edu/~hays/dev/php/thingamacomment.html
There's nothing much up there now, but I'll keep the data on the current version up there.
thanks for the feedback!
bil
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #23 on:
November 29, 2009, 11:27:33 PM »
Hi bil, I'm having trouble getting the 'email to author' working when a new comment is placed. Email is working from the server and I receive notifications as long as I put myself in as the default recipient in the 'conf' file. What variable have you assigned for the authors email address? Also, for those running on a windows platform, there is a windows version of sendmail. Just place it in the relevant path, modfy its .ini file and away you go...
http://glob.com.au/sendmail/
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #24 on:
December 01, 2009, 03:11:50 AM »
Reaper,
The user's email is $_POST['email']. If you find:
// Uncomment for error checking, this will show all post vars
//print_array($_POST);
//print_array($_SESSION);
And uncomment the two print_r() functions, that will print out all of the session and post variables at the top of the page, that will let you know if the email variable is being carried through.
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #25 on:
December 01, 2009, 05:48:21 PM »
Hi bil, thanks for getting back to me. I've uncommented as per below;
// Uncomment for error checking, this will show all post vars
print_array($_POST);
//print_array($_SESSION);
//echo $_SESSION["counter"];
//echo "session_key is ". $_SESSION["session_key"] . "<br/>";
//echo "counter is " . $_SESSION["counter"] . "<br/>";
echo "email is " . $_POST["email"] . "<br/>";
and this is what is displayed at the top of the screen when I enter a comment;
Array
(
[key_check] => 1285
[submit] => submit
)
email is
As you can see, the email variable isn't being carried through. The confirmation email is sent to the address listed in the conf file ($mailto=) but not to the author. I've confirmed the conf file is set to $confirm_via_email="no";
Thanks bil.
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #26 on:
December 01, 2009, 06:40:17 PM »
I see now. The confirmation email isn't supposed to go to the user who enters the comment, only to the owner of the blog. What you should see is that the user's email is in the confirmation email as the from (so that you can reply to that person if you wish to.) If that's working that way, it's doing what it's supposed to.
But if you want a confirmation email to go to the user, I can add that pretty easily. Let me know on both points, and thanks for doing some testing for me,
bil
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #27 on:
December 01, 2009, 07:10:56 PM »
Hi bil, the email notification should go to the author of the blog entry that the comment is being added to. The owner/administrator of the blog doesn't need one, nor does the person who is entering the comment. If the comment writer enters his email address, it should be included in the notification that the blog author gets, so he can reply directly. If the comment writer doesn't enter an email address, so be it. Because I am posting the comments without needing them approved, the blog owner/admin never needs to be informed, just the relevant blog author.
Sorry if I haven't been clear before. Some very handy changes in 0.9d as well. Certainly makes my life easier! Thanks again bil and well done!
Logged
bil
Regular
Posts: 28
Re: Comments for TAMB
«
Reply #28 on:
December 01, 2009, 07:49:38 PM »
Ok, I think I can do that, since the template have the author's email, give me a few days...
Logged
Reaper
Regular
Posts: 34
Re: Comments for TAMB
«
Reply #29 on:
December 01, 2009, 09:15:21 PM »
No worries! Thanks very much bil!
Logged
Pages:
1
[
2
]
3
4
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> News
-----------------------------
Support
-----------------------------
=> Thingamablog Help
=> Bugs
-----------------------------
Community
-----------------------------
=> Templates
=> HowTo
=> General Discussion
Powered by SMF 1.1.10
|
SMF © 2006-2009, Simple Machines LLC
Loading...