problem about plugin:Guestbook Sidebar

Having trouble installing serendipity?
Post Reply
xavieryu
Regular
Posts: 5
Joined: Wed Aug 13, 2008 5:57 am

problem about plugin:Guestbook Sidebar

Post 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?
xavieryu
Regular
Posts: 5
Joined: Wed Aug 13, 2008 5:57 am

Post 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 />";
        }
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: problem about plugin:Guestbook Sidebar

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xavieryu
Regular
Posts: 5
Joined: Wed Aug 13, 2008 5:57 am

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xavieryu
Regular
Posts: 5
Joined: Wed Aug 13, 2008 5:57 am

Post 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]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xavieryu
Regular
Posts: 5
Joined: Wed Aug 13, 2008 5:57 am

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply