Page 1 of 1

Private Comments

Posted: Thu Nov 14, 2013 7:30 pm
by mrw02536
I think this question was asked several years ago.

I've integrated Serendipity into my own website. My website, which among others things, works like a 'private' blog between the user and admin. Independent of Serendipity my website displays the comments and admin reples only for the user loggedin. It was fairly easy to do by restricting the appropriate web pages to data associated with the SESSION[user_id] value. I provide a separate link to Serendipity which I use as a public blog. It would be nice if I could integrate the two concepts.

What you would need is an option (setting a flag in the database table) when posting a comment to allow it be 'private' to be viewed by the admin only. When someone logs in you would display only blog comments with that flag turned off unless the loggedin user_id (authorid) matched
.
Is there any thought about providing such an option with Serendipity?

Rich

Re: Private Comments

Posted: Sat Nov 16, 2013 10:18 am
by Timbalu
Is it kind of this you are looking for?
http://blog.brockha.us/archives/93-Grup ... ipity.html (German only)

Then or even independently you could use Smarty to show blog entries or comments for logged-in users only. I think the smarty tag {if $is_logged_in} is available by default and could be combined with global request var conditions (the request variables such as $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV and $_SESSION can be accessed, eg {$smarty.session.id}).

Re: Private Comments

Posted: Sat Nov 16, 2013 1:09 pm
by mrw02536
I'll see if that helps but what I'm looking for is more basic than than - simply a way to privately leave a blog for the administrator.

There is some description in 'functions_entries.inc.php' about options for fetching entries in function &serendipity_fetchEntries. Could that be useful here. The explanation says to set he superglobal $serendipity['GET']['viewAuthor'] to the Author you want to fetch and to set this option before calling serendipity_fetchEntries(). Could you elaborate on this? I was not able to get it working (serendipity_fetchEntries() is called in 'entries.inc.php').

Lastly, I notice is this blog you have spell checking. Is that something set within Serendipity or the browser itself?

regards,

Rich

Re: Private Comments

Posted: Sat Nov 16, 2013 2:13 pm
by Timbalu
It seems I still do not get what you are trying to achive.

Anyway, changing the cores code is not what I would call simple, since you really have to know how all that works together and you break an easy update policy.

Using the cores API on the other hand is simple and mighty by creating your own plugin or using your templates config.inc, even if that takes a while to understand too.

There also is the Smarty way eg. {serendipity_fetchPrintEntries} http://www.s9y.org/78.html, which can use the author ID to fetch entries from.

I don't understand the note about spell checking. There is no spell checking in core, but there is a serendipity_event_spellcheck plugin and some independently used spell checks in WYSIWYG-Editors. Modern Browsers have their own.

Re: Private Comments

Posted: Sat Nov 16, 2013 2:43 pm
by mrw02536
I'm sorry to be confusing.
What I'm interested in doing is being able to post a blog comment to the administrator for his eyes only (private). That is, a comment that only the administrator can see.

Rich

Re: Private Comments

Posted: Sat Nov 16, 2013 3:01 pm
by mrw02536
I don't see the spell checker plugin on the "manage plugin' page.

Re: Private Comments

Posted: Sat Nov 16, 2013 3:13 pm
by Timbalu
Ah! much better :)
Does that really need to be a comment?
If not, it could be a notification like a contactmail via pseudo comment.
In that case you could add an extra form field beneath the commentform area, restricted by certain conditions, to send a comment note to admin, though this wouldn't be documented or saved somewhere.
mrw02536 wrote:I don't see the spell checker plugin on the "manage plugin' page.
Ups, it is mentioned in the forum. I did not look up if it exists on Spartacus or has ever been. Sorry.

Re: Private Comments

Posted: Sat Nov 16, 2013 3:16 pm
by mrw02536
There is spell checking on this blog

Re: Private Comments

Posted: Sat Nov 16, 2013 3:18 pm
by mrw02536
I like the idea of private comments to administrator with replies - could be useful to report abuses and other things.

Re: Private Comments

Posted: Sat Nov 16, 2013 3:51 pm
by Timbalu
mrw02536 wrote:There is spell checking on this blog
Is "this" meaning grischas blog, the serendipity blog http://blog.s9y.org/ or this phpBB forum? I don't see any.
mrw02536 wrote:I like the idea of private comments to administrator with replies - could be useful to report abuses and other things.
This does get kind of "chatty", I assume. :) Why spoil the comment area for private chats between two persons?
Create a plugin for this or append an extra comment mailform field.
Changing an open blog system to a restricted cms solution for single users is quite some work.

If you need this for (user)groups, you could just place some group conditions into comments.tpl to restrict views and comments to members of a group only.

Re: Private Comments

Posted: Sat Nov 16, 2013 4:21 pm
by mrw02536
The blog we're using right now.