Forum Activity for @michael

michael
@michael
02/05/16 11:36:52PM
7,839 posts

Search is creating errors.


Using Jamroom

There doesnt seam to be anything wrong with the query, i tried it here and it executed.

Was there any other information in the debug log.

Try it with a different skin, if it works on a different skin, then its likely an issue with the code.

It would be easier to help if you outlined how I can see the issue here for me on a default install other wise im stuck just guessing.
michael
@michael
02/05/16 11:30:22PM
7,839 posts

Charting Issue


Using Jamroom

The music_chart_row.tpl looks like this:
        {if $item.chart_direction == 'up'}
            {if $item.chart_change > 10}
                {assign var="chart_image" value="hot_up"}
                {else}
                {assign var="chart_image" value="up"}
            {/if}
            {elseif $item.chart_direction == 'down'}
            {if $item.chart_change > 10}
                {assign var="chart_image" value="cool_down"}
                {else}
                {assign var="chart_image" value="down"}
            {/if}
            {elseif $item.chart_direction == 'same'}
            {assign var="chart_image" value="same"}
            {elseif $item.chart_direction == 'new'}
            {assign var="chart_image" value="new"}
        {/if}

Thats the bit that determines what arrow shows.

It reads:
"if the chart direction is up, and the change is greater than 10, then show the HOT UP arrow, otherwise show the normal UP arrow"
then the same for the down, same and new.

You can ditch the HOT UP and COOL down if you don't want them.
michael
@michael
02/05/16 11:24:11PM
7,839 posts

Spammers & Hackers etc


Using Jamroom

nope.

He's fishing. Looking for some software that exists that would know what to do with that url and return a response, if it returns the response he's expecting then he would know that you are running some version of some software that has a known vulnerability in it which he's wanting to exploit.

You're not running wordpress, or whatever software he's looking for so you're good.

That URL is not one that's targeted at anything jamroom.
michael
@michael
02/05/16 11:21:00PM
7,839 posts

Share this position question


Using Jamroom

perrie:OK for starters, what do you mean by {* bring in the item details *}. What do I fill in there?

That is a code comment that is explaining what that section of code is doing.

Docs: "Smarty comments"
http://www.smarty.net/docs/en/language.basic.syntax.tpl
michael
@michael
02/05/16 03:14:44PM
7,839 posts

Share this position question


Using Jamroom

Good one. :)

If you get stuck, you need to give me more than "it didn't work" in order for me to offer any extra suggestions as to what could be the issue.
michael
@michael
02/05/16 03:02:43PM
7,839 posts

How To Extract Playlist as .M3U, HTTP or M3U


Design and Skin Customization

yes, but first you need to know what format that is.

Then construct a page to output your playlist in the same format as they are expecting.
michael
@michael
02/04/16 10:39:43PM
7,839 posts

Custom Form Design


Jamroom Developers

ok, got something.

There are probably multiple ways to do this, but this one works. The concept is, look for an 'event' that is firing when the form_field_elements.tpl is firing, AND we are in our module, then use a 'listener' to redirect to our custom version of that file for just our module.

Docs: "Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/development/1011/events-and-listeners

So the first step is to register the listener for the event we want, the one I chose was 'template_file', so in the _init() function for the module:
/modules/xxCreateIssue/include.php

add:
jrCore_register_event_listener('jrCore', 'template_file', 'xxCreateIssue_template_file_listener');

The whole thing probably looks something like:
/**
 * init
 */
function xxCreateIssue_init()
{
    jrCore_register_module_feature('jrCore', 'quota_support', 'xxCreateIssue', 'on');

    // catch the template_file even and fire a function
    jrCore_register_event_listener('jrCore', 'template_file', 'xxCreateIssue_template_file_listener');
    return true;
}

Then under that add in this function:
function xxCreateIssue_template_file_listener($_data, $_user, $_conf, $_args, $event)
{
    if ($_data['template'] == 'form_field_elements.tpl') {
        $flag = jrCore_get_flag('xxCreateIssue_use_custom_tpl');
        if ($flag) {
            $_data['directory'] = 'xxCreateIssue';
            $_data['template']  = 'form_field_elements.tpl';
            jrCore_delete_flag('xxCreateIssue_use_custom_tpl');
        }
    }
    return $_data;
}

Then copy the form_field_elements.tpl file from the core folder to:
/modules/xxCreateIssue/templates/form_field_elements.tpl
(it doesnt have to be called this, but for ease of remembering its easy)

You can see in that function above that we are looking for a flag that has been set, xxCreateIssue_use_custom_tpl. Thats just a name I chose, it could be anything, but something unique so we know its the right one in our listener.

The last thing we need to do is set that flag during the _create() function or the update function if you use that too.

in /modules/xxCreateIssue/index.tpl in the view_xxCreateIssue_create() function, just before the jrCore_page_display() function set that flag:
     jrCore_set_flag('xxCreateIssue_use_custom_tpl', true);
     // Display page with form in it
     jrCore_page_display();

Now when the page is showin the custom version of the form_field_elements.tpl will show.

(actually thinking about it now, might need to wait longer to delete the flag if you have many page elements. Suspect you can take it from here.)

You can set a session counter or a flag to do the "count to 4 then wrap div" part.

Great to see developers working on this level. Great question. :)
michael
@michael
02/04/16 08:41:03PM
7,839 posts

Custom Form Design


Jamroom Developers

Give me a bit, I setup to check this out for you. Its easy to see that you've tried.

back soon.
  430