Forum Activity for @ultrajam

SteveX
@ultrajam
04/21/21 01:19:42PM
2,584 posts

Like


Suggestions

Reading through the forum I keep reaching for the Like button although I know it's not there. I guess I've got used to being social on Teams and Slack over the past year.

There is so much to just "Like" in the Jamroom forums.
updated by @ultrajam: 07/21/21 03:59:36PM
SteveX
@ultrajam
10/28/20 01:59:30PM
2,584 posts

How does Webshot module (in the JR Core) work and what is it for?


Using Jamroom

I strongly doubt that you have any need for it.

I haven't used this module for some time, so it is very possible that it no longer works as intended.
SteveX
@ultrajam
06/16/20 09:20:21AM
2,584 posts

livesearch field id has changed


Jamroom Developers

Yes, that works great!

Thanks Michael and Brian!
SteveX
@ultrajam
06/15/20 04:17:48AM
2,584 posts

livesearch field id has changed


Jamroom Developers

No, not when I look at the source, there is only this:
<input type="text" id="ls9ce955df2024e04d2cecf51dadbc70ba" class="form_text" name="ls9ce955df2024e04d2cecf51dadbc70ba" value="SteveX" tabindex="2" onfocus="if($(this).val() == 'search'){ $(this).val('').removeClass('live_search_text'); }">
SteveX
@ultrajam
06/15/20 04:07:12AM
2,584 posts

livesearch field id has changed


Jamroom Developers

.live_search_text doesn't appear in my html
updated by @ultrajam: 06/15/20 04:09:46AM
SteveX
@ultrajam
06/15/20 03:32:00AM
2,584 posts

livesearch field id has changed


Jamroom Developers

A jQuery one:
$("#mymod_profile_livesearch_value").on( "change", function() {
SteveX
@ultrajam
06/15/20 03:00:52AM
2,584 posts

livesearch field id has changed


Jamroom Developers

Hi Michael, the field used to have the id mymod_profile and the hidden field used to be mymod_profile_livesearch_value, but now the field is ls8098794ccd5cc6954208a17efdfed1c0, an md5 of the form token.

It's the hidden field change which is listened for, it changes after the user has made their selection.

This is what I see in the form html:

<input type="text" id="ls8098794ccd5cc6954208a17efdfed1c0" class="form_text" name="ls8098794ccd5cc6954208a17efdfed1c0" value="SteveX" tabindex="2" onfocus="if($(this).val() == 'search'){ $(this).val('').removeClass('live_search_text'); }" autocomplete="off">

<input type="hidden" id="ls8098794ccd5cc6954208a17efdfed1c0_livesearch_value" name="ls8098794ccd5cc6954208a17efdfed1c0_livesearch_value" value="">
SteveX
@ultrajam
06/14/20 04:35:53AM
2,584 posts

livesearch field id has changed


Jamroom Developers

Hi Jamroom Team! I hope you are all safe and well.

I am looking at some custom modules which use live search fields, they are no longer working properly.

A live_search field no longer uses the field name in the id, it's an md5 hash of the form token instead.

I have javascript listeners which use that id to listen for changes to the livesearch_value hidden field. The js is added to the form page javascript_ready_function.

In the form view function, how do I get the field's id or the form token to use in the js?

Thanks
updated by @ultrajam: 09/15/20 12:48:35AM
SteveX
@ultrajam
03/13/19 02:42:41PM
2,584 posts

New Custom Account Tab


Jamroom Developers

So this is the function
/**
 * Updates an Item in a module datastore
 * @param string $module Module the DataStore belongs to
 * @param int $id Unique ID to update
 * @param array $_data Array of Key => Value pairs for insertion
 * @param array $_core Array of Key => Value pairs for insertion - skips jrCore_db_get_allowed_item_keys()
 * @return bool true on success, false on error
 */
function jrCore_db_update_item($module, $id, $_data = null, $_core = null){
    $func = jrCore_get_active_datastore_function($module, 'db_update_item');
    return $func($module, $id, $_data, $_core);
}
So it needs to be passed the parameters in this order - the module name (which you have), then the item id, then the data array.

You pass in the data array instead of the item id. Do you have the item_id in your fdebug? If so, try jrCore_db_update_item('myCustomModule', $_data['item_id'], $_data);
SteveX
@ultrajam
03/12/19 02:34:09AM
2,584 posts

New Custom Account Tab


Jamroom Developers

Use fdebug to write variables to the log.
fdebug($_post);
    $_data = jrCore_form_get_save_data('myCustomModule', 'settings', $_post);
fdebug($_data);
  3