Private Comments

Discussion corner for Developers of Serendipity.
Post Reply
mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Private Comments

Post by mrw02536 » Thu Nov 14, 2013 8:30 pm

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

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Private Comments

Post by Timbalu » Sat Nov 16, 2013 11:18 am

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}).
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 2:09 pm

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

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Private Comments

Post by Timbalu » Sat Nov 16, 2013 3:13 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 3:43 pm

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

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 4:01 pm

I don't see the spell checker plugin on the "manage plugin' page.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Private Comments

Post by Timbalu » Sat Nov 16, 2013 4:13 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 4:16 pm

There is spell checking on this blog

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 4:18 pm

I like the idea of private comments to administrator with replies - could be useful to report abuses and other things.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Private Comments

Post by Timbalu » Sat Nov 16, 2013 4:51 pm

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

mrw02536
Regular
Posts: 31
Joined: Sat Nov 02, 2013 10:25 pm

Re: Private Comments

Post by mrw02536 » Sat Nov 16, 2013 5:21 pm

The blog we're using right now.

Post Reply