Forum Activity for @michael

michael
@michael
07/17/16 04:04:09PM
7,832 posts

JrCore_list in email template


Jamroom Developers

Go for the second idea then to identify which ones are firing and which aren't.
michael
@michael
07/17/16 02:15:08AM
7,832 posts

hosting questions


Jamroom Hosting

The way I would do it if I had my SQL and data but my old site was not online anymore would be to use the install that is created when you fire up a new domain on Jamroom Hosting, then SFTP all the data up to the /data folder and use the mysql tool at:
ACP -> DEVELOPER -> DEVELOPER TOOLS -> TOOLS -> DATABASE ADMIN

And import your SQL.
michael
@michael
07/17/16 01:52:26AM
7,832 posts

JrCore_list in email template


Jamroom Developers

It looks like it should work the same whether the user is logged in or fired by daily maintenance.

Good explanation of the problem.

Seams like the issue is those 3 lines are not getting output but there are 5 jrCore_list calls, so the first thing to do is figure out which are firing which are failing.

(guess, because i've not checked it) try adding $_params.search2 in at the beginning of the template to see which one is which.

{capture name="s_tpl" assign="s_tpl"}
{literal}
THE SEARCH IS: {$_params.search2} <br>
	{if isset($_items)}
		{foreach $_items as $item}
			{if $item.event_type == 'marriage'}
				{if $item.profile_gender == 'female'}
					{$item.event_date|jrGenCore_get_day} {$item.event_date|jrGenCore_get_readable_month} {$item.event_date|jrGenCore_get_year} {$item.profile_first_name} ve {$item.event_linked_person|iyelikin} evlilik yıldönümü
				{/if}
			{else}
				{$item.event_date|jrGenCore_get_day} {$item.event_date|jrGenCore_get_readable_month} {$item.event_date|jrGenCore_get_year} {$item.profile_name|iyelikin} {if $item.event_type == 'birth'}doğumgünü{elseif $item.event_type == 'death'}ölüm yıldönümü{/if}
			{/if}
		{/foreach}
	{/if}
{/literal}
{/capture}

So you know the {jrCore_list} calls are firing even though they are returning no results that fit your if/else conditions to display a line of text. Try that.

--edit---
Alternatively make a copy of the template for each jrCore_list with an identifier in it if $_params.search2 doesnt output anything.
updated by @michael: 07/17/16 01:54:09AM
michael
@michael
07/17/16 01:36:06AM
7,832 posts

ProJam Comment Delete


Using Jamroom

ok, instead of commenting it out, wrap it in an if user is admin for the update button
{*{jrCore_item_update_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}*}
to
{if jrUser_is_admin()}
{jrCore_item_update_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
{/if}
to just show it for the admin

--edit---
Yeah I got your meaning from your first post. If you're having that kind of issue, then the profile owner is just out to cause trouble, and remove their privileges to delete.
updated by @michael: 07/17/16 01:37:53AM
michael
@michael
07/15/16 10:04:45PM
7,832 posts

ProJam Comment Delete


Using Jamroom

Understand your issue, but I think its done that way on purpose. Imagine this scenario:

A user posts a really relevant and useful comment to your profile, its long and the only issue you have with it is that it contains an affiliate link. You as the owner of the profile have the option to: IGNORE IT/ DELETE IT, which do you choose......?

What you really want to do is update it to remove the affiliate link. Thats the reason the option is given.

If you want to disable that option for your site you can change the template at:
/modules/jrComment/templates/item_list.tpl around line 74 that looks like this:
                    {if jrUser_is_admin() || !isset($item.comment_locked)}
                        {if $_params.profile_owner_id > 0}
                            {* profile owners can delete comments *}
                            {jrCore_item_update_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                            {jrCore_item_delete_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                        {else}
                            {* site admins and comment owners see this button *}
                            {jrCore_item_update_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                            {jrCore_item_delete_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                        {/if}
                    {/if}

and comment out the update button so it looks like this:
                    {if jrUser_is_admin() || !isset($item.comment_locked)}
                        {if $_params.profile_owner_id > 0}
                            {* profile owners can delete comments *}
                            {*{jrCore_item_update_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}*}
                            {jrCore_item_delete_button module="jrComment" profile_id=$_params.profile_owner_id item_id=$item._item_id}
                        {else}
                            {* site admins and comment owners see this button *}
                            {jrCore_item_update_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                            {jrCore_item_delete_button module="jrComment" profile_id=$item._profile_id item_id=$item._item_id}
                        {/if}
                    {/if}

and that will remove that button.

--edit--
Alter it by any of the means outlined here:

Docs: "Altering a Modules Template"
https://www.jamroom.net/the-jamroom-network/documentation/development/1051/altering-a-modules-template
updated by @michael: 07/15/16 10:05:37PM
michael
@michael
07/15/16 04:10:46PM
7,832 posts

JrCore_list in email template


Jamroom Developers

paste the function your trying to use in here.

What I normally would do in this situation would be to create a junk.tpl page for my active skin and check that the jrCore_list function works there first. If it does, then put it into the email template and wait for it to fire.

If it didn't work I would put a {debug} into the email template to see what variables I was trying to use and expected to be there werent there.

The debug would come out as html code, but if you take that code and put it into an html file and open it in a browser you can see it as normal.

Another idea would be to put the jrCore_list call into an email template you can fire at will so you dont have to wait a day to see if it works.
michael
@michael
07/14/16 05:47:29PM
7,832 posts

Windows, Mac, Fedora (RHEL), or Ubuntu (Debian)


Off Topic

Using kubuntu here, works great for programming stuff. Graphic and video editing the options for available software that work consistently leave you wishing you had a mac sometimes.

Only disadvantages I can think of is sometimes there are too many settings, eg: phpstorm has a fullscreen and kubutnu has a fullscreen option for programs. If i turn on the fullscreen via KDE then phpstorm thinks it turned it on, so reverts to it when it starts.

Makes for a juggle:
* turn off fullscreen via phpstorm
* turn on fullscreen via KDE

firefox has its own juggle too for using multiple profiles. and sometimes the developers of KDE add in new features that I dont want without ways to turn them off, so thats slightly annoying. ie "activities: Just like what you've already got, but buggier!"

For the most part happy with it though.

I did see a macbook pro with a retina display and was soooooooo jealous of the font rendering, its beautiful. But I think thats more of a hardware issue than a software one.
michael
@michael
07/03/16 08:42:54PM
7,832 posts

Profile Notes Function


Genosis

All javascript functions for the jrGenCore module will be found at:
/modules/jrGenCore/js/jrGenCore.js

That function is defined as:
/**
 * Load profile notes on click
 * @param pid int Profile ID
 */
function jrGenCore_profile_notes(pid){
    var b = $('#profile_notes_box');
    if (b.is(':visible')) {
        b.slideUp('fast');
    }
    else {
        jrGenCore_load_notes(pid, function()
        {
            b.slideDown('fast');
        });
    }
}

So what its doing is checking if the #profile_notes_box is visible, and if it is, then hiding it.

So since you're probably working with a customized skin, you need to add style="display:none" to your location that has:
<div id="profile_notes_box"..........
michael
@michael
07/03/16 07:09:27PM
7,832 posts

Profile Notes Function


Genosis

Its in
/modules/jrGenCore/index.php

Its a form field:
    // Profile Notes
    $_tmp = array(
        'name'     => 'profile_notes',
        'label'    => 'research notes',
        'help'     => 'Enter any research notes you would like to add to this ancestor profile.',
        'type'     => 'textarea',
        'valdiate' => 'printable',
        'required' => false
    );
    jrCore_form_field_create($_tmp);
in the view_jrGenCore_modify_person() function
  378