Forum Activity for @elise

Elise
@elise
12/01/16 08:53:35AM
249 posts

How to use simple chat


Using Jamroom

PS: If you have a Community quota (like I do, enable the chat on that quota too!)
updated by @elise: 12/01/16 08:53:43AM
Elise
@elise
11/24/16 07:56:09AM
249 posts

Creating a module to change from the Follow model to the Friend model


Jamroom Developers

@paul I think we might also need the same logic to "unfollow" where it unfollows both sides when one side requests it. I'm having a member who is trying to unfriend someone but the other person still shows up as a profile she follows.
Elise
@elise
11/20/16 03:16:33PM
249 posts

AutoFollow for Forum


Using Jamroom

index.php

<?php
/**
 * @copyright 2016 Talldude Networks, LLC.
 */

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

//------------------------------
// auto_notify_save
//------------------------------
function view_jrAutoNotify($_post, &$_user, &$_conf)
{ jrUser_master_only(); jrCore_page_include_admin_menu(); jrCore_page_admin_tabs('jrAutoNotify'); jrCore_page_banner('Choose Auto Notificaton'); // Form init $_tmp = array( 'submit_value' => 'Set Notifications', 'cancel' => "{$_conf['jrCore_base_url']}/{$_post['module_url']}/admin/tools", 'submit_prompt' => 'Are you sure you want to set this Auto Notificaton?', 'submit_modal' => 'update', 'modal_width' => 800, 'modal_height' => 400, 'modal_note' => 'Please Wait' ); jrCore_form_create($_tmp); $_tmp = array( 'name' => 'dummy', 'value' => 'off', 'type' => 'hidden' ); jrCore_form_field_create($_tmp); jrCore_page_display(); }
Elise
@elise
11/20/16 03:15:44PM
249 posts

AutoFollow for Forum


Using Jamroom

config.php
 
<?php

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

/**
 * config
 */
function jrAutoNotify_config(){
    // Additional  Fields
    $_tmp = array(
        'name'     => 'category_id',
        'type'     => 'text',
        'default'  => '1',
        'validate' => '',
        'label'    => 'forum category id for notification',
        'help'     => 'category id',
        'section'  => 'notify forum category',
        'order'    => 1
    );
    jrCore_register_setting('jrAutoNotify', $_tmp);

    return true;
}


updated by @elise: 11/20/16 03:16:01PM
Elise
@elise
11/20/16 03:15:25PM
249 posts

AutoFollow for Forum


Using Jamroom

include.php

<?php
/**
 * @copyright 2016 Talldude Networks, LLC.
 */

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

/**
 * meta
 */
function jrAutoNotify_meta(){
    $_tmp = array(
        'name'        => 'Auto Notify',
        'url'         => 'auto-notify',
        'version'     => '0.0.1',
        'developer'   => 'The Jamroom Network, ©' . strftime('%Y'),
        'description' => 'A listener module. Upon user registration, auto notify on forum posts in specified categories',
        'category'    => 'custom',
        'requires'    => '',
        'license'     => 'jcl'
    );
    return $_tmp;
}

/**
 * init
 */
function jrAutoNotify_init(){
   // Event Listener
   jrCore_register_event_listener('jrUser', 'signup_activated', 'jrAutoNotify_signup_activated_listener');

    return true;
}

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


/**
 * Listen for the 'signup_activated' event and add user as watcher of forum category
 * @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 jrAutoNotify_signup_activated_listener($_data, $_user, $_conf, $_args, $event)
{ if (isset($_conf['jrAutoNotify_category_id']) && strlen($_conf['jrAutoNotify_category_id']) > 0) { $cid = (int) $_conf['jrAutoNotify_category_id']; $uid = (int) $_user['_user_id']; $tbl = jrCore_db_table_name('jrForum', 'follow_category'); $req = "INSERT IGNORE INTO {$tbl} (follow_cat_id,follow_user_id) VALUES ('{$cid}','{$uid}')"; //i dont know what this does... $tag = $_ln['jrForum'][119]; jrCore_db_query($req); // reset forum cache for this user jrCore_delete_all_cache_entries('jrForum', $_user['_user_id']); } return $_data; }
Elise
@elise
11/20/16 03:13:38PM
249 posts

AutoFollow for Forum


Using Jamroom

Ok, i tried to do this, mostly by copying what I found elsewhere.
Can I get a code review? I have not tried this but I don't think it will work as is.
xxxjrAutoNotify.zip - 4KB
Elise
@elise
11/16/16 07:09:21PM
249 posts

Jamroom 6 Beta Kick Off


Announcements

How is the Beta going?
  8