Show Comments (use as guestbook)

Need some help with the script?

Show Comments (use as guestbook)

Postby maqs » Thu Sep 21, 2006 8:45 pm

It has been discussed in an other tread but I enter my problem here insted.

Here is the deal: I don't get my comments to show on my page. Here are all the codes:



In guest.php on my webpage:

Code: Select all
<?PHP

include 'admin/head.php';

?>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<title>guestbook @ eldar.se</title>

<link href="style2.css" rel="stylesheet" type="text/css">



</head>



<body style="background-color:transparent; overflow-x:hidden;overflow-y:auto">

<?PHP



$category = "7";

$template = "guestbook";



include $cutepath.'/show_news.php';

?>

</body>

</html>




In the plugin-page in cutenews.ru "Disable All Comments" are DEACTIVATED and "Enable/Disable Comments" are ACTIVATED. I also have checked the little box that belongs to the text "Allow comments?" in the news that I use as guestbook.



Code in the template "guestbook":



Active News:

Code: Select all
Blank




Comments:

Code: Select all
<div style="width: 415px; margin-bottom:8px;">

<div><strong>{author}</strong></div>



<div style="padding:2px; text-align:justify; margin-top:3px; background-color:#bd773e; border-top:1px solid #000000; border-bottom:1px solid #000000; border-right:1px solid #000000; border-left:1px solid #000000;">{comment}</div>

<div style="padding:2px; text-align:right; border-bottom:1px solid #000000; border-right:1px solid #000000; border-left:1px solid #000000;"><em>Comment number {comnum} was posted on {date}</em></div>

</div>




Comment form:

Code: Select all
<table border="0" width="370" cellspacing="0" cellpadding="0">

    <tr>

      <td style="padding:2px;">Name:<br>

        <input type="text" name="name"></td>

    </tr>

    <tr>

      <td style="padding:2px;">Mail:<br>

        <input type="text" name="mail">

      (optional)</td>

    </tr>

    <tr>

      <td style="padding:2px;">Comment:<br>

      <textarea cols="40" rows="6" id=commentsbox name="comments"></textarea><br /><br />

      <input type="submit" name="submit" value="Sign Our Guestbook">      </td>

    </tr>

  </table>




Here is a link to my webpage: http://www.eldar.se Look at guestbook in menu.



Hope that someone can help me. I don't know what more information I need to provide.
User avatar
maqs
 
Posts: 112
Joined: Sun Aug 20, 2006 7:26 am
Location: Lund, Sweden

Postby FI-DD » Thu Sep 21, 2006 10:51 pm

Stupid question but do you have a news item in category 7?



I can't see any news here:

http://www.eldar.se/admin/show_news.php?category=7



You could also try to show a specific news not using a category.



Code: Select all
<?php

$id = x; //x being the id of the news

$template = "guestbook";

include('show_news.php');

?>
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby maqs » Thu Sep 21, 2006 11:03 pm

Yes, category 7 is guestbook and I have one news-item in it (also called guestbook).



It works when I try to put the id instead for category. But then an other problem apears. I have 25 entrys (comments) in the guestbook but instead of paging the page it start the comments from the 11:th post and calls it number one and no paging apears. (look http://www.eldar.se) (so just 15 comments shows and they are numbers 1-15 instead for 11-25). Hope you understand what I meen when you check the page.
User avatar
maqs
 
Posts: 112
Joined: Sun Aug 20, 2006 7:26 am
Location: Lund, Sweden

Postby master7 » Fri Sep 22, 2006 8:05 am

Another stupid question ;)

Do you have Comments pagination plugin installed :?:

If yes, try to unistall it and then check the guestbook.
User avatar
master7
 
Posts: 27
Joined: Tue Apr 11, 2006 1:34 pm

Postby scottdallas » Fri Sep 22, 2006 5:02 pm

Usually for a guestbook scenario I just use a cutenews 1.3.6 installation and dedicate it to a page by itself. No forced ad in that version. Does awesome comments and comment pagination and I just let it sit dedicated to that. That's just my 2 cents, I know you're doing it different, I just find cutenews.ru to be too difficult to use as a guestbook situation. As I see, you're not having the best time with it either.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby maqs » Sat Sep 23, 2006 12:40 am

master7 wrote:Another stupid question ;)

Do you have Comments pagination plugin installed :?:

If yes, try to unistall it and then check the guestbook.




Off course I have it installed, that is partly what this post is about. (sorry if I sound mad, that's not ment to be :) ) When i use the original show.comments.php the guestbook shows all the 25 posts but when I replace it with the show.comments.php that I got with the Comments pagination plugin it just shows the 15 last post and they are numberd 1-15 instead for 11-25 as they should be, and there is NO pagination.



scottdallas wrote:Usually for a guestbook scenario I just use a cutenews 1.3.6 installation and dedicate it to a page by itself. No forced ad in that version. Does awesome comments and comment pagination and I just let it sit dedicated to that. That's just my 2 cents, I know you're doing it different, I just find cutenews.ru to be too difficult to use as a guestbook situation. As I see, you're not having the best time with it either.




That's an idea, but I really would like to only use cutenews.ru beacuse I like it so mutch better than CuteNews from CutePHP. And it feels a little bit odd or pointless to have two cutenews-systems installed. I used CuteNews untill I found out about CuteNews.ru and as you say, there were no problem with the pagination in comments there. But before I decide to use the drastic method that you mention I would prefere to find a solution to the problem in CuteNews.ru.



So, I say it again, anyone who has an other idea? And is it only me and scottdalas who has experient problems when using the cutenews.ru as a guestbook with pagination?
User avatar
maqs
 
Posts: 112
Joined: Sun Aug 20, 2006 7:26 am
Location: Lund, Sweden

Postby master7 » Sat Sep 23, 2006 10:27 am

maqs wrote: but when I replace it with the show.comments.php that I got with the Comments pagination plugin it just shows the 15 last post and they are numberd 1-15 instead for 11-25 as they should be, and there is NO pagination.


I have the same problem too.

Yesterday I tried to install this mod on my site and I noticed a few problems:

:arrow: Numbers of comments starts always from number 1 - it doesn't matter which page of comments.

:arrow: I can add comments pagination only "manually" in the .tpl file (not via admin panel) in section

Code: Select all
$template_cprev_next = <<<HTML

{here_code}

HTML;


:arrow: Wrong links to the comments pagination. I change the path in show.comments.php in "Previous link" and "Next link section.



Finally I uninstall this mod :x
User avatar
master7
 
Posts: 27
Joined: Tue Apr 11, 2006 1:34 pm

Postby FI-DD » Mon Sep 25, 2006 7:09 pm

I guess, I'll have a closer look at this mod some time.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby maqs » Mon Sep 25, 2006 9:59 pm

That would be great. :D

Thank you. :)
User avatar
maqs
 
Posts: 112
Joined: Sun Aug 20, 2006 7:26 am
Location: Lund, Sweden

Postby FI-DD » Tue Sep 26, 2006 7:48 pm

I fixed the comments numbering bug.



And you have to open inc/mod/templates.mdu and change this twice (around line 388 and line 404):

Code: Select all
edit_ñprev_next




to this:

Code: Select all
edit_cprev_next




After doing this the changes in the comments pagination template finally are saved.



And open inc/functions.inc.php and change this:

Code: Select all
$query   = cute_query_string($QUERY_STRING, array('category', 'skip', 'subaction', 'id', 'ucat', 'year', 'month', 'day', 'user', 'page', 'search', 'do', 'PHPSESSID', 'title', 'time'));




to this:

Code: Select all
$query   = cute_query_string($QUERY_STRING, array('category', 'skip', 'subaction', 'id', 'ucat', 'year', 'month', 'day', 'user', 'page', 'search', 'do', 'PHPSESSID', 'title', 'time', 'cpage'));
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby maqs » Tue Sep 26, 2006 11:29 pm

And it's *drumroll* WORKING, WORKING, WORKING!!! :D Thank you FI-DD, you're the best!!!



No you can go on working with my newsletter-problem. ;)
User avatar
maqs
 
Posts: 112
Joined: Sun Aug 20, 2006 7:26 am
Location: Lund, Sweden


Return to Help



Who is online

Users browsing this forum: No registered users and 0 guests