Forum Activity for @paul

paul
@paul
10/11/17 10:35:13AM
4,335 posts

Smarty Function for HTML


Jamroom Developers

Yes - Use a custom smarty function. Create it with a custom module with just an include.php file that looks like this -
<?php

// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * meta
 */
function xxHTMLSmarty_meta(){
    $_tmp = array(
        'name'        => 'HTMLSmarty',
        'url'         => 'htmlsmarty',
        'version'     => '1.0.0',
        'developer'   => 'SoftDesigns &copy;' . strftime('%Y'),
        'description' => '????',
        'license'     => 'mpl',
        'category'    => 'admin'
    );
    return $_tmp;
}

/**
 * init
 */
function xxHTMLSmarty_init(){
    return true;
}

/**
 * Smarty function to get html string
 * @param $param string Param name
 * @return string
 */
function smarty_function_xxHTMLSmarty_get_html($param)
{ return 'The html string to be returned goes here!!'; }

Then in the templates just use {$xxHTMLSmarty_get_html}

If you have several html strings you might want to return, pass in a parameter and return on that -

<?php

// make sure we are not being called directly
defined('APP_DIR') or exit();

/**
 * meta
 */
function xxHTMLSmarty_meta(){
    $_tmp = array(
        'name'        => 'HTMLSmarty',
        'url'         => 'htmlsmarty',
        'version'     => '1.0.0',
        'developer'   => 'SoftDesigns &copy;' . strftime('%Y'),
        'description' => '????',
        'license'     => 'mpl',
        'category'    => 'admin'
    );
    return $_tmp;
}

/**
 * init
 */
function xxHTMLSmarty_init(){
    return true;
}

/**
 * Smarty function to get an html string
 * @param $param string Param name
 * @return string
 */
function smarty_function_xxHTMLSmarty_get_html($param)
{ $_html = array( 1 => 'HTML string 1', 2 => 'HTML string 2', 3 => 'HTML string 3', ); return $_html[$param['id']; }

which would be called as {xxHTMLSmarty_get_html id=2}

If the possible html strings to be returned need to be more dynamically configurable, create the module using the Aparna module then add a smarty fuction to that to return html strings created by admin and stored on a datastore.
hth
paul
@paul
10/10/17 12:46:03PM
4,335 posts

User bulk upload


Using Jamroom

Be sure to checkout the sample_members.csv file in the Exporter module. Use that in conjunction with the docs. to get an idea of the format needed for your user csv file.
paul
@paul
10/10/17 09:07:37AM
4,335 posts

User List with Random Audio


Jamroom Developers

Where are you putting this in your code?
Are you sure that $item._profile_id is valid at that point?
paul
@paul
10/09/17 12:23:42PM
4,335 posts

Groups: how to receive notification of new member applying for a private group


Ning To Jamroom

This has been added to the next release of the Group module. It should be in the Marketplace within the next few days.
paul
@paul
10/09/17 09:55:31AM
4,335 posts

How to use user_email to toggle a badge


Design and Skin Customization

The only user variable that's available in the profile_header.tpl template is $_user_id and its value will be that of the user assigned to it. If the profile was created by admin, $_user_id will be the admin user ID, so assuming you want to 'badge' profiles assigned to regular users, and the admin user ID is 1, the code needed is -
{if $_user_id != 1}
    Badge code here
{/if}

hth
paul
@paul
10/08/17 10:43:23AM
4,335 posts

Timeline entry pruning... ?


Using Jamroom

Timeline entries manually created are still never deleted in normal circumstances, but deleting a profile will delete its entries.
paul
@paul
10/08/17 01:39:10AM
4,335 posts

Timeline entry pruning... ?


Using Jamroom

A "timeline entry that is manually created by a user" is most likely just a text entry created by a user as a 'status update' (equivilent to a Tweet !!). As such it propably has little impact on server space, when compared image or media files.
Of course, as with all things in Jamroom, it is possible to remove old status updates, if need be, with a simple custom module.
hth
Pa
paul
@paul
10/08/17 01:30:35AM
4,335 posts

List all Users with Paging


Jamroom Developers

Checkout the jrCore_list documentation, particularly the pagination section - https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/89/jrcore-list

So the above call would be something like this -

{jrCore_list module="jrProfile" order_by="_created desc" template=$profile_tpl pagebreak=10 pager=true}

hth
paul
@paul
10/07/17 02:32:02PM
4,335 posts

Timeline entry pruning... ?


Using Jamroom

OK - It looks like these are 'comment attachments'. I was confused when you called them Timeline items as you cannot attach files to timeline entries - that's why I was asking you to point me to one so that I could work it out !!
This being the case, the Timeline prune option will have no effect and I think you'll need something custom to identify any old ones on your site.
  131