Forum Activity for @michael

michael
@michael
02/18/17 07:33:32PM
7,832 posts

Header code gets buried under menu on profile page?


Design and Skin Customization

yep, thats web development. :)

Shuffle things around until you get them how you want it.

You're good now?
michael
@michael
02/18/17 07:31:25PM
7,832 posts

No custom background images after update


Design and Skin Customization

I'm reading the "option to add a background image to their page" as being the Profile Tweaks module active for their quota.

I've tried allowing that for profile users here with the jrCelebrity skin active. It is working for me though. :(

Did you try resetting the caches?

Send me some login details to your site for a profile where its OK to change the background and I will login and give it a go from here, see if i can see anything.

Send them to support at jamroom dot net and include a link to this thread.

Thanks.
michael
@michael
02/18/17 07:23:58PM
7,832 posts

Execute JS after User Login


Jamroom Developers

This works:
in the include.php file for your module (I called this one xxAutojs you could call yours anything)

/**
 * meta
 */
function xxAutojs_meta(){
    $_tmp = array(
        'name'        => 'Auto Js',
        'url'         => 'autojs',
        'version'     => '1.0.0',
        'developer'   => 'The Jamroom Network, ©' . strftime('%Y'),
        'description' => 'Trigger javascript after a user logs in',
        'category'    => 'custom',
        'license'     => 'mpl'
    );
    return $_tmp;
}

/**
 * init
 */
function xxAutojs_init(){
    jrCore_register_event_listener('jrUser', 'login_success', 'xxAutojs_login_success_listener');
    jrCore_register_event_listener('jrCore', 'profile_template', 'xxAutojs_profile_template_listener');
    return true;
}

function xxAutojs_profile_template_listener($_data, $_user, $_conf, $_args, $event)
{ $onLoginJs = jrCore_get_temp_value('xxAutojs', 'login_success_' . $_user['_user_id']); if ($onLoginJs) { jrCore_create_page_element('javascript_ready_function', $onLoginJs); jrCore_delete_temp_value('xxAutojs', 'login_success_' . $_user['_user_id']); } } function xxAutojs_login_success_listener($_data, $_user, $_conf, $_args, $event)
{ // $_sModule = "sdContestMWUser"; // $_sUser = $_sModule . ":Param-User:" . var_dump($_user); // // // jrCore_logger("INF", $_sUser, ""); // //2017.02.17: TEST: How to open JS Message Window after user login? : $_aJS = array("alert('TEST: Alert On SignIn');"); // jrCore_create_page_element('javascript_ready_function', $_aJS); // // javascript_ready_function // // javascript_footer_function // jrCore_logger("INF", $_sModule . ":DEBUG:JS:05:23:JS=" . var_dump($_aJS), ""); // jrCore_set_temp_value('xxAutojs', 'login_success_' . $_user['_user_id'], $_aJS); return $_data; }

The concept:
* when the user logs in a temp value is set for them using their _user_id
* they are redirected to their profile
* when a profile view is viewed, the 'profile_template' listener fires and checks if there is a temp value set for this user, if there is fire the javascript.
* after the javascript has been fired, delete the temp value so the javascript isnt fired again.

If you're redirecting anywhere after the login, then you'd need to choose a listener that exists at that location to listen for the temp value.

You could either set the javascript to be fired at the 'login_success' stage, or just put a TRUE flag there and put all the javascript into the 'profile_template' function.

Your choice.
michael
@michael
02/18/17 04:55:57PM
7,832 posts

Execute JS after User Login


Jamroom Developers

Trying to figure this out now.

--edit--
The listener is happening BEFORE the page is redirected, so its the wrong listener to use.

The flow we have is:
* user enters their login details.
* details are verified for authenticity
* 'login_success' is fired
* page is refreshed and redirected to the landing page location.

so trying to add JS at this location isnt going to work because the page is not being created.

Going to look into adding a flag during 'login_success' that we can check for on page load. If the flag is found, then add the javascript to the page about to be created, then delete the flag.

Expect that to work. Will report back with a working example.
updated by @michael: 02/18/17 05:02:50PM
michael
@michael
02/17/17 11:41:21PM
7,832 posts

Facebook Player - Song Name Missing?


Using Jamroom

Thought I fixed that recently. The issue is in the link to the item_detail_meta.tpl make sure the:
meta property="og:video" content=.....
line has & title = then the title variable.
like
&title={$item.audio_title|urlencode}&amp
michael
@michael
02/17/17 11:37:30PM
7,832 posts

Facebook Question


Using Jamroom

We've got plans for a new facebook player.

The best you can do is make sure all og:tags are in the correct state. From there Facebook does as it likes from them.

If you can give me a link to one of the players on facebook I can take a look see if I can see anything.
michael
@michael
02/17/17 11:26:24PM
7,832 posts

Execute JS after User Login


Jamroom Developers

instead of the javascript_footer_function, try 'javascript_ready_function'

As that code is in the header, but wrapped to fire in an
$(document).ready()

The footer function might work too if you wrap it in an on-ready function code to fire when the page is ready to go.

Give each a go. Thing to test is to see if your alert('TEST: Alert On SignIn'); is being placed in the footer after sign-in. If it is, then all that is needed is to get it firing.
michael
@michael
02/17/17 11:21:54PM
7,832 posts

youtube video search


Suggestions

For me i cant reproduce "when i try to close nothing happens". For me it goes back to the list.

Could you send us some login details for where you can see it happening. Maybe its only happening on your site. I can check it out.

what I think the steps are:
* select + to add to youtube
* select search
* search for some videos
* add a selection of them via the checkbox and save buttons
* click CANCEL

EXPECTED:
That you will be taken back to the profile list of videos.

ACTUAL:
That nothing happens .

I can test that on your site from here if you like.
michael
@michael
02/16/17 08:33:31PM
7,832 posts

No custom background images after update


Design and Skin Customization

hard to understand the situation. Nate or Douglas who work with the skins may know the solution with the current explanation, for me if you could explain it a bit more in depth, that would help me help out. :)

"No background images when using the custom setting in profile. "
Reads like you've put some custom backgrounds in. Could you explain the steps you took to do this please so i can understand.

Guessing thats going to be the key point, how you got that customization in.


Thanks.
michael
@michael
02/15/17 05:50:16PM
7,832 posts

Open Graph tags to gallery front pages?


Jamroom Developers

This has been added to the module in the marketplace. update to jrGallery 1.8.7.
  266