×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Portable Comments using {comments} Tag

Portable Comments using {comments} Tag 10 years 10 months ago #20269

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
In late 2011 I was given a custom mod to have portable comments using a {comments} tag. This allowed me to place in comments into a tab using {comments} as the syntax. But now that CComments is having a major upgrade, I assume this won't work anymore. So why not have it built into CComments? Jcomments officially has it built in with no known issues. All one has to do with Jcomments to set it up is go to the plugin "Content - JComments" and change the option of "Content Event" (at the bottom) from OnAfterDisplayContent to OnPrepareContent. Here's an example of this using jcomments.

I attached the modded version that you gave me a while back (the changes are near the bottom)

File Attachment:

File Name: jocomment.txt
File Size: 5 KB


I like to keep my software as up to date as possible, so I'm sure you wouldn't want to keep making me mods. And you know I don't want to go "portabeless". ;) Why is this so important? Because I'm trying to make my site as user friendly as possible using consolidation methods. Tabs happened to be the best option.

So to make it so no one else is inconvenienced from this, have it disabled by default. Perhaps having the option in the plugin config with two options of OnAfterDisplayContent and OnPrepareContent. I can even give an example of how this was coded to if needed.
Attachments:

Portable Comments using {comments} Tag 10 years 10 months ago #20272

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, I'll add it in the core for beta2. However I don't think that this is a good way for doing this. By using the {comments} tag you are mixing presentation with function. (kinda building html pages by embedding the css directly in each tag with style="...") Next time you update and move to another system you'll have to make a script to delete 10 000 {comments} tags in your articles...
The following user(s) said Thank You: Josh Lewis

Portable Comments using {comments} Tag 10 years 10 months ago #20275

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
The good news is that I use n3t template which generates my code automatically. So it doesn't matter if the syntax is 100% changed because I will only have to edit a few lines which will effect all my articles. So I don't have to edit a single article!

Regarding the syntax itself, what would be better? Simple is good, the less characters the better (to reduce server load/ bandwidth). But I'm all ears if you have a better syntax.

Thanks for your willingness to add this feature. This goes very much appreciated. :cheer:

Portable Comments using {comments} Tag 10 years 9 months ago #20497

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
I see that beta 2 came out. I don't see the option for portable comments. Is it being bumped over to beta 3?

Portable Comments using {comments} Tag 10 years 9 months ago #20536

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Josh!
Sorry! I forgot about that in beta2 (blush)

Now the good news is that I just fixed this mistake & I think that the plugin is now even better than before. Here are the docs:
compojoom.com/support/documentation/ccomment/ch03s03#idp176208

You can now control whether the comment plugin should be executed, turned off or if the comments for the article are closed.

Please test it and let me know if it works as expected :)

Cheers,
Daniel

Portable Comments using {comments} Tag 10 years 9 months ago #20538

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
I tested out the free version which it is not working as seen here:
www.alpineascent.com/beta/index.php/blog/3-test-3

Perhaps you forgot to add it to the free version. :P

Also does this allow the comments to be portable? I assume it allows to enable and disable as the syntax suggests. Here's a example of what I mean . Notice the comments are inside of a tab. This way content can be separated from comments.

Portable Comments using {comments} Tag 10 years 9 months ago #20539

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Did you download the beta or the dev release????
I see that the dev release has been downloaded 0 times, so most probably you got the wrong version ;)
compojoom.com/component/ars/repository/dev-ccomment/git4c5d032 -> this is the correct version you need for this.

I don't think that comments are going to be portable. The comments should still be output where the onAfterContent event should be output. So if your event outputs onAfterContent in a tab -> they'll be in a tab.

Portable Comments using {comments} Tag 10 years 9 months ago #20541

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
Indeed I had the wrong version, thanks for the link. It seems that you have the commands backwards. :huh: {ccomment on} turns off the comments while {ccomment off} keeps it on.

Unfortunately I have not been able to successfully get the comments inside of a tab. :( I even tried making n3ttemplate's plugin order high and ccomment's plugin low.

You managed to get Ccomments portable before (as seen in the file attached to the first post). I take it you used a untraditional method? Looking into the PHP of the plugin n3ttemplate it has "onContentPrepare" and "onContentBeforeDisplay". To my surprise I could not find OnContentAfterDisplay or onAfterContent in the n3ttemplate. (You might ask why n3ttemplate is relevant - it's what auto generates content in categories) But it still manages to place in content at the end of an article.

Any ideas or methods on this to get comments in a tab? As said, the old method worked fine in CC4.

Portable Comments using {comments} Tag 10 years 9 months ago #20598

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
Daniel you there? Aside from wanting comments portable, the activation syntax is backwards.

Portable Comments using {comments} Tag 10 years 9 months ago #20599

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yes, yes! I'm here. I'm trying to figure out why the syntax is "backwards" for you.

As far as the portable comments go the plugin that you've attached does actually the same thing as the one we have right now. Are you sure that you've attached the correct version.

Also my thoughts on the way you integrate comments:
Rethink it!
If I'm the user and I'm on your blog -> you have so many images and text -> I need to scroll so much down to read your post. And then I need to scroll all the way up, click on the comments tag and start reading. For me this is really annoying and doesn't constitute an improvement.
Also another problem is -> If you share a link to a particular comment, the user will land on the page, the comment will be loaded, but the user won't see it as one needs to click the comments tab.

For me using tabs make sense in the case of airbnb. For example this page:
www.airbnb.com/rooms/936997
Look at the photos, map etc tabs -> they all have the same amount of information to show -> the user doesn't have to scroll down and then again all the way up to see the info.

Moreover users are expecting to see comments after articles today -> not in a tab. Comments are related to an article, that is why they should come after the article.
Just my thoughts... Maybe ask other people what they think about it as well.

Cheers,
Daniel

Portable Comments using {comments} Tag 10 years 9 months ago #20616

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
I sent you an email (to your compojoom email). I gave you full admin access to my test site which is nearly fresh.

Regarding the viewing comments issue there are a few factors that play in my favor. While on my personal site I plan on using CC for comments, on Alpine Ascent (the site that needs portable comments) it will be using CC for either climber logs or Discussions. Because I will have so many things like Maps, Content Lists, Gallery and other things. They will each get there own tab. Trust me, it is more organized this way with the complexity of a site I'm making.

Here's a great example of a page I made, it has lots of content. Imagine if the climber logs, the map, the gpx track, the comments, and the attached images were in it as well. It would be overwhelming! This is some what what I'm after except for in tabs.

Here's a link to a test page of mine (using CC Version 4):
www.alpineascent.com/trip-report/41-test-trip-report
At the bottom of the article it has a link to "comments" which bring it to the comments tab. So there is not much hassle at all if it is better to have something at the bottom to bring one to comments. That link can be 100% automated, in other words I would not have to insert that link in every article to make it appear (using nt3template).

Now I admit the anchor issue still remains. I plan on coming up with a clever idea for dealing with that one (in the future when I learn JavaScript and Jquery). The extension allows one to open a tab with a variable like "?tab=comments". The only issue is that this somehow reloads the page and breaks the scrolling down to the anchor. But as I said I'll try to think of something eventually on this.

Also this portable comments additions would help more than just my site Alpine Ascent, it would help me out in a few other cases as well. B)

Portable Comments using {comments} Tag 10 years 9 months ago #20642

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, I fixed the bug with the wrong use of {ccomment on|off} - actually it was related to the comment settings...

Also now there is a new option in the plugin (execute on onContentPrepare) and if this is enable the comments will be displayed in your tab. Updated the docs with a little info about this:
compojoom.com/support/documentation/ccomment/ch03s03#idp178992

Would you mind testing it? I want to release the first RC...

Cheers,
Daniel
The following user(s) said Thank You: Josh Lewis

Portable Comments using {comments} Tag 10 years 9 months ago #20652

  • Josh Lewis
  • Josh Lewis's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 89
  • Thank you received: 3
It works just fine! :cheer: Tested with different variations just for fun (above article, below, ect) which also worked. B) Thanks for adding the onContentPrepare as well. I assume this setting is disabled by default; right?

I would not mind doing more testing. ;) There is a addition or two that I strongly believe should be in the stable release of CComment 5. Email sent about front-end deleting.
  • Page:
  • 1
Time to create page: 0.160 seconds