Forum Activity for @michael

michael
@michael
01/25/24 10:03:46PM
7,646 posts

Seamless Module not working with site builder - Item List (Combined) Widget


Using Jamroom

what are the parameters you've set it to. I can't reproduce the problem.

Are there any errors created in the error log or the activity log when the white screen appears?

The search conditions only being available on edit is probably a condition of the module. I recon it probably needs to know which modules are in use to determine which search conditions are compatible with all of the chosen modules and its not going to know that before the modules have been chosen.
2024-01-26_15-00.jpg 2024-01-26_15-00.jpg - 95KB
michael
@michael
01/23/24 01:12:44AM
7,646 posts

Graphs in Jamroom


Design and Skin Customization

Here's the example from the "Daily Active Users" graph:
In the _init() function
    // Graph Support
    $_tmp = array(
        'title'    => 'Daily Active Users',
        'function' => 'jrUser_graph_daily_active_users',
        'group'    => 'admin'
    );
    jrCore_register_module_feature('jrGraph', 'graph_config', 'jrUser', 'daily_active_users', $_tmp);
The title and the function are defined.

Then the structure for the data set is setup in that function:
 * Daily Active Users
 * @param $module string Module
 * @param $name string Name of Graph to create
 * @param $_args array Passed in Parameters
 * @return array
 */
function jrUser_graph_daily_active_users($module, $name, $_args)
{ $dys = (int) $_args['days']; $old = (time() - ($dys * 86400)); $old = jrCore_format_time($old, false, '%Y%m%d'); return array( '_sets' => array( 0 => array( 'label' => "Daily Active Users", 'date_format' => '%m/%d/%Y', 'minTickSize' => "[1, 'day']", 'type' => 'line', 'pointRadius' => 3, '_data' => jrCore_get_graph_stat_values('jrUser', 'active_users', 'daily', $old) ) ) ); }


Then it can be turned on in the dashboard.

The graphing module is Flot, its docs are here
http://www.flotcharts.org/
daily.jpg daily.jpg - 23KB
michael
@michael
01/21/24 05:45:16PM
7,646 posts

PHP fatal error


Jamroom Hosting

are you using an over-ridden search template:
/var/www/dubwise.info/html/data/cache/jrElastic2/jrSearch_search_results_tpl

is there a file at /skins/jrElastic2//jrSearch_search_results.tpl ?

If you are then look for somewhere in there that has a line like this:
 {if count($results) > 0}
and change it to:
 {if is_array($results) && count($results) > 0}

That change already exists in the base file that I think you have over-ridden. The base file is found at:
/modules/jrSearch/templates/search_results.tpl

It could also be that you have it over-ridden via the templates editor so check at:
ACP -> SKINS -> ELASTIC2 -> TEMPLATES
override.jpg override.jpg - 607KB
michael
@michael
01/17/24 01:33:13AM
7,646 posts

Paged list of filtered users


Jamroom Developers

Then the table pager goes something like this:

$_users = get_tigs_users();
$pagebreak = jrCore_get_pager_rows();
$page = 1;
if (isset($_post['p']) && jrCore_checktype($_post['p'], 'number_nz')) {
    $page = (int) $_post['p'];
}
$tcn  = count($_users);
$_usr = array_slice($_users, (($page - 1) * $pagebreak), $pagebreak, true);

$dat = array();
$dat[1]['title'] = 'User name';
jrCore_page_table_header($dat);

foreach ($_usr as $_us) {
    $dat             = array();
    $dat[1]['title'] = $_us['user_name'];
    // how ever many cols here.....
    
    jrCore_page_table_row($dat);
}
$tpg = ceil($tcn / $pagebreak);
$_pg = array(
    'info' => array(
        'this_page'   => $page,
        'prev_page'   => ($page > 1) ? ($page - 1) : 0,
        'next_page'   => ($tpg > $page) ? ($page + 1) : 0,
        'total_pages' => $tpg
    )
);
jrCore_page_table_pager($_pg);

updated by @michael: 01/17/24 01:36:11AM
michael
@michael
01/17/24 01:28:27AM
7,646 posts

Paged list of filtered users


Jamroom Developers

get all the users using a while, add in caching or sleep if you like:
function get_tigs_users(){
    $iid  = 0;
    $_tmp = array();
    while (true) {
        $_sp = array(
            'search'          => array(
                "_item_id > {$iid}"
            ),
            'order_by'        => array('_item_id' => 'asc'),
            'return_keys'     => array('user_name', 'user_whatever', 'user_group'),
            'skip_all_checks' => true,
            'limit'           => 500
        );
        $_sp = jrCore_db_search_items('jrUser', $_sp);
        if ($_sp && is_array($_sp) && !empty($_sp['_items']) && count($_sp['_items']) > 0) {
            foreach ($_sp['_items'] as $u) {

                $iid = $u['_item_id'];

                // Exclude admin and master users
                if (empty($u['user_group']) || $u['user_group'] != 'user') {
                    continue;
                }

                // Exclude empty users
                if (isset($u['user_blocked']) && $u['user_blocked'] == 1) {
                    continue;
                }
                $_tmp[] = $u;
            }
        }
        else {
            break;
        }
    }
    return $_tmp;
}
michael
@michael
01/17/24 01:20:07AM
7,646 posts

Paged list of filtered users


Jamroom Developers

Yeah it would. That 'user_blocked != 1' is only going to be there on blocked users not all users. To avoid having to add it to all users and set it to 0 so that the search works, the first way I would look to do it is get all the users back in not paginated format using a while(true){} structure to get chunks of users at a time if you expected there to be a ton of results.

That would get the full unpaginated data set to work with then use a foreach loop to filter out the matching blocked !=1 users until you've got it down to just the user set you want then construct the pagination manually.

I'll try to find an example. back soon.
michael
@michael
01/15/24 02:53:41PM
7,646 posts

Soundcloud


Installation and Configuration

yeah its been like that for a while, feels like years. There's some discussion threads in the forums if you wanted to read.

Think it came down to something like: soundcloud wasn't making enough money, shut down api access with a plan to make a paid api. something like that.
michael
@michael
01/15/24 02:49:44PM
7,646 posts

PHP fatal error


Jamroom Hosting

We'll get that fixed. Probably a php 'improvement'. I think count() used to return 0 when given null.

thanks
michael
@michael
01/09/24 02:59:15PM
7,646 posts

MAMP Setup


Jamroom Developers

Not sure what MAMP is but the error is correct "you have entered an invalid or reserved User Name". 'admin' is only allowed for the very first account. Try a different user name.
  2