I’ve just started working with ExpressionEngine (first site hopefully launching tomorrow), and one thing I found sorely missing was the ability to make a page scroll down to the newly submitted comment after a visitor has added it.
So I made an extension. And here it is. 😊
It’s pretty basic - stick the extension file in your /extensions folder and the language file in your /languages folder, and enable the new extension under Admin > Utilities > Extensions Manager.
The single setting allows you to specify a prefix for the comment_id to be used in the markup. (Under a Strict doctype, you can’t start a CSS id with a number, so you should really call them “comment123” or similar).
Any feedback, suggestions or comments, please let me know. 😊
Moved to Extensions forum by Moderator
Hi,
I made a little fork of Scroll to Comment extension. The aim of this fork is to have a a possibility to form URLs without # symbol. That is, instead of forming URLs as this
http://mysite.com/index.php/blog/entry/#comment190
to form them as this
[quote]http://mysite.com/index.php/blog/entry/comment190/
Such possibility can be handy in some cases (e.g. when there are on the page elements having CSS “position” set to “fixed” or in cases when javascript onload makes some change of CSS rules, such as change of font). In these cases URLs having # symbol cannot scroll marked element into view correctly; only some custom javascript that parses URL can.
In settings I added a new option “Use symbol # in the last URL segment” (default is yes). And in ext.scroll_to_comment.php file I added all needed branching of code for the case “yes” and for the case “no”.
Hi,
I published Comment Location plugin which can be used together with Scroll to Comment extension in order to support pagination of comments.
I’ll take a look when I have time. Your last comment seems to indicate that either:
Looking at my code it may be that the latter is true. Try removing the $EXT->end_script = TRUE line from my extension.
Thanks Matthew. I really appreciate it.
I tried removing the $EXT->end_script = TRUE line, but that didn’t work.
In case it helps, Mr. Wilson, the author of Weever, sent me to this page in the docs for a clue as to what might be the problem: http://expressionengine.com/docs/development/extensions.html#hook
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.