Forum Activity for @michael

michael
@michael
11/20/17 04:35:11PM
7,827 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

you can use the ACP -> MODULES -> DEVELOPER -> DEVELOPER TOOLS -> TOOLS -> DATABASE ADMIN to open adminer and export just the tables you're interested in, then import them into your development site.

otherwise paul should be back around later on in the day.
michael
@michael
11/20/17 12:17:36AM
7,827 posts

Duplicates and 'follow_unique' in jrdiscussion_follow_topic


Jamroom Developers

From memory: There should only be one pair per topic and the state of the button being displayed toggles the state. So in a perfect world if the user is following the button shows them following, if the user is not following, the buttons shows them not following.

I think somewhere duplicates were slipping in ( maybe caching not showing the correct state of the button, not sure, vaguely remember something. ) and so the delete all records was added.

As for the follow_unique, I believe thats so that the correct follow can be deleted via things like an email link. if links like
.../.../.../remove_follow/user_id=1/topic_id=1 worked it could allow for someone who did not own that follow removing another person from the following list.

If you know steps that consistently add duplicates I can go look at the code again.
michael
@michael
11/16/17 10:14:31PM
7,827 posts

disalow periods in user names


Suggestions

When a user signs up with a profile name like:
one.point.one
The points are removed for their profile url, it becomes /onepointone/

If someone else tries to signup with the points in different locations, they get told that profile url is already in use
on.epoint.one

points_ignored.jpg points_ignored.jpg - 81KB
michael
@michael
11/16/17 09:40:08PM
7,827 posts

Change profile index to groups the profile is following?


Design and Skin Customization

There are a few correct ways to eidt the Group modules item_index.tpl template. Choose a method that you like from here:

Docs: "Altering a Modules Template"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1051/altering-a-modules-template
michael
@michael
11/16/17 09:38:27PM
7,827 posts

updating template to jrCore_item_detail_features doesn't display prior entered tags


Using Jamroom

what was the old code for tags?

Guessing that the tags maybe have been attached to a different item.
michael
@michael
11/16/17 08:16:02PM
7,827 posts

Using Button Functions


Jamroom Developers

this is what you're after:
{jrCore_item_list_buttons module="xxTrackme" item=$item exclude="jrCore_item_update_button,jrCore_item_delete_button"}
as a template function.

OR you can use a listener to do it for your own module too.

code from the modules include.php file
<?php
/**
 * @copyright 2017 no one
 * @author no one <noone [at] nowhere [dot] com>
 */

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

/**
 * meta
 */
function xxTrackme_meta(){
    $_tmp = array(
        'name'        => 'Trackme',
        'url'         => 'trackme',
        'version'     => '1.0.1',
        'developer'   => 'Noone, &copy;' . strftime('%Y'),
        'description' => 'Just adds some icons and its own buttons to lists',
        'category'    => 'custom'
    );
    return $_tmp;
}

/**
 * init
 */
function xxTrackme_init(){

    jrCore_register_module_feature('jrCore', 'quota_support', 'xxTrackme', 'on');

    $_tmp = array(
        'title'  => 'Item Halt Button',
        'icon'   => 'halt',
        'active' => 'on'
    );
    jrCore_register_module_feature('jrCore', 'item_list_button', 'xxTrackme', 'xxTrackme_item_halt_button', $_tmp);

    jrCore_register_event_listener('jrCore', 'exclude_item_list_buttons', 'xxTrackme_exclude_item_list_buttons_listener');

    return true;
}

/**
 * the button for lists
 */
function xxTrackme_item_halt_button($module, $_item, $_args, $smarty, $test_only = false){
    if ($test_only) {
        return true;
    }
    $_rt = array(
        'url'     => '#',
        'onclick' => "alert('hello world')",
        'icon'    => 'halt',
        'alt'     => 'the alt text for the halt button here'
    );
    return $_rt;
}

/**
 * listener
 */
function xxTrackme_exclude_item_list_buttons_listener($_data, $_user, $_conf, $_args, $event)
{ // remove the UPDATE button $_data['jrCore_item_update_button'] = true; // remove the DELETE button $_data['jrCore_item_delete_button'] = true; return $_data; }
michael
@michael
11/16/17 01:32:40AM
7,827 posts

Using Button Functions


Jamroom Developers

If this is for a module thats going to be released, I can see you need it done via the module code, but do you know about the item action buttons

Docs: "Item Action Buttons"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1508/item-action-buttons
which_buttons.jpg which_buttons.jpg - 64KB
michael
@michael
11/16/17 12:43:01AM
7,827 posts

Using Button Functions


Jamroom Developers

Related forum post about how to over-ride icons at skin level
https://www.jamroom.net/the-jamroom-network/forum/using-jamroom/49167/can-i-change-the-icon-for-chat

For your case you have your own module and want to define icons, take a look at jrAction module, it defines its own icons.

It has 2 folders in the img directory
/modules/jrAction/img/icons_black/at.png

Then its used in jrAction_item_index_mentions_button() function.

That will give you something to look at while I go look for why exclude="" isnt working.
michael
@michael
11/14/17 08:09:04PM
7,827 posts

Broken link posted to twitter by system feed


Design and Skin Customization

This is fixed in the next version of jrOneAll ver 1.6.0
  172