Forum Activity for @paul

paul
@paul
10/30/14 08:45:44AM
4,335 posts

jrCore_db_search_items parameter issue


Jamroom Developers

I've often run into the same issue!!
Basically, jrCore_db_search_items cannot test the state of items that are not on the datastore in the first place.
You'll need to somehow make sure that there is a profile_latitude field for all profiles, even if it's empty.
paul
@paul
10/29/14 06:01:40PM
4,335 posts

rotates phrases ,, good idea... :)


Using Jamroom

Try this -
function smarty_function_blRotate_rotate_phrases($params, &$smarty)
{
    global $_conf;
    
    $key = 'footer_powered_by';
    if ($footer = jrCore_is_cached('blRotate', $key)) {
        return $footer;
    }

    $_options = array(
        'Phrase 1',
        'Phrase 2',
        'Phrase 3',
        'Phrase 4',
        'etc.',
        'etc.',
        'etc.'
    );
    $_links = array(
        ‘http://link_to_Phrase1.com',
        'http://link_to_Phrase2.com',
        'http://link_to_Phrase3.com',
        'http://link_to_Phrase4.com',
        'etc.',
        'etc.',
        'etc.'
    );
    $k        = array_rand($_options);
    $option   = $_options[$k];
    $link     = $_links[$k];
    $footer   = '<span style="font-size:9px;"><a href="' . $link . '">' . $option . '</a></span>';

    jrCore_add_to_cache('jrCore', $key, $footer);
    return $footer;
}
paul
@paul
10/29/14 05:20:50PM
4,335 posts

rotates phrases ,, good idea... :)


Using Jamroom

Hold on - Wait to see if it works first. I've not actually tried the above code ;-)
paul
@paul
10/29/14 10:43:45AM
4,335 posts

rotates phrases ,, good idea... :)


Using Jamroom

Just create a /modules/blRotate/include.php file and put this in it -
<?php
/// make sure we are not being called directly
defined('APP_DIR') or exit();

function blRotate_meta()
{
    $_tmp = array(
        'name'        => 'Rotate Phrases',
        'url'         => 'rotate',
        'version'     => '0.0.1',
        'developer'   => 'BopLive' . strftime('%Y'),
        'description' => 'Prives a smarty function to rotate promotional phrases',
        'category'    => 'site',
        'license'     => 'mpl',
        'activate'    => true
    );
    return $_tmp;
}

function blRotate_init()
{
    return true;
}

function smarty_function_blRotate_rotate_phrases($params, &$smarty)
{
    global $_conf;
    
    $key = 'footer_powered_by';
    if ($footer = jrCore_is_cached('blRotate', $key)) {
        return $footer;
    }

    $_options = array(
        'Phrase 1',
        'Phrase 2',
        'Phrase 3',
        'Phrase 4',
        'etc.',
        'etc.',
        'etc.'
    );
    $k        = array_rand($_options);
    $option   = $_options[$k];
    $footer   = '<span style="font-size:9px;"><a href="' . $_conf['jrCore_base_url'] . '">' . $option . '</a></span>';

    jrCore_add_to_cache('jrCore', $key, $footer);
    return $footer;
}
Then put {blRotate_rotate_phrases} in the template where you want it to show.
hth
Pa
paul
@paul
10/28/14 12:46:39PM
4,335 posts

If on Profile Index


Jamroom Developers

I think {$jr_template} tells you what template you're in, so

{if $_profile_id == 4 && $jr_template == "profile_index.tpl"}

But if this code is in the profile_index.tpl template, will not the $jr_template test always be true anyway?
paul
@paul
10/27/14 10:31:21AM
4,335 posts

Player No Longer Opens as Pop Up


Using Jamroom

I think its a browser configuration that decides how a popup opens.
I know that in my browser there used to be popups but now it opens a new page (presumably this changed after an upgrade).
I've never been bothered enough to look for any browser setting to change it though - I' happy with the way it does it now !!!
paul
@paul
10/26/14 02:12:56PM
4,335 posts

multiple select live search


Jamroom Developers

You need to process the selected profiles in the form view's 'save' function into the format that you want them saving on the datastore. Are you doing that?
paul
@paul
10/26/14 11:03:25AM
4,335 posts

rotates phrases ,, good idea... :)


Using Jamroom

Good on ya ;-)
The module would just be the include.php file with its meta function, an empty init function (just "return true;") and the smarty function.
paul
@paul
10/26/14 09:55:27AM
4,335 posts

multiple select live search


Jamroom Developers

function yrModule_get_profiles()
{
    $_s = array(
        "order_by"    => array("profile_name" => "ASC"),
        "limit"       => 1000000,
        "return_keys" => array("_profile_id", "profile_name")
    );
    $_rt = jrCore_db_search_items('jrProfile', $_s);
    if (is_array($_rt['_items'])) {
        $_out = array();
        foreach ($_rt['_items'] as $rt) {
            $_out[$rt['_profile_id']] = $rt['profile_name'];
        }
        return $_out;
    }
    else {
        return false;
    }
}
paul
@paul
10/26/14 09:43:36AM
4,335 posts

Player progress bar


Using Jamroom

Quote:I'm not ready to post it publicly and you don't seem to have private notes enabled.
Send the link to support [at] jamroom [dot] net if you want and I'll try it here.
  376