1
hobbles
Weblog comment form not prepopulating title field.
  • 2005/1/4 16:08

  • hobbles

  • Just popping in

  • Posts: 24

  • Since: 2004/1/27


I've been using weblog 1.3 on my site,http://hobgoblin.net/php/ and have several users that often comment on each other's blogs. The module isn't automatically filling in the title field on the New Comment form with an "Re: xxxxx". Users are just making up their own titles and it's getting confusing when looking at the Latests Comments Block.

If you reply to a comment, it fills it in appropriately. It's only empty when making a new comment.

My php skills are limited, and I'm only vaguely aware of what I'm doing when poking around inside the code, so some idea of what I need to look for to get this working would really help me out.

Is there something missing in a template? Or is it in the Weblog code somewhere?

Thanks in advance for any help!

2
hobbles
Re: Weblog comment form not prepopulating title field.
  • 2005/1/5 0:51

  • hobbles

  • Just popping in

  • Posts: 24

  • Since: 2004/1/27


Figured it out...

For anyone else who's using weblog and is having the same problem, in weblog/comment_new.php this portion:

" WHERE lid=" . $com_itemid . "";

Should read:

" WHERE blog_id=" . $com_itemid . "";

3
toddherrold
Re: Weblog comment form not prepopulating title field.

hey there,

i have this problem also, but when i look into the comment_new file, all I see is this:

include '../../mainfile.php';
include XOOPS_ROOT_PATH.'/include/comment_new.php';

can you or someone using weblog 1.3 please post the entire contents of the comment_new.php file?

Thanks.

4
WallStArb
There's a weblog 1.30 version out?
  • 2005/2/11 1:20

  • WallStArb

  • Just popping in

  • Posts: 75

  • Since: 2004/12/8


There's a weBlog v1.30 available? All i had found was a 1.20. Please post link to it (assuming its english version)

5
hobbles
Re: There's a weblog 1.30 version out?
  • 2005/2/11 2:07

  • hobbles

  • Just popping in

  • Posts: 24

  • Since: 2004/1/27


http://wellwine.net/modules/mydownloads/

Wellwine's front page doesn't work, but at least you can still get to their downloads. :)

6
hobbles
Re: Weblog comment form not prepopulating title field.
  • 2005/2/11 14:03

  • hobbles

  • Just popping in

  • Posts: 24

  • Since: 2004/1/27


Quote:

toddherrold wrote:
hey there,

i have this problem also, but when i look into the comment_new file, all I see is this:

include '../../mainfile.php';
include XOOPS_ROOT_PATH.'/include/comment_new.php';

can you or someone using weblog 1.3 please post the entire contents of the comment_new.php file?

Thanks.


This is a little late, but if you still need the info here it is. Between those two lines you already have add the following:

$com_itemid = isset($HTTP_GET_VARS['com_itemid']) ? intval($HTTP_GET_VARS['com_itemid']) : 0;
if (
$com_itemid 0) {
    
// Get link title
    
$sql "SELECT title FROM " $xoopsDB->prefix('weblog') . " WHERE blog_id=" $com_itemid "";
    
$result $xoopsDB->query($sql);
    
$row $xoopsDB->fetchArray($result);
    
$com_replytitle $row['title'];

7
toddherrold
Re: Weblog comment form not prepopulating title field.

thanks so much! i now have a fully functional weblog 1.3 implementation. not knowing php, i didn't get it right the first time. seems i didn't have a } at the end where i needed it.

I do hope weblog will continue to be developed. it's a great base blog program.

you can check mine out at:

http://www.hotdogblog.com/modules/weblog

8
hobbles
Re: Weblog comment form not prepopulating title field.
  • 2005/2/14 14:37

  • hobbles

  • Just popping in

  • Posts: 24

  • Since: 2004/1/27


Neat site. Love those Dachshunds! :)

9
peacearena
Re: Weblog comment form not prepopulating title field.
  • 2005/2/25 5:51

  • peacearena

  • Just popping in

  • Posts: 9

  • Since: 2005/1/5 2


hobbles wrote:
Quote:

Between those two lines you already have add the following:


I did that and got "parse error, unexpected $" line 36

So what did I do wrong?

10
toddherrold
Re: Weblog comment form not prepopulating title field.

For ease of those looking to fix this weblog bug on the comments pages: See full text of comments_new.php file as it should read:

Quote:

<?php
// $Id: comment_new.php,v 1.3 2003/08/29 14:10:29 wellwine Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
include '../../mainfile.php';
$com_itemid = isset($HTTP_GET_VARS['com_itemid']) ? intval($HTTP_GET_VARS['com_itemid']) : 0;
if ($com_itemid > 0) {
// Get link title
$sql = "SELECT title FROM " . $xoopsDB->prefix('weblog') . " WHERE blog_id=" . $com_itemid . "";
$result = $xoopsDB->query($sql);
$row = $xoopsDB->fetchArray($result);
$com_replytitle = $row['title'];
include XOOPS_ROOT_PATH.'/include/comment_new.php';
}
?>

Login

Who's Online

217 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits