Page 1 of 1

problem about plugin:Guestbook Sidebar

Posted: Wed Aug 13, 2008 7:05 am
by xavieryu
i downloaded this plugin,and installed in the blog,but it does not

work,show message:PLUGIN_GUESTSIDE_NOENTRIES

how to solove this PB?

Posted: Wed Aug 13, 2008 9:52 am
by xavieryu
I found this plugin do not excute this function :
createTable() in serendipity_event_guestbook.php,

it's should the PB why it could not work,
Is there anyone could tell me how to install a plugin in this blog system,thanks!

The key code in serendipity_plugin_guestbook.php

Code: Select all

$sql = "SELECT timestamp, name";

        if ($showhomepage){
            $sql .=", homepage";
        }

        if ($showemail){
            $sql .=", email";
        }
        $sql .=", body FROM {$serendipity['dbPrefix']}guestbook ORDER BY timestamp DESC";
        $sql .=" LIMIT ".$max_items;
        $entries = serendipity_db_query($sql);
if($entries && is_array($entries)) {
            foreach($entries as $e => $row) {
                echo "<b>" . htmlspecialchars(serendipity_strftime($dateformat, $row['timestamp'])) . '</b> <br />' . "\n";
                $row['body'] = htmlspecialchars($row['body']);
                if (strlen($row['body'])>$max_chars) {
                    if (function_exists('mb_strimwidth')) {
                        $row['body'] = mb_strimwidth($row['body'],0,$max_chars,"...");
                    } else {
                        $row['body'] = substr($row['body'],0,$max_chars)."...";
                    }
                }
                $entry = array('comment' => $row['body']);
                serendipity_plugin_api::hook_event('frontend_display', $entry);

                echo $entry['comment'] . "<br />";
                echo "<b>" . htmlspecialchars($row['name']) . "</b><br />";

                if ($showemail){
                    echo "<a href=\"mailto:" . htmlspecialchars($row['email']) . "\">" . htmlspecialchars($row['email']) . "</a>";
                }

                if ($showhomepage) {
                    if ($showemail) {
                        echo "<br />";
                    }
                    echo "<a href=\"" . htmlspecialchars($row['homepage']) . "\">" . htmlspecialchars($row['homepage']) . "</a>";
                }

                echo "<br /><br />\n\n";
            }
        } else {
            echo [b]PLUGIN_GUESTSIDE_NOENTRIES[/b] ."<br />";
        }

Re: problem about plugin:Guestbook Sidebar

Posted: Wed Aug 13, 2008 10:17 am
by garvinhicking
Hi!

Ah, the plugin is simply missing a language constant for this. I added it to the next plugin version.

However, the database table should be created automatically once you installed the guestbook event plugin. Which database type and version are you using?

Regards,
Garvin

Posted: Wed Aug 13, 2008 10:48 am
by xavieryu
Which database type and version are you using?
I used mysql 5.0
And I found that there are several sites met this problem:
you could google :PLUGIN_GUESTSIDE_NOENTRIES

Posted: Wed Aug 13, 2008 10:54 am
by garvinhicking
Hi!

Yes, like I mentioned, the plugin was simply missing the translation for this "NOENTRIES".

Can you check your database and see if a serendipity_guestbook database table really does not exist? Make sure the guestbok EVENT plugin is also installed, not just the SIDEBAR plugin.

The PLUGIN_GUESTSIDE_NOENTRIES output will disappear once you have your first guestbook entry.

Regards,
Garvin

Posted: Wed Aug 13, 2008 12:40 pm
by xavieryu
Yes,the table serendipity_guestbook didn't exist,
following is the SQL:
SELECT timestamp, name, body FROM serendipity_guestbook ORDER BY timestamp DESC LIMIT 1

And the plugin installed,i could see it's info in the backoffice,such as :
Display the latest guestbook items in the sidebar
版本: 1.08[/img]

Posted: Wed Aug 13, 2008 5:58 pm
by garvinhicking
Hi!

In the plugin management interface, you first see sidebar plugins, and on the bottom of the page the event plugins. Make sure that you also have the "Guestbook" EVENT plugin installed, not only the sidebar plugin.

Regards,
Garvin

Posted: Thu Aug 14, 2008 4:10 am
by xavieryu
Thank you very much Garvinhicking

You are right,i didn't install the event plugin of guestbook,the table:serendipity_guestbook created
But it's still do not work,the table is empty authough i reply the thread

Posted: Mon Aug 18, 2008 12:29 pm
by garvinhicking
Hi!

What's your URL, where can I see the guestbook?

Regards,
Garvin