user tip comment back (tip)

soaringeagle
@soaringeagle
10 years ago
3,304 posts
ok this is a super ez tip

step 1 go to your cuser comments module
open template item_list.tpl

you can simply select all then paste this over it
but i will also show u just how simple it was to edit it

{jrCore_module_url module="jrComment" assign="murl"}
{foreach from=$_items item="item"}
<div id="cm{$item._item_id}" class="item">

    <div class="container">
        <div class="row">
            <div class="col1">
                <div class="block_image p5">
                    {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$item._user_id size="small" alt=$item.user_name class="action_item_user_img iloutline img_scale"}
                </div>
            </div>
            <div class="col10">
                <div class="p5" style="margin-left:18px">
                    <a name="c{$item._item_id}"></a>
                    <span class="info" style="display:inline-block;">{$item._created|jrCore_date_format} <a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a>:</span><br>
                    <span class="normal">
                    {if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id}
                    {else}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id:null:"html"}
                    {/if}
                    </span><div class="commentback"><a href="{$jamroom_url}/{$item.profile_url}#comment_back">Comment Back</a></div>
                </div>
            </div>
         <div class="col1 last">
                <div id="bc{$item._item_id}" class="block_config" style="display:none">
                    <script>$(function () { $('#cm{$item._item_id}').hover(function() { $('#bc{$item._item_id}').toggle(); }); });</script>
                    {if $_params.profile_owner_id > 0}
                        {* profile owners can delete comments *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                    {else}
                        {* site admins and comment owners see this button *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                    {/if}
                </div>
                
                <div class="clear"></div>
            </div>
        </div>
    </div>

</div>
{/foreach}
<a id="comment_back"></a>

now theres just 2 lil things u need to make this work
you will see 2 span class's
span class info is your top info span class normal is your comment body
so after the closing span </span> for the normal class
you will see this
<div class="commentback"><a href="{$jamroom_url}/{$item.profile_url}#comment_back">Comment Back</a></div>
the div is optional for styling purposes
the #comment_back too if you just want it to take them to the profile
but since you want to take them to the comment form after the {/fireach} at the very bottom of the template you want to add an anchor
<a id="comment_back"></a>
that way the #comment_back on the end of the url takes you to the end of the comment list..and the text editor

now this is also optional
but since we have a div for a lil styling

.commentback > a {
  -webkit-border-radius: 8.5em / 1.3em;-moz-border-radius: 8.5em / 1.3em;border-radius: 8.5em / 1.3em;
  -webkit-box-shadow: 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset,0 0 .2em .1em lightblue;-moz-box-shadow: 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset,0 0 .2em .1em lightblue;box-shadow: 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset,0 0 .2em .1em lightblue;
  padding: 0.6em;
}.commentback {margin:.8em;}.commentback > a:hover {
  -webkit-border-radius: 8.5em / 1.3em;-moz-border-radius: 8.5em / 1.3em;border-radius: 8.5em / 1.3em;
  -webkit-box-shadow: 0 0 2.3em 0.1em rgba(100, 192, 145, 0.7) inset, 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset, 0 0 0.2em 0.1em lightblue;-moz-box-shadow: 0 0 2.3em 0.1em rgba(100, 192, 145, 0.7) inset, 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset, 0 0 0.2em 0.1em lightblue;box-shadow: 0 0 2.3em 0.1em rgba(100, 192, 145, 0.7) inset, 0 0 1.3em 0.1em rgba(27, 192, 145, 0.7) inset, 0 0 0.2em 0.1em lightblue;
  padding: 0.6em;
}

makes it a lil more visible as a button


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 02/22/15 03:15:07PM
soaringeagle
@soaringeagle
10 years ago
3,304 posts
oh but note since were editing right in the module template dont forget to compare and merge anytime the modules updated


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
I'd love to have the Comment Back link on profile page comment walls, under each comment, and I truly appreciate your intent here...but I can't/won't paste your entire comments module code to replace all of mine. My current skills are still not up to sorting out exactly what's needed and what's not, or restyling a 'dreadlocks' style transparent green shadow button. I'm sure some other folks will have no problem doing it!

I'll have to hope the JR Team will just add the "comment back" link to the User Comments module sometime soon.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
I'd love to have the Comment Back link on profile page comment walls, under each comment, and I truly appreciate your intent here...but I can't/won't paste your entire comments module code to replace all of mine. My current skills are still not up to sorting out exactly what's needed and what's not, or restyling a 'dreadlocks' style transparent green shadow button. I'm sure some other folks will have no problem doing it!

I'll have to hope the JR Team will just add the "comment back" link to the User Comments module sometime soon.

Isn't a "comment back" just a reply to a comment? If so that's coming in the next User Comments module release.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
No, it's not a reply to the comment- in that location.
Say I see some other member has left a new comment on my own profile page Comment Wall.
I could just make my own new comment under theirs, and respond to them...but then they would not get a notification alerting them that I replied to them.
Instead, (and preferred) their comment (and every comment) will have a link at the bottom of their comment saying "comment back" and clicking that link will bring me directly to THEIR profile page comment wall (not just to their profile page, mind you), and to a blank comment text box where I can simply start typing my response to them. That way, they then get a notification that a new comment was left on THEIR profile comment wall...and they can go read it.
Thus, "comment back" takes you to a comment text box on the OTHER person's comment wall...so they will be notified and actually see it. (and again get to 'comment back' to YOUR comment wall again).

As it is now, if someone comments on my profile page comment wall, and I answer them there....they may never know I even responded unless they keep going to my page over and over to see if i responded yet. So that does not tend to help communication or activity.



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 09:00:47AM
brian
@brian
10 years ago
10,148 posts
What if there were notifications for replies to comments?

What you say is also very easy though - it's just a link to their profile index with a "hash" tag set so they drop right down to the comment box.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
brian:
What you say is also very easy though - it's just a link to their profile index with a "hash" tag set so they drop right down to the comment box.

I think that's be the easiest and most logical. It's also be what most ning folk are familiar with and like to use often- so it'd be fabulous if you could add it into the module...if it's not too much trouble that is. :)



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 09:50:05AM
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
brian:
What if there were notifications for replies to comments?

What you say is also very easy though - it's just a link to their profile index with a "hash" tag set so they drop right down to the comment box.

Brian -

A notification of a reply to a comment ... that should be the same thing as someone just commenting, especially as there is no nesting of replies to replies. Not sure if there is a meaningful difference semantically (or from a data structures perspective).

The "reply to comment" (comment back) is a shortcut - it takes us directly to the place where we reply back with a single click; that's its usefulness, the single click to reply (and it would be even better if cursor focus were in the comment textarea).

It's is NOT a feature that I use very often, but I don't keep track of my members commenting on each others' comment walls so I can't tell you how useful it is to my membership in general. However, I can see where it's useful in a lot of communities.

But notifications is an absolute necessity - otherwise it would never occur to me to check my comment wall.
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
thechocolatelife:
The "reply to comment" (comment back) is a shortcut - it takes us directly to the place where we reply back with a single click; that's its usefulness, the single click to reply (and it would be even better if cursor focus were in the comment textarea).

Yes. And also yes- some networks use it a whole lot more or less than others. For example, on both Saoring and my own two networks, members use it many times a day, happily. They kind of thrive with it in fact- it fosters massive member-to-member interactions- especially with brand newbie members who can't find their way around well yet, and have yet to master navigating on forums or in groups.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
thechocolatelife:
But notifications is an absolute necessity - otherwise it would never occur to me to check my comment wall.

This is already supported and works, since the comment is ON your profile. The only place where notifications currently are NOT being done is if someone clicks on "reply" to a comment - the user who's comment is being replied to is NOT notified if that comment is on a profile or item that is NOT their own.

Threaded comments are in testing right now, so I'll likely add support for that.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
my code does exactly what u need strum just skip the optional css so you wont have the buttonized styling

it gives you the comment back
takes you to the commenters profile..right to the text box to add a comment to
and u can either copy paste the whole block..it just add those 2 lil lines where i added them


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
Brian -

A note about threaded comments - and this is something Ning-y.

But first, a digression as I mentioned above ...

There is no fundamental difference, from a data structures perspective, between forum posts, blog posts, memos, private notes, etc. You can easily have a superset of all the db fields and change the context in which any object is displayed. Photos, too. (And email while we're at it.)

The semantic difference between a blog post and a forum post is that when I post in a Forum I am asking a question for which I am looking for answers. When I post a blog I am telling a story and I am less interested in getting responses.

Forum discussions tend to generate a lot of replies to replies, hence nesting is a good idea -- you can see the branch point. From a UI/UX perspective, you should be able to expand/collapse a set of nested replies if the topic devolves or evolves in a direction that's uninteresting.

On the other hand, in a blog, replies tend to be to the post, not to other replies. This is not universal, of course, but it is one way of differentiating between Forums and Blogs.

For my .02, I would like the display/sort order in Forums to be strictly in order. The first response is displayed first. You can invert this, but that brings in the question of sort orders within nested replies, which can get very gnarly very quickly. So - I'd just punt and only offer strictly ordered presentation.

In a blog, I would permanently disable threading and give the administrator the option for the default sort order and then give the visitor the option to change the sort order. There's an icon for this in Images/Galleries.

OTHERWISE, there's no functional/data difference between Galleries and Blogs. And, if that's the case, I want the ability to re-parent blog posts into forum discussions (and vice versa) (and from site forums into Group forums) because a lot of users do not know the difference between posts and blogs and post in "the wrong place."
soaringeagle
@soaringeagle
10 years ago
3,304 posts
personaly i despise nested replies and wont use them ever replies with quoutess are far prefered
then you know who your replying to but not have the most recent reply show up on page 2 6 or 10 of a 30 page thread and have each "nest' get smaller and smaller till you run out of spacce so you only have 5 replies deep to a post thats why i hated the old creator style and always used the 'flat" style with quotes


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
OK Se- I just applied your 2 lines of code, in the correct location, and yes it did give me the "comment back" link. BUT it screwed up how my profile pages looked. So I removed it and things are back to normal again. Sorry, can't use your code.

Here is my 'normal' profile page before your code:
Strumelia_ok.jpg
Strumelia_ok.jpg  •  801KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 12:34:11PM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
And here's what happens with your code added, Soaring:
Strumeliapage.jpg
Strumeliapage.jpg  •  983KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 12:35:19PM
brian
@brian
10 years ago
10,148 posts
thechocolatelife:
OTHERWISE, there's no functional/data difference between Galleries and Blogs.

Maybe I am misunderstanding what you are getting at, but I don't know if I can agree. The DataStore "backend" that JR uses for everything - blogs, galleries, forum, etc. - is all the same - basically a key/value store. However, the data that each of these contains is going to be very different i.e. a "create gallery" form is really about the images, so let's upload a hundred. A "blog" is about some long-form text. It may or may not have an image. How they are displayed is also going to be different as each has a very different focus.

Regardless though, "comments" on any of these items should appear uniform (in my opinion) - the easiest way to confuse people is to present the same thing to a user in multiple ways. So the site owner can set how they want comments to be be site wide, which I think will lead to the least amount of confusion amongst our users.

This whole thread about "comment back" really is just a URL that links to the commentor's profile. That's already on every comment by default in Jamroom, it just does not say "comment back" - it's linked by their profile URL (i.e. like this: @brian).

I think the the "overarching" theme that I hear from Ning users coming to Jamroom is that THEIR users (not Ning users coming to Jamroom) are easily confused and pretty much everything needs to have a very explicit link that says CLICK HERE TO DO THIS or else it is going to be an issue. From my end I have to just try to "balance" what we actually put in to JR versus what we say "you need to customize this at your template level" as frankly some of the Ning style of doing things is very, very dated to me (but that's just my 2 cents).

Anyway, I likely misunderstood you but maybe that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
Strumelia:
And here's what happens with your code added, Soaring:

are tyou sure u put the codes exactly where i said u can copy pasye the whole block over none of that should happen at the very most uu might want to add a lil margin around the link but thats all


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
brian:
thechocolatelife:
OTHERWISE, there's no functional/data difference between Galleries and Blogs.

Maybe I am misunderstanding what you are getting at, but I don't know if I can agree. The DataStore "backend" that JR uses for everything - blogs, galleries, forum, etc. - is all the same - basically a key/value store. However, the data that each of these contains is going to be very different i.e. a "create gallery" form is really about the images, so let's upload a hundred. A "blog" is about some long-form text. It may or may not have an image. How they are displayed is also going to be different as each has a very different focus.

Regardless though, "comments" on any of these items should appear uniform (in my opinion) - the easiest way to confuse people is to present the same thing to a user in multiple ways. So the site owner can set how they want comments to be be site wide, which I think will lead to the least amount of confusion amongst our users.

This whole thread about "comment back" really is just a URL that links to the commentor's profile. That's already on every comment by default in Jamroom, it just does not say "comment back" - it's linked by their profile URL (i.e. like this: @brian).

I think the the "overarching" theme that I hear from Ning users coming to Jamroom is that THEIR users (not Ning users coming to Jamroom) are easily confused and pretty much everything needs to have a very explicit link that says CLICK HERE TO DO THIS or else it is going to be an issue. From my end I have to just try to "balance" what we actually put in to JR versus what we say "you need to customize this at your template level" as frankly some of the Ning style of doing things is very, very dated to me (but that's just my 2 cents).

Anyway, I likely misunderstood you but maybe that helps.

Thanks!

comment backs not just a link to the profile but the comment form and i can tell you that without it they will comment on thier own profile instead of on yours


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,148 posts
soaringeagle:
comment backs not just a link to the profile but the comment form and i can tell you that without it they will comment on thier own profile instead of on yours

Yeah that's what I am getting at - that your users will not be able to figure that out on their own, which is why you need to have a CLICK HERE TO DO THIS RIGHT.

It's a very, very small change to the comment template to just change the text on the existing URL and add a URL fragment of #cform.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
@Soaring - Nope, I did it right, very careful. Not going to mess with it again, made too many things go caca-mamie. Thanks though.

@Brian- yes my 4000 members are 80% over 60 yrs old. They need lots of stuff spelled out for them. Maybe they shouldn't need it....but they do. And they write to me endlessly when they can't figure it out. Last year I had a guy who told me the chat was broken, it wouldnt post his chat text. Turns out he didn't realize he had to hit "enter" to make his text post to the chat each time after typing. =8-*


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 01:04:07PM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
soaringeagle:
comment backs not just a link to the profile but the comment form and i can tell you that without it they will comment on thier own profile instead of on yours

Yep, my members will do that as well....almost half the time...if it were not for the "comment back" link. It seriously does not occur to them to go to the other person;s profile page to respond.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
Brian- yes my 4000 members are 80% over 60 yrs old. They need lots of stuff spelled out for them. Maybe they shouldn't need it....but they do. And they write to me endlessly when they can't figure it out. Last year I had a guy who told me the chat was broken, it wouldnt post his chat text. Turns out he didn't realize he had to hit "enter" to make his text post to the chat each time after typing. =8-*

I hear you - but bear with me here a moment here while I comment on that. Using that scenario did you contact the chat developer and tell them that they needed to have a help text that said "PRESS ENTER OR YOUR CHAT TEXT WILL NOT BE SEEN" added to the product, or did you write up a small "help" for your users that explained how it worked?

The reason I bring this up is that while we're working hard to make sure most of the things your users are used to on Ning have a similar function in JR, there is also the aspect that Jamroom is NOT Ning, and therefore there is going to be some help and education needed when moving to JR.

One thing that is important to us with JR is to try and stay "low level" enough that the core and modules work well regardless of the type of site or targeted audience, which means hard choices have to be made about what goes IN to a JR module versus what goes in to a JR skin. Adding things to jrNingja (or any skin) is awesome - we want to that to be as close to Ning as we can make it, but modifying a module template is a trickier decision, as we have to consider everyone else who is using that module for something entirely different than a Ning style site. Many, many of the changes we've made due to Ning users feedback have been great, and we've made sure those are integrated as quickly as we can, but on something like this it may end up just being "this is how you modify the template to suit your needs". Hopefully that makes sense.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
tOTALLY UNDERSTOOD! (oops sorry caps)
Yes great to make the Ningja SKIN much like Ning...and I get it also that the MODULES are different because ALL JR customers use them.
I would love to tweak my own Comment module to show a "comment back" link as is used in Ning (not just have the person's avatar be a hotlink to their profile page).
I have no problem doing this.
I tried SE's code but it screws up my profile pages in many weird little ways, so I took it out.

Ok, well back to drawing 260 pages of chemical graphs for the rest of the evening. funfunfun!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
soaringeagle
@soaringeagle
10 years ago
3,304 posts
did u try copy and replace the entire code block
the only way it can possibly screw your profile up is if it was put in the wrong locaation so if u copy the whole code and replace its impossible to make an error

make sure that the modules up to date 1st then copy paste my code over the existing code
if u leave out any of the css then al it can do is add a link

if u copy paste your code here ill spot yoirt error
i think u put it inside the span


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
I did not make an error. Thanks


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Add this:

<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>

Right after this part in your User Comments item_list.tpl file:

{if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
    {$item.comment_text|jrCore_format_string:$item.profile_quota_id}
{else}
    {$item.comment_text|jrCore_format_string:$item.profile_quota_id:null:"html"}
{/if}
.. put it here ...

And adjust it to suit your needs - that should link up to their profile comment form.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
That works perfectly! Looks perfect. Ahhhhh...thank you!

The only difference is that on Ning you can 'comment back' only on the comment wall posts on your OWN profile page. The code you gave seems to enable any member to 'comment back' from any other person's profile page comment wall as well. This might lead to a little bit of random 'peanut gallery' comments from 3rd party page readers, but I can live with that if it's a necessary part of it.
It's wonderful to have this now!

Seems like such a simple little line of code- one day I swear I will understand this stuff and not be such a burden!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
That works perfectly! Looks perfect. Ahhhhh...thank you!

The only difference is that on Ning you can 'comment back' only on the comment wall posts on your OWN profile page. The code you gave seems to enable any member to 'comment back' from any other person's profile page comment wall as well. This might lead to a little bit of random 'peanut gallery' comments from 3rd party page readers, but I can live with that if it's a necessary part of it.
It's wonderful to have this now!

Seems like such a simple little line of code- one day I swear I will understand this stuff and not be such a burden!

If you want it to only appear on the profile's home page comments - change it to this:

{if strlen($_post.option) === 0}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}

There is no "option" if you're viewing the profile index.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
isnt that too many === shouldnt it be ==


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
Something's not quite right- I'm still seeing the "comment back" links on other people's profile pages- both with using ===, and ==.

"There is no "option" if you're viewing the profile index." -- hmm, I hope that's not important because i don't know what it means. =8-*



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/19/15 03:25:39PM
soaringeagle
@soaringeagle
10 years ago
3,304 posts
im still seeing it too i believe the code should be something didferent like {if $user_id=profile_id && $user_login == true}
but i am just taking a wild guess i dont know the code and i can tery to figure it out but thats sorta the logic

u want to see 1
if the users on his own profile and 2 is logged in
then and only then show the comment back


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
michael
@michael
10 years ago
7,778 posts
equals sign explained

{$foo = "bar"}

Is an assignment. You are assigning $foo the value "bar". So using {$foo} after that will output "bar".

{if $foo == "bar"}

Is a check. Its checking, "Is the value of $foo, 'bar'".

{if $foo === "bar"}

Is an explicit check. Its almost the same as the double == but is more strict. for things like 0. zero can also mean false or empty so with double equals $foo == 0 and $foo == '' and $foo == false are all the same. But with 3 equals signs, they are all different. $foo === 0 and it HAS to be 0, not '' or 'false'.

Its just a more strict check.
soaringeagle
@soaringeagle
10 years ago
3,304 posts
oh yikes i see that caused some weirdness on my site corection the codes gotta go inside the span


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
10 years ago
3,304 posts
yea the wauy i hadit it was on all comments everywhere i thought i was so smart lol didnt check

this limits it to profiles

but what is really desired is
limited to profiles and limited to your own profile and only when logged on


see the purpose is just so you can quickly comment back to the person that commented on your profile as aconversation

ning also had a 'view cconversation historyt" link that woukd combine all thevbavck and forths between 2 users into 1 list but ..i agree with you 100% on not overcomplicxating things

ning built in too much that made it highly unstable
jr is elegently flexible whikle brillianntly simple enough to keep it stable

(that is if someone can please help me with my pages issue wich is kinda an emergerncy)


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
brian:
Strumelia:
The only difference is that on Ning you can 'comment back' only on the comment wall posts on your OWN profile page. The code you gave seems to enable any member to 'comment back' from any other person's profile page comment wall as well. This might lead to a little bit of random 'peanut gallery' comments from 3rd party page readers, but I can live with that if it's a necessary part of it.

If you want it to only appear on the profile's home page comments - change it to this:
{if strlen($_post.option) === 0}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}
There is no "option" if you're viewing the profile index.

@Brian -Ok, so I did make this change ...but am still seeing the "comment back" on all members profile page comment walls, in addition to my own comment wall. ?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
soaringeagle
@soaringeagle
10 years ago
3,304 posts
yea see my comment above im so swamped but if ui got a momment ill try to figure it out later im also going to add a like disslike on comments
something we always wished we had


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
I just want to know from BRIAN how to adjust the 2nd code HE gave us for having his CommentBack link only show on our own profile page comment walls. I have both his codes applied but it is still showing up on all profile pages.

Brian, please...?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
You could try checking to see if you are the profile owner using jrProfile_is_profile_owner($_profile_id)
{if strlen($_post.option) === 0 && jrProfile_is_profile_owner($_profile_id)}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
10 years ago
10,148 posts
Strumelia:
I just want to know from BRIAN how to adjust the 2nd code HE gave us for having his CommentBack link only show on our own profile page comment walls. I have both his codes applied but it is still showing up on all profile pages.

Brian, please...?

I've just tested my solution above locally here and it is working correctly, so I'm not sure what to recommend...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
SteveX:
You could try checking to see if you are the profile owner using jrProfile_is_profile_owner($_profile_id)
{if strlen($_post.option) === 0 && jrProfile_is_profile_owner($_profile_id)}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}

Thank you- I tied that, and it removed the "comment Back" link from all profile page comment walls, including my own, when I was logged in.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
Here is my whole module code with Brian's code applied:
{jrCore_module_url module="jrComment" assign="murl"}
{foreach from=$_items item="item"}
<div id="cm{$item._item_id}" class="item">

    <div class="container">
        <div class="row">
            <div class="col1">
                <div class="block_image p5">
                    {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$item._user_id size="small" alt=$item.user_name class="action_item_user_img iloutline img_scale"}
                </div>
            </div>
            <div class="col10">
                <div class="p5" style="margin-left:18px">
                    <a name="c{$item._item_id}"></a>
                    <span class="info" style="display:inline-block;">{$item._created|jrCore_date_format} <a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a>:</span><br>
                    <span class="normal">
                    {if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id}
                    {else}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id:null:"html"}
                    {/if}
                    {if strlen($_post.option) === 0}
						<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
					{/if}
                    </span>
                </div>
            </div>
            <div class="col1 last">
                <div id="bc{$item._item_id}" class="block_config" style="display:none">
                    <script>$(function () { $('#cm{$item._item_id}').hover(function() { $('#bc{$item._item_id}').toggle(); }); });</script>
                    {if $_params.profile_owner_id > 0}
                        {* profile owners can delete comments *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                    {else}
                        {* site admins and comment owners see this button *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                    {/if}
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>

</div>
{/foreach}

...what that is giving me is on my profile page in my own comment wall i get nice "Comment Back" links under each commment, and if I click on them it brings me nicely to that other member's textbox in THEIR p[rofile page comment wall...just what you want! However, I get the "Comment Back" links when I look at everyone's profile page comment walls as well. Kind of a weird power to give everyone.

I tried SteveX's code (thanks!), but that made the commentback links disappear from everyone's walls -including my own.
Yes i did cache/integrity etc. I also double checked by signing in as a regular member too.
Maybe my module is not the same as the default Comments module somewhow? My complete code is above.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
So you only want the "Comment Back" to appear to the profile owner? SteveX's is right on:

{if strlen($_post.option) === 0 && jrProfile_is_profile_owner($_profile_id)}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}



--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
I just applied Steve's for the 2nd time, and same result= all comment back links are gone from everyone's profile pages, even my own.

So with one code I get the CB link on everyone's pages, and with the other code I get it on no one's. I just want the links to appear on my own (or whatever logged in member's) profile page comment wall. I should nt be able to see it on other people's pages.
Sorry to be such a pain, but it feels so close to solved!

So right now I still have Steve's applied, and I have no comment back links at all anymore, on my own or anyone else's pages:
{jrCore_module_url module="jrComment" assign="murl"}
{foreach from=$_items item="item"}
<div id="cm{$item._item_id}" class="item">

    <div class="container">
        <div class="row">
            <div class="col1">
                <div class="block_image p5">
                    {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$item._user_id size="small" alt=$item.user_name class="action_item_user_img iloutline img_scale"}
                </div>
            </div>
            <div class="col10">
                <div class="p5" style="margin-left:18px">
                    <a name="c{$item._item_id}"></a>
                    <span class="info" style="display:inline-block;">{$item._created|jrCore_date_format} <a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a>:</span><br>
                    <span class="normal">
                    {if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id}
                    {else}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id:null:"html"}
                    {/if}
                    {if strlen($_post.option) === 0 && jrProfile_is_profile_owner($_profile_id)}
						<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
					{/if}
                    </span>
                </div>
            </div>
            <div class="col1 last">
                <div id="bc{$item._item_id}" class="block_config" style="display:none">
                    <script>$(function () { $('#cm{$item._item_id}').hover(function() { $('#bc{$item._item_id}').toggle(); }); });</script>
                    {if $_params.profile_owner_id > 0}
                        {* profile owners can delete comments *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                    {else}
                        {* site admins and comment owners see this button *}
                        {jrCore_item_delete_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                    {/if}
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>

</div>
{/foreach}



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Sorry should be:

{if strlen($_post.option) === 0 && jrProfile_is_profile_owner($_params.profile_owner_id)}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}

Let me know if that works.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
Brian, that makes it show up on mine and everyone else's profile comment walls for me again.
The member who is signed in should be seeing the links only on their own profile page comment wall comments.
Thanks, hope we can get this puzzle solved, or else this whole thread is kinda useless. =8-*


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
Brian, that makes it show up on mine and everyone else's profile comment walls for me again.
The member who is signed in should be seeing the links only on their own profile page comment wall comments.
Thanks, hope we can get this puzzle solved, or else this whole thread is kinda useless. =8-*

I'm not at my development system so I cannot recommend anything further - I will have to look at this when I can.

Sorry!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
Ok I will wait. Thank you.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
OK just tested this here and I think this is what we want:

{if strlen($_post.option) === 0 && jrProfile_is_profile_owner($item.comment_profile_id)}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}

Let me know if that works.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
Brian, that works way better!

If I am logged in as a regular member, it works PERFECTLY- I can see the commentback links on my own profile page comment wall, but not on other people's walls...plus the link takes me to the exact right place.
But there's a quirk: if i'm logged in as myself (admin quota, or maybe just because i'm master admin), then I see the links on every member's comment wall, no matter whose profile page Im looking at.

But hey- I can live with that and am perfectly happy to do so! The only thing is that if someone in the future uses the code they may not realize because they are testing it while signed on as admin. Just gotta remember that, to test it while signed on as a regular member quota.

Doing the happy dance, and thank you!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
Brian, that works way better!

If I am logged in as a regular member, it works PERFECTLY- I can see the commentback links on my own profile page comment wall, but not on other people's walls...plus the link takes me to the exact right place.
But there's a quirk: if i'm logged in as myself (admin quota, or maybe just because i'm master admin), then I see the links on every member's comment wall, no matter whose profile page Im looking at.

Yeah that's because as an admin user you are actually an "owner" of every profile on the system. One other things we could try is this:

{if strlen($_post.option) === 0 && jrUser_is_logged_in() && jrUser_get_profile_home_key('_profile_id') == $item.comment_profile_id}
<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
{/if}

That should limit it to only showing for the actual "home" profile owner.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
BINGO!!!!

Yaaaaay!!! That does it ALL, to perfection.

AWESOME, thank you for spending so much time on this little nicety for us, Brian. :)

"Yeah that's because as an admin user you are actually an "owner" of every profile on the system." -wow, definition of Goddess !


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
Brian and Strumelia -

I am late to this discussion as I have had my hands full elsewhere.

Exactly where on the page does the Comment Back appear, and where in the code do I want to insert it to make it appear there?

TIA.
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
first, here is what it will look like, on the logged in member's own profile page comment wall...
commentback.jpg
commentback.jpg  •  348KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/21/15 09:04:48PM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
So- go to your User Comments module. Go into the item_list template to modify.
Do you see here in my code (in the actula template it's near line 20) where I have added Brian's LAST posted "{if} to {/if} code? (don't use all the previously posted codes, just Brian's last code!)
See I have added it AFTER the "null...html...{/if }, but BEFORE that /span :

<span class="info" style="display:inline-block;">{$item._created|jrCore_date_format} <a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a>:</span><br>
                    <span class="normal">
                    {if isset($_conf.jrComment_editor) && $_conf.jrComment_editor == 'on'}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id}
                    {else}
                        {$item.comment_text|jrCore_format_string:$item.profile_quota_id:null:"html"}
                    {/if}
                    {if strlen($_post.option) === 0 && jrUser_is_logged_in() && jrUser_get_profile_home_key('_profile_id') == $item.comment_profile_id}
						<br><a href="{$jamroom_url}/{$item.profile_url}#cform">Comment Back</a>
					{/if}
                    </span>



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/21/15 09:14:33PM
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
THANKS! I will do this soon. Great feature.
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
I have now both a Comment back and Reply. Need to think about re-phrasing to reduce confusion.
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
That's odd. I don't have a "reply" in my profile page Comment Wall posts. Are you referring to forums, or the profile comment wall?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
Profile comment wall. Did you install the user comments module update? I did. Might be in there.
brian
@brian
10 years ago
10,148 posts
You will see "Reply" if you have enabled comment threading, which is available in the latest User Comments module update.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
I thought it was a new feature. BTW, there may be a bug in the sort ordering when threading is enabled.

I mentioned it to Paul here:
https://www.jamroom.net/the-jamroom-network/forum/ning-to-jamroom/22423/profile-page-change-sort-order-of-comments

Enabling threading appears to invert the sort order, displaying oldest comments first when order by Newest is selected.
brian
@brian
10 years ago
10,148 posts
thechocolatelife:
I thought it was a new feature. BTW, there may be a bug in the sort ordering when threading is enabled.

I mentioned it to Paul here:
https://www.jamroom.net/the-jamroom-network/forum/ning-to-jamroom/22423/profile-page-change-sort-order-of-comments

Enabling threading appears to invert the sort order, displaying oldest comments first when order by Newest is selected.

I tested pretty thoroughly, so it should be good. I just tested the Sort Order here and don't see any problems. Is it a specific page you see it on?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
So, if i understand right:
enabling "reply" in your comment module means you will be replying to the person's comment on your wall in the same location- right under their comment in a threaded manner, in your comment wall.
Whereas using "Comment Back" will take you to the other person's comment wall on THEIR profile page, to a new textbox where you can reply to them on THEIR commment wall (doing this can then notify them that someone has left a comment on their profile, which is the advantage over responding to them in your own comment wall).


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
10 years ago
10,148 posts
Strumelia:
So, if i understand right:
enabling "reply" in your comment module means you will be replying to the person's comment on your wall in the same location- right under their comment in a threaded manner, in your comment wall.

Exactly. One important thing to know though is that if you are using the "editor" in your comments (which I am sure you are), the user will be scrolled down to the bottom where they enter their comment (if you're not using the editor your comment textarea goes right there inline). This is because the WYSIWYG editor cannot be moved around the page once it has been displayed without breaking. So just an FYI.

Quote:
Whereas using "Comment Back" will take you to the other person's comment wall on THEIR profile page, to a new textbox where you can reply to them on THEIR commment wall (doing this can then notify them that someone has left a comment on their profile, which is the advantage over responding to them in your own comment wall).

Yes...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 01/22/15 01:48:11PM
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
brian:
thechocolatelife:
I thought it was a new feature. BTW, there may be a bug in the sort ordering when threading is enabled.

I mentioned it to Paul here:
https://www.jamroom.net/the-jamroom-network/forum/ning-to-jamroom/22423/profile-page-change-sort-order-of-comments

Enabling threading appears to invert the sort order, displaying oldest comments first when order by Newest is selected.

I tested pretty thoroughly, so it should be good. I just tested the Sort Order here and don't see any problems. Is it a specific page you see it on?

Brian - it's on my Profile comments page.

In the User comments module, setting the sort order to newest works - as long as threading is not enabled. At least for me. I don't think I did anything in the template code to make it break, which is why I originally asked this question.
brian
@brian
10 years ago
10,148 posts
Have just tested here and am not seeing any issues:

http://demo.jamroom.net/jrNingja/demoadmin

I switched it from newest first / oldest first and it is working...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
It messes up on my system.

I think you have my login credentials if you want to test it there for yourself. Attached is a screenshot.
updated by @claygordon: 01/22/15 04:38:50PM

Tags