Forum Activity for @paul

paul
@paul
02/21/14 06:06:47AM
4,335 posts

How To Custom Profile URL, Form Designer Not Working


Design and Skin Customization

He would have to change his name to DaftPunk then.
Profile urls are inherently derived from the profile name and I think JR would break if would made them something different.
hth
Pa
paul
@paul
02/21/14 06:03:07AM
4,335 posts

Need Profile Variables For These Queries, Please


Design and Skin Customization

Put a {debug} in your template where you need these to see what you have got (look for fields ending with _count) but I think you're going to need something custom for most of them.
Pa
paul
@paul
02/21/14 01:43:23AM
4,335 posts

Argh. White page. How do I reset cache from the db side?


Design and Skin Customization

Try truncating/emptying the jr_jrcore_cache table
paul
@paul
02/20/14 01:54:44AM
4,335 posts

Admin blogs not showing on Blog/News page


Installation and Configuration

Which skin are you using?
You might have to put a profile_id=1 in the jrCore_list somewhere.
paul
@paul
02/18/14 11:41:03PM
4,335 posts

here's a first


Off Topic

No problem for me to get to London for a day.
paul
@paul
02/18/14 10:53:28PM
4,335 posts

here's a first


Off Topic

A beer and a bike ride together in the UK sounds good.
paul
@paul
02/18/14 02:11:04PM
4,335 posts

here's a first


Off Topic

I think Michael being in NZ atm has done the trick.
You'll have to stay there Michael ;-)
paul
@paul
02/17/14 07:06:08AM
4,335 posts

SOLVED - Hide or Delete past events


Design and Skin Customization

Yeah - this will run once a day, after midnight.
Make the the module is enabled.
NOTE - This code is untested. I don't want to be responsible for something going wrong and all your events being deleted (or worst) !!!
Initially I'd debug it by commenting out the actual delete call and writing event info to the activity log, just to be sure that it will delete the correct events -

<?php

// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * meta
 */
function prDeletePastEvents_meta()
{
    $_tmp = array(
        'name' => 'Delete Past Events',
        'url' => 'deletepastevents',
        'version' => '1.0.0',
        'developer' => '@paul, ©' . strftime('%Y'),
        'description' => 'Listens for the "daily" event then deletes all jrEvent items that are past',
        'category' => 'PBP Custom Modules'
    );
    return $_tmp;
}

/**
 * init
 */
function prDeletePastEvents_init()
{
    jrCore_register_event_listener('jrCore','daily_maintenance','prDeletePastEvents_listener');

    return true;
}

//---------------------------------------------------------
// EVENT LISTENERS
//---------------------------------------------------------

/**
 * @param $_data array incoming data array
 * @param $_user array current user info
 * @param $_conf array Global config
 * @param $_args array additional info about the module
 * @param $event string Event Trigger name
 * @return array
 */
function prDeletePastEvents_listener($_data, $_user, $_conf, $_args, $event)
{
// Is there a jrEvent module?
    if (jrCore_module_is_active('jrEvent')) {
        // Get all past events
        $time = time() - 86400;
        $_s = array(
            "search" => array (
                "event_date < {$time}"
            ),
            "limit" => 1000,
            'exclude_jrProfile_keys' => true,
            'exclude_jrProfile_quota_keys' => true
        );
        $_rt = jrCore_db_search_items('jrEvent',$_s);
        if (isset($_rt) && is_array($_rt)) {
            // Delete them
            $ctr = 0;
            foreach ($_rt as $rt) {
                $edate = date('d M Y',$rt['event_date']);
                jrCore_logger('INF',"Event {$edate} - {$rt['event_title']} will be deleted");
//                jrCore_db_delete_item('jrEvent',$rt['_item_id']);
                $ctr++;
            }
            jrCore_logger('INF',"{$ctr} past jrEvent items deleted");
        }
    }
    return $_data;
}

Note also that I subtracted a day from the search time so that events in different time zones will not be deleted prematurely.
  412