Commenting of guestbook entries + smileybox?

Creating and modifying plugins.
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Commenting of guestbook entries + smileybox?

Post by Harald Weingaertner »

Hello,

i've read about the guestbook plugin and someone wished to chance to comment guestbook entries (garvin, not adding a new comment above ;) ).

This is a new try to find someone who can extend the guestbook script :)

Is someone able to add an option to comment and edit entries?

A box, where users can click on a smiley to show in their comment would also be fine. ;)

Regards, Harald
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Commenting of guestbook entries + smileybox?

Post by garvinhicking »

Hi!

Why not use a simple blog entry then, where "comments" are just usual guestbook entries? This seems like the perfect solution for you.

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Well, this sounds not bad.... Really not bad. I will think about it and try it out. Thanks!
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

I thought about it and it isn't that good...

Entries should be sorted "Newest at the top" in the "Guestbook Entry" and "Comment" (or german "Kommentar schreiben") should be called "In das Gästebuch eintragen" ;)

So it will not work this way. :(
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That's a good suggestion; I just added two new parameters to the "serendipity_printComments" smarty function.

Via the "order" parameter you can put "DESC" in it to order reversed.

So in your entries.tpl template you could make this check:

Code: Select all

{if $entry.title == 'Guestbook'}
  {serendipity_printComments entry=$entry.id mode=$entry.viewmode order="DESC"}
{else}
  {serendipity_printComments entry=$entry.id mode=$entry.viewmode}
{/if}
With the same IF-statement you can emit "Submit to guestbook" instead of $CONST.SUBMIT_COMMENT or something like that. :)

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Great, i will try it!
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Well, i tried it and nothing changed. Do i have to update something first?

I have replaced

{serendipity_printComments entry=$entry.id mode=$entry.viewmode}

with

{if $entry.title == 'Guestbook'}
{serendipity_printComments entry=$entry.id mode=$entry.viewmode order="DESC"}
{else}
{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
{/if}

in my entries.tpl and created a new entry named Guestbook. I guess i missed one step?

Regards, Harald
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You did download the latest snapshot? The patch to that function should be contained in yesterday's nightly...?

Which nightly are you using?

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

garvinhicking wrote:Hi!

You did download the latest snapshot? The patch to that function should be contained in yesterday's nightly...?

Which nightly are you using?
Ah, ok :( I use 1.0final, not one of the nightlys. Is it recommended to use the nightly builds on a live site? My understanding is, that all those nightlys are betas of 1.1...

Maybe i don't understand "nightly" correct.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
Ah, ok :( I use 1.0final, not one of the nightlys. Is it recommended to use the nightly builds on a live site? My understanding is, that all those nightlys are betas of 1.1...
Oh, okay. Then you overread my statement that your wish was a feature request that I needed to add to the code. :)

Since the 1.1 release isn't that far away, I try not to backport too much code to 1.0 and instead focus on getting 1.1 nicer. :)

I myself am running nightlies on my live-site, and there are no open bugs in 1.1 that I am aware of, so actually 1.1 might be worth a try.

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Garvin, i managed it finally to check this out. Of course, it works fine.

Is it possible to name the article "Gästebuch"? The statement

{if $entry.title == 'Gästebuch'}

does not seem to work (because of the ä maybe?)

Also can you assist me again, where i have to change this?

With the same IF-statement you can emit "Submit to guestbook" instead of $CONST.SUBMIT_COMMENT or something like that.

I use the yesterdays nightly right now.

Thanks again!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If your blog is running in UTF-8 charset, you need to save your .tpl file in UTF-8 as well if you make such a special character comparement!

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Thanks Garvin,

and could you kindly explain where i have to change

With the same IF-statement you can emit "Submit to guestbook" instead of $CONST.SUBMIT_COMMENT or something like that.
Regards, Harald
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, instaead of $CONST.SUBMIT_COMMENT you simply place "Submit to guestbook". :-)

Best 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/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Garvin, sorry again. I cannot find the string $CONST.SUBMIT_COMMENT in entries.tpl.

I guess, entries.tpl is not the right place to search, right?
Post Reply