Forum Activity for @michael

michael
@michael
01/10/17 09:04:42PM
7,826 posts

Login Event Listener


Jamroom Developers

Try this one:
/modules/sdContestMWUser/include.php
<?php
/**
 * 2017 SoftDesigns
 */

//Ensure this module not called directly:
defined('APP_DIR') or exit();

/**
 * meta
 */
function sdContestMWUser_meta(){
    $_tmp = array(
        'name'        => 'ContestMWUser',
        'url'         => 'ContestMWUser',
        'version'     => '1.0.0',
        'developer'   => 'SoftDesigns',
        'description' => 'Verify Contest User',
        'category'    => 'tools'
    );
    return $_tmp;
}

/**
 * init
 */
function sdContestMWUser_init(){
    jrCore_register_event_listener('jrUser', 'login_success','sdContestMWUser_login_success_listener');
}

/**
 * @param $_data
 * @param $_user
 * @param $_conf
 * @param $_args
 * @param $event
 * @return mixed
 */
function sdContestMWUser_login_success_listener($_data, $_user, $_conf, $_args, $event)
{ $_Log1 = "sdsdContestMWUser"; $_Log2 = "sdContestMWUser_login_success_listener"; $_Log3 = $_args; // $_fdebug = array( 'What' => "trying to figure out whats going on in this listener event sdContestMWUser_login_success_listener()", '$_log1' => $_Log1, '$_log2' => $_Log2, '$_log3' => $_Log3 ); fdebug($_fdebug); // jrCore_logger('inf', 'fired the login success listener, it worked'); return $_data; }

updated by @michael: 01/10/17 09:07:25PM
michael
@michael
01/10/17 08:56:08PM
7,826 posts

Login Event Listener


Jamroom Developers

The first thing I can see that is incorrect is the use of the jrCore_logger() function.

Attached is a screenshot of that function with its docblock exposed.

You can see from the extra info that the correct usage for that function is jrCore_logger('INF', 'this is an info message that gets logged in the activity log.');

The rest of your function looks like it should be working. Make sure that you module is active in the ACP. Only active modules will work.

go to your modules INFO tab and check the ACTIVE checkbox and save. then run the integrity check. It should be working.
screenshot_docblock.png screenshot_docblock.png - 380KB
michael
@michael
01/10/17 03:57:49PM
7,826 posts

How do i add a login box to my index page.


Design and Skin Customization

The CSS you posted is doing what its supposed to do. It reads "set the width of the login container to 500 px and in the center of the screen. make its background color blackish and have rounded corners, give it a bit of space on the top."

Then the ext bit reads "put this in the center of the page, make its background color yellow and make it 720px wide"

so its doing what its asked to do. What I want to know is do you have CSS that makes the layout you want, maybe from a skin you've purchased somewhere, or from a designer who has done it for you, or other.......

Or are you looking for someone to construct the CSS necessary to reproduce what is on your image.
michael
@michael
01/10/17 02:27:52PM
7,826 posts

Getting error with Audio


Using Jamroom

I'll need to setup a testing environment for this. Could you check if it is working on a custom skin like jrElastic? If it works on elastic then the issue is likely a template variable issue on the custom skin. If it doesnt work on jrElastic then the issue is likely related to the profile domains module.

Will get setup here.
michael
@michael
01/10/17 02:25:15PM
7,826 posts

Unable to embed images with an apostrophe in the image filename.


Using Jamroom

Yeah that certainly could be an issue. Its likely that the templates need to have an |jrCore_entity_string added to the location of the output image.

What I'm thinking is that that apostrophy is screwing up the HTML. Guessing the image is trying to get out to the page, but the broken HTML is causing it not to show.

Got a URL of a page where the image is added but not showing?
michael
@michael
01/10/17 02:21:11PM
7,826 posts

6.0.4 to 6.0.5 core update not completing


Design and Skin Customization

make sure the site that is not updating correctly has the latest version of php. I heard this was a problem on php 5.4 and once the server was updated to 7.0+ the issue went away.
michael
@michael
01/10/17 02:18:18PM
7,826 posts

Limiting responses from a twitter script


Using Jamroom

Well done. Its possible that someone will come along later and read this thread and have the same issue you had. If you could outline how it is done for the next person I'm sure that will be appreciated.

Thanks.
michael
@michael
01/10/17 02:14:04PM
7,826 posts

Login Event Listener


Jamroom Developers

Listeners are all over the place in the code. Often there are several different listeners that COULD be used to get your adjustments in where you want them.

The most up-to-date docs are in the docblocks of the functions themselves in the code, so if you're using an IDE for your development, it should have facilities to bring up the docblocks. ( we like phpstorm, but there are many good IDE's )

For me, when I want to locate a suitable listener for a location I take a look around the area I'm wanting to effect and see if there are any jrCore_trigger_event() functions, then use that listener.

(screenshot search for event triggers in jrUser module)

After running a search for event triggers on the jrUser module, it returns a list of possible triggers.

The one with the most likely name seams to be "login_succcess".

Thats probably the one you're after.

The explanation for that even is "Fired when a user successfully logs in".

Try that one.
screenshot_event_triggers.png screenshot_event_triggers.png - 262KB
michael
@michael
01/10/17 02:03:56PM
7,826 posts

glitch when posting links to site media urls in comments/posts


Using Jamroom

Thinking the desired result when using the 'link' button is to just have the link behave as a link and not converted to a media URL card?

Questions in my head:
* does a link pasted into the editor behave the same as a link added to the location using the link button
A: Thinking no. Thinking they should behave differently. Thinking a plain URL should get turned into a card, but a link put there with the 'link' button should just be a flat link, not converted.

Does that feel right to you too?
michael
@michael
01/10/17 12:30:47PM
7,826 posts

glitch when posting links to site media urls in comments/posts


Using Jamroom

Think I can see whats happening here, when you use the 'link' button and insert a URL it puts the title of the link as the same URL as the actual link.

eg:
<a href="https://www.youtube.com/watch?v=FdBF6h7oH5I">https://www.youtube.com/watch?v=FdBF6h7oH5I</a>
Then the Media URL Scanner is transforming one of those links into an actual link.

If you use a different title for the link than the link itself, I expect the issue doesnt occur.

eg:
<a href="https://www.youtube.com/watch?v=FdBF6h7oH5I">A link to a video</a>

Will look for a fix for this issue.
  293