Forum Activity for @ultrajam

SteveX
@ultrajam
04/01/16 06:21:06AM
2,589 posts

Where would I find the code that dispays number of online users?


Design and Skin Customization

I've found that quota_id does work with jrUser_whos_online.

Take a look at the session_quota_id in the jr_jruser_session table to see who is online, then try filtering using those ids. Your template will need to be different to cope with a single quota.
SteveX
@ultrajam
03/30/16 06:35:53AM
2,589 posts

Privacy check for images?


Jamroom Developers

I have a custom item module which does not display items itself, they are listed using jrCore_list within a skin template modified in the db. The skin template is then shown in the profile. In the list call I need to use privacy_check=false in order to list the items so that they are visible to non-profile owners.

However, each item has an image, and although the item shows the image is shown as the default ? image to someone logged in who is not the profile owner. Owners see the correct image.

Is there a means of setting privacy_check to false on the image as well?
updated by @ultrajam: 07/16/16 07:37:44PM
SteveX
@ultrajam
03/21/16 10:49:54AM
2,589 posts

TinyMCE inserting line breaks into some list items


Jamroom Developers

TinyMCE is inserting a line break into a UL list item if it begins with a strong tag or similar.

The br is not inserted if the list item starts with ordinary text.

Thanks

Steve
updated by @ultrajam: 11/19/16 08:17:45AM
SteveX
@ultrajam
02/24/16 02:27:34PM
2,589 posts

How Apache Is Losing The Web To NGINX


Off Topic

I haven't had time to read the whole thing but this looks like a good article:
https://www.digitalocean.com/community/tutorials/apache-vs-nginx-practical-considerations
SteveX
@ultrajam
02/23/16 01:42:01AM
2,589 posts

In need of some jrCore_download_file advice


Jamroom Developers

Thanks Michael.

Ideally I'd check that the user can edit the item before generating the image.

If I global and fdebug $_user from the function it's for a not logged in user (unless I have that view open in a separate tab).

I'll try with the temp value.
updated by @ultrajam: 02/23/16 01:43:22AM
SteveX
@ultrajam
02/22/16 11:42:31AM
2,589 posts

In need of some jrCore_download_file advice


Jamroom Developers

In my module, I need to update the item image (pie chart) when specific item fields change.

I am doing that by calling an update_piechart function which then calls a view using jrCore_download_file. The view returns the new image which is then saved to the item.

But (unless I have a browser tab open with the image-making view) the $_user data is not available in that view - I am not logged in.

Should I be able to see the $_user data for the logged in user there?

I tried checking using flags, but they are also not available in that view. Are flags deleted when a new view is called?

I'm coping with that by updating the item before using jrCore_download_file, then checking that the item has just been updated in the view producing the image, but that doesn't feel quite right, so I'm wondering if there is a better way to do this?

Any suggestions would be appreciated!

Thanks :)
updated by @ultrajam: 06/14/16 10:11:00PM
SteveX
@ultrajam
02/20/16 12:59:02PM
2,589 posts

Pie charts examples using Flot / jrGraph?


Using Jamroom

I actually ended up bypassing jrGraph js by using php to draw the pie chart and save it as an item image when saving or updating the item. That way I don't need to cache it and can use the same image to print into a pdf (one of the requirements of the design is for the item to be saveable as a pdf).
SteveX
@ultrajam
02/20/16 03:46:14AM
2,589 posts

Pie charts examples using Flot / jrGraph?


Using Jamroom

I have registered my graph function and added my graph template to my module.

In the graph function I add the flot pie chart js to the javascript_href_footer (the pie plugin script is already in the flot contrib directory).

If I hard code my data into my graph template it works ok, but I'm stuck with passing graph data into the template either via the jrGraph_embed function or via my custom graph function.

What I'd like to be able to do is pass in $override_data in some way, maybe in the smarty function eg:
{$override_data='[{ label: "Series1",  data: 10},{ label: "Series2",  data: 30},{ label: "Series3",  data: 90},{ label: "Series4",  data: 70},{ label: "Series5",  data: 80},{ label: "Series6",  data: 110}]' }
{jrGraph_embed module="ujPlanner" name="graph_pie_chart" override_data=$override_data}
Or in the registered function, eg:
$_rs['override_data'] = array("Series1" => 10,"Series2" => 5,"Series3" => 11,"Series4" => 7);

For now though I think I'm going to have to parse a non-jrGraph graph template within my module so that I can get my item data to appear as a pie.
SteveX
@ultrajam
02/17/16 08:29:12AM
2,589 posts

List / pagination problem with custom module


Jamroom Developers

I have fixed this by adding another search condition, but still interested to know what might have changed there.
SteveX
@ultrajam
02/17/16 07:49:07AM
2,589 posts

List / pagination problem with custom module


Jamroom Developers

After updating to 5.3 we have some problems with profile item listing and pagination in a custom module.

There are now many additional "blank items" listed using item_index.tpl with all of the actual items appearing on the last page. So we have 6 workbook items here: http://academicskills.uwe.ac.uk/general/workbooks/p=25 but now we have to go through to page 25 to see them - previously they were all on the first and only page.

This from item_index.tpl
    {capture name="row_template" assign="template"}
        {literal}
            {jrCore_module_url module="ujMicroSite" assign="murl"}
            {if isset($_items)}
            {foreach $_items as $_page}
            <div class="item">
                <h2><a href="{$jamroom_url}/{$_page.profile_url}/{$murl}/{$_page.micro_category_url}">{$_page.micro_category}</a></h2>
            </div>
            {/foreach}
            {/if}
        {/literal}
    {/capture}

    <div class="block_content">

        {jrCore_list module="ujMicroSite" profile_id=$_profile_id group_by="micro_category" order_by="micro_category asc" template=$template pagebreak="12" page=$_post.p pager=true}

    </div>
The workbook pages are similar to jrDocs pages (multiple sections in pages which are grouped into books using a category field). I don't think there is anything in listeners which would relate to this.

Any ideas how the 5.3 code may have caused this? Or how to fix it?

Thanks


updated by @ultrajam: 05/19/16 06:07:59PM
  82