Forum Activity for @paul

paul
@paul
02/20/14 10:34:26AM
4,335 posts

Business Communication Portal with jr5


Discussions

From what you describe, I'd say yes, the JR5 Core could do all that with the addition of a couple of custom modules, and it would be a perfect example of Jamroom not being just for music sites.
I think that to take this further you need to sit down and write a detailed spec. of exactly what you need to do, forms required, customer/management interaction etc., then may run it past us so that we can advise you properly how to achieve what you want.
hth
Pa
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.
paul
@paul
02/17/14 06:51:39AM
4,335 posts

Marketplace Error on System


Installation and Configuration

Obvious first question - Is the Marketplace URL set correctly in Tools -> Marketplace Systems?
paul
@paul
02/17/14 06:50:02AM
4,335 posts

Jr Solo Skin Issue


Installation and Configuration

Have you configured the skin with the 'solo' profile etc?
paul
@paul
02/17/14 02:33:53AM
4,335 posts

SOLVED - Hide or Delete past events


Design and Skin Customization

MAD©:
How the hell do you do that sh#$ so fast? :D

Copy/Paste/Edit from other scraps of JR code ;-)
paul
@paul
02/17/14 02:10:04AM
4,335 posts

SOLVED - Hide or Delete past events


Design and Skin Customization

OK - A module with just an include.php file something like this -

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

/**
 * meta
 */
function xxDeletePastEvents_meta(){
    $_tmp = array(
        'name'        => 'Delete Past Events',
        'url'         => 'deletepastevents',
        'version'     => '1.0.0',
        'developer'   => 'Whoever, &copy;' . strftime('%Y'),
        'description' => 'Listens for the "daily" event then deletes all jrEvent items that are past',
        'category'    => 'site'
    );
    return $_tmp;
}

/**
 * init
 */
function xxDeletePastEvents_init(){
    jrCore_register_event_listener('jrCore','daily_maintenance','xxDeletePastEvents_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 xxDeletePastEvents_listener($_data,$_user,$_conf,$_args,$event)
{ // Is there a jrEvent module? if (jrCore_module_is_active('jrEvent')) { // Get all past events $time = time(); $_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) { jrCore_db_delete_item('jrEvent',$rt['_item_id']); $ctr++; } jrCore_logger('INF',"{$ctr} past jrEvent items deleted"); } } return $_data; }

updated by @paul: 02/17/14 09:50:26AM
  413