This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Permalinks
#1

First off, I want to say: great script! It has exactly what I need. I want to use it as a review page for my writing performance.

However, I see a feature missing that I think should be in place: permalinking comments.

This way, I can link to another comment in reference while making replies, or to simply link to a thread to show someone the discussion.

-Tarak
Reply
#2

Hi,

Thanks, I think this is an important feature. I have added it to the Roadmap:

http://www.commentics.org/roadmap.php

Have you completed the interview?
Reply
#3

Thanks for adding the permalinks!

I was wondering why the permalink looks like this:

mydomain.com/someValue/anotherValue/?variable1=someValue&variable2=anotherValue&cmtx_perm=14#cmtx_perm_14

.htaccess already tells the rewrite engine that: /someValue/anotherValue/
means variable1=someValue and variable2=anotherValue

so is there any way to simplify the Commentics permalink to something like:

mydomain.com/someValue/anotherValue/?cmtx_perm=14#cmtx_perm_14

Thanks,
Jake
Reply
#4


Have you completed the interview?
Reply
#5

Reply
#6


Have you completed the interview?
Reply
#7

Wow Thanks!
I didn't get around to fixing the like/dislike, but the instructions in #1 worked great. It looked like Sabrina was having the same problem (php parameters showing up after the permalink). I don't know what that extra line does, but it worked great .
Thanks!
Reply
#8

(28-Feb-2013, 07:17 PM)Steven Wrote:  1. After you submit the 'Add Comment' form, is the URL different? If so, try this:
http://www.commentics.org/forum/showthre...44#pid3944

I did what you said over their and it worked great. There seems to be a different effect though:

The permalink for a comment is now:

http://www.domain.com/Article-Name/?cmtx...mtx_perm_5

If I open that url, the page has no comments. The url that does show the comments and will go directly to the comment associated with the permalink is

http://www.domain.com/Article-Name/#cmtx_perm_5

but it's not getting written that way.
Reply
#9

(28-Feb-2013, 08:39 PM)JMG Wrote:  I don't know what that extra line does, but it worked great .

$_SERVER['QUERY_STRING'] just gets any parameters that are in the URL. The reason I added this was in case the website has any features that alter the URL. It's probably best to give an example. If you go to the demo, click the 'Alternate' link, notice that 'style=alternate' is in the URL, now click on the page 2 pagination link. You'll see that 'style=alternate' is still in the URL. This could be useful for example if your website has a feature to change the language or to change the sort order of something, Commentics will remember and retain it. However, what seems to be happening is that $_SERVER['QUERY_STRING'] is getting the parameters from the URL before it is re-written and aren't actually even in the URL. So, the suggestion I made just clears the $_SERVER['QUERY_STRING'] value so there's nothing in it. This will get rid of the parameters that were in your original URL but it will now no longer provide the advantage of retaining any additional parameters, so it's not ideal. What I'll try to do for the next version is instead of using the $_SERVER['QUERY_STRING'] value, I'll use $_SERVER['REQUEST_URI'] which gets what's actually in the URL, and extract the parameters from that.

Have you completed the interview?
Reply
#10

(28-Feb-2013, 11:23 PM)JMG Wrote:  I did what you said over their and it worked great. There seems to be a different effect though:

The permalink for a comment is now:

http://www.domain.com/Article-Name/?cmtx...mtx_perm_5

If I open that url, the page has no comments. The url that does show the comments and will go directly to the comment associated with the permalink is

http://www.domain.com/Article-Name/#cmtx_perm_5

but it's not getting written that way.

"?cmtx_perm=5#cmtx_perm_5" is the correct URL. There needs to be the cmtx_perm=5 part so that the script can calculate what page to load. Having #cmtx_perm_5 without cmtx_perm=5 might work for now but once you have multiple pages it won't. I'm not sure why it's not displaying any comments. I assume you're using the cmtx_url keyword for the $cmtx_page_id variable in your integration code, so what's probably happening is that the URL is different to the one in Manage -> Pages so it's creating a new page which has no comments. The code which handles the automatic new page creation knows to remove ?cmtx_perm=5 from the URL before checking to see if it already exists in Manage -> Pages so it should be able to deal with that. But it might be better to supply the $cmtx_page_id variable with a more reliable value, maybe supply it with just the variable1=someValue or variable2=anotherValue part of the URL, instead of the whole thing.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)