Position of the comment feedback on page

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Position of the comment feedback on page

Post by aschlemmer »

Dear all,

I'm trying since 60 min. to find the hook to display all feedback like "THIS_COMMENT_NEEDS_REVIEW" or "COMMENT_ADDED" at the top of the page just before the h1 of the post and not right under the last comment, because the default behaviour requires the user to scroll down to the bottom to read the feedback.
Where and in which .tpl do I change what to get this repositioned HTML output? (absolute CSS directives like position: 0 0 must be avoided, I want to re-order the HTML structure for that, nothing else)

Questions like this are repeating while I'm trying to handle s9y, so your support is warmly welcome.

Note: The thread "Can I redirect comment feedback to another site?" points in a similar direction -- unfortunately it doesn't hely relatively small problem of arranging plugin output.

Regards,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Position of the comment feedback on page

Post by Don Chambers »

take a look at entries.tpl.

Code: Select all


            {if $CONST.DATA_COMMENT_DELETED}
                <div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</div>
            {/if}

            {if $CONST.DATA_COMMENT_APPROVED}
                <div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</div>
            {/if}
=Don=
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Re: Position of the comment feedback on page

Post by aschlemmer »

Dear Don,

thanks for your quick hint. While I put

Code: Select all

        {if $is_single_entry and not $use_popups and not $is_preview}
            {if $CONST.DATA_UNSUBSCRIBED}
                <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}</div><br />
            {/if}

            {if $CONST.DATA_TRACKBACK_DELETED}
                <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}</div><br />
            {/if}

            {if $CONST.DATA_TRACKBACK_APPROVED}
                <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}</div><br />
            {/if}

            {if $CONST.DATA_COMMENT_DELETED}
                <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</div><br />
            {/if}

            {if $CONST.DATA_COMMENT_APPROVED}
                <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</div><br />
            {/if}
        {/if}
just at the beginning of the <div class="post"> tag, the comment feedback still displays inside the comments section and not on top of the post entry. (I cleared the templates_c directory, yes)

Screenshot: Image

It's always the finetuning where I stumble with s9y, so maybe I'm better a typical WP user.
Still keeping the faith ion s9y and hoping for some help again,

Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
onli
Regular
Posts: 2836
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Position of the comment feedback on page

Post by onli »

because the default behaviour requires the user to scroll down to the bottom to read the feedback.
That's not true when using a normal template. The feedback hat it's own anchor which is used. In fact, putting the feedback at the top would require the user to scroll the page up...

To the issue itself: Seems like you forgot a few feedback-message, the image shows

Code: Select all

{elseif $is_comment_moderate}

                    <br />
                    <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}<br />{$CONST.THIS_COMMENT_NEEDS_REVIEW}</div>
which is missing in the code you showed.
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Re: Position of the comment feedback on page

Post by aschlemmer »

Thanks for your reply.

I did the radical way and tried to re-position the comments feedback on the page using the default template files instead of my modded Kubrick theme.
Then I'm getting the feedback that commenting is turned off on the desired position. But with wrong behaviour: Comments are on.

Maybe I should hire a s9y developer instead, because of no luck on my side ...

In the meanwhile, I'll try my best at another construction area of my site.
Hopefully with more success :)

/Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Position of the comment feedback on page

Post by Don Chambers »

onli makes a good point - any message that results from leaving a comment (successfully added, is moderated, etc) includes an anchor ID of feedback (#feedback). For instance, a successful comment will regenerate the page with a url that looks something like this:

Code: Select all

http://yoursite.com/index.php?url=archives/Entry-Title.html&serendipity[csuccess]=true#feedback 
A visitors browser will generate the page, then position the cursor right at the message unless there is something in your template that prevents it.

I also might have led you slightly off track in my earlier post. The section of the default template that you should be looking at is:

Code: Select all

<a id="feedback"></a>

                {foreach from=$comments_messagestack item="message"}
                <div class="serendipity_center serendipity_msg_important">{$message}</div>
                {/foreach}

                {if $is_comment_added}

                <br />
                <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}</div>

                {elseif $is_comment_moderate}

                <br />
                <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}<br />{$CONST.THIS_COMMENT_NEEDS_REVIEW}</div>

                {elseif not $entry.allow_comments}

                <br />
                <div class="serendipity_center serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</div>
You are going to have to play with that for a bit to get exactly what you want.
=Don=
Post Reply