Forum Activity for @michael

michael
@michael
08/16/17 09:55:55PM
7,826 posts

Adding custom attributes to comments


Jamroom Developers

OH! if thats the intention then I would do it differently.

Listen for the delete comment action and don't delete it. just remove the contents and leave the comment there. "this comment has been deleted"

Add a flag to it 'comment_deleted' = 1. (and maybe move it to a different holding profile too in-case the profile gets deleted.)
michael
@michael
08/16/17 08:51:15PM
7,826 posts

Adding custom attributes to comments


Jamroom Developers

I usually play round with concepts to find one that works in code, then start thinking about how efficient its going to be once I have something that works.

My first thought for "How do I retrieve the number of children this comment has" is caching. Run a query to search whenever the parent comment is shown to get the number of children, then store that in the cache. When a new comment is added as a child, reset the cache for that parent.

WHY: because it means the count will always be correct and I don't need to think about things like comments being deleted and updating counts.

I can see that you might want to run queries against that number though, so if you're needing to get "Get me all the parent nodes who have more than X children" then running a sub-query for this might be slow, so storing the info might be better. In which case I would probably look to storing it on the comment itself 'comment_children_nodes' as a number. That would make it easy to look up in the datastore, you'd just need to keep that up-to-date each time a comment was added.

If that's the way you go, put a listener into the 'integrity check' that re-counts the counts when the integrity check is run so that if the counts do get out of sync with the actual comment count there is a way to get them back to correct.

Docs: "Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1011/events-and-listeners

maybe the 'repair_module' listener:
    jrCore_register_event_listener('jrCore', 'repair_module', 'YOUR-MODULE_repair_module_listener');
michael
@michael
08/16/17 08:06:00PM
7,826 posts

Receiving a error message when creating gallery image


Jamroom Developers

Im unclear as to where the problem is, is it at the upload phase for the photos or the save phase for the image gallery.
michael
@michael
08/16/17 06:35:49PM
7,826 posts

Moving the up button


Using Jamroom

code not showing, here is how to make it show.
code.jpg code.jpg - 88KB

updated by @michael: 08/16/17 06:36:52PM
michael
@michael
08/16/17 06:32:52PM
7,826 posts

Receiving a error message when creating gallery image


Jamroom Developers

Wonder why.....

When you try again does it work? ( connectivity perhaps )
Is it consistently reproducible? ( bug in the jamroom system, or something to do with your site )

Not seeing any issues here. Got some login details that I can try on your site and see if I can upload it from here?
michael
@michael
08/16/17 06:29:10PM
7,826 posts

Adding custom attributes to comments


Jamroom Developers

the jrTags module might be useful to look at, it injects stuff into other modules datastores. It will save the tags for an audio file of jrAudio directly to that modules datastore.

useful for reference maybe.
michael
@michael
08/16/17 06:22:47PM
7,826 posts

Translating great grand


Genosis

The function that prints that information is found in the profile_header.tpl file.

Docs: "Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor

Adjust line 176 which currently reads
 {jrGenCore_get_viewer_relation profile_id=$_profile_id assign="out"}

make that not work by "commenting it out", which just means turn that section into a comment in the code rather than running the actual code. We leave comments in the code by surrounding them with {* this is just a comment *}. so change it to:
{* {jrGenCore_get_viewer_relation profile_id=$_profile_id assign="out"} *}
SAVE CHANGES then activate the template and it will be gone.

Need to think about the language thing......mmm.

--edit--
ah, sorry, the template is found at:
ACP -> SKINS -> GENERAL -> GENOSIS FAMILY TREE -> TEMPLATES -> profile_header.tpl -> MODIFY
updated by @michael: 08/16/17 06:24:01PM
michael
@michael
08/16/17 12:26:43AM
7,826 posts

How do I change a form?


Genosis

That makes sense. We'll get something in place to make that possible.
michael
@michael
08/15/17 11:23:56PM
7,826 posts

Audio files path


Installation and Configuration

Don't link to that directory from any web url though, if you want a file for some mobile device or other use a php file to retrieve it, check the user is allowed access, then deliver it from there.
michael
@michael
08/15/17 11:19:16PM
7,826 posts

Adding custom attributes to comments


Jamroom Developers

Threading is already an option of the jrComments module.
ACP -> MODULES -> ITEM FEATURES -> COMMENTS -> GLOBAL CONFIG -> LIST OPTIONS -> ENABLE THREADING

In answer to the question though: You can add anything you like to any items datastore, but it must be prefixed with the modules prefix. For the comments module, that's 'comment_'.

You can add any extra fields you like to an item, they're just stored as KEY : VALUE pairs that become available in the templates along with the rest of the items info.
threading.jpg threading.jpg - 235KB
  196