Forum Activity for @michael

michael
@michael
11/28/14 01:44:10AM
7,839 posts

Module Relationships and Question about counting number entries in multiple fields.


Using Jamroom

makuta:How about a specific time?

If you need it to fire at a specific time I suggest cron from your server to call a url.
michael
@michael
11/28/14 01:42:30AM
7,839 posts

Module Relationships and Question about counting number entries in multiple fields.


Using Jamroom

makuta:.... if i want to have the data updated immediately instead of being triggered by the daily maintenance, how would I do that?...

If you want a function to fire based off of a URL, eg: someone visits:
your-site.com/reviews/some_location

Then that corresponds to the 'some_location' function for your module. (because you chose 'reviews' as the module base URL, so anything that goes to '/reviews/' gets sent to xxReviews)

That url is defined in your _meta() function in your includes file.
/**
 * meta
 */
function xxReviews_meta()
{
    $_tmp = array(
        'name'        => 'Reviews',
        'url'         => 'reviews',
        'version'     => '1.0.0',
        'developer'   => 'a Reviews module, ©' . strftime('%Y'),
        'description' => 'a module related to reviews,
        'category'    => 'site',
        'license'     => 'mpl'
    );
    return $_tmp;
}

Think yours should look like that ^^

What is looked for by the system is a function in the index.php file with a certain name.
so your index.php file needs a function called view_xxReviews_some_location()

This is what your index.php file should look like:
<?php
/**
 * @copyright YOUR NAME
 * @author your name <you [at] yoursite [dot] com>
 */

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

//------------------------------
// some_location
//------------------------------
function view_xxReviews_some_location($_post, $_user, $_conf)
{
    return 'hello world';
}
There is a Jamroom5 "Hello World" repo here:
https://github.com/PMaynard/JR5-Hello-World

With a bunch of 'Hello World' examples in it. It might be useful to you.

updated by @michael: 11/28/14 01:44:41AM
michael
@michael
11/28/14 01:31:58AM
7,839 posts

PHP Upload file size question


Installation and Configuration

You might need to restart your server. I think 128MB is the max you will get on arvixe shared hosting. Do you need more than that?
michael
@michael
11/28/14 01:10:14AM
7,839 posts

No page editor on site front page


Using Jamroom

Following up from your other thread here:
https://www.jamroom.net/the-jamroom-network/forum/new_posts/17916/problem-with-new-slate-skin

Take a look in your error logs something that is needed is not there as the footer for that front page is not showing. Its cutting off just about where the menu module would come in.

So i guess the first thing to check is:
* is the menu module active

actually it really looks like its related to the jrMenu module as that is not outputting.

Try reloading that module.
ACP -> MARKETPLACE -> TOOLS -> RELOAD MODULES OR SKINS -> Site Builder - Menus

The latest current versions are:
Site Builder - Menus 	1.0.3
Site Builder - Panels 	1.0.4
Site Builder - Widgets 	1.0.7

updated by @michael: 12/22/16 11:55:59AM
michael
@michael
11/27/14 05:44:21PM
7,839 posts

No page editor on site front page


Using Jamroom

Make sure you are using the jrSlate skin. Its the only one that works with the site builder right now.
updated by @michael: 12/22/16 11:55:59AM
michael
@michael
11/27/14 12:54:57AM
7,839 posts

Module Relationships and Question about counting number entries in multiple fields.


Using Jamroom

makuta:First thing I want to do is display the stream count and do the sum of two fields that display in a template.

You're going to have to start thinking in much more specific terms. "I want to do is display the stream count" is very ambiguous. There are many ways to display something and many locations to display it.

Where you want to display it will make a big difference in the method you use to get the info out there.

and take it one step at a time. first get the data you want into the database, then think about getting it out.

Or the other way around, first think about getting what you want out of the database, then think about manipulating then storing it.
michael
@michael
11/27/14 12:30:42AM
7,839 posts

Module Relationships and Question about counting number entries in multiple fields.


Using Jamroom

Here's the basic module structure to get you going.

It listens for the daily maintenence, then searches all the audio files and adds 10 points to the 'audio_overall_chart_points_count' for each audio item in the system.

it needs tweaking to do whatever you want it to actually do.
xxReviews.zip - 3KB

updated by @michael: 11/27/14 12:31:53AM
michael
@michael
11/27/14 12:12:14AM
7,839 posts

Module Relationships and Question about counting number entries in multiple fields.


Using Jamroom

There is no event called 'weekly_stream' provided by the jrCore module. and if there was, the function jrAudio_weekly_stream_listener doesn't exist in the jrAudio module.

Take a read of this page, it should help understand the concept:

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

You don't want to alter the audio module, you need to make your own. Then listen for existing events and run your own modules functions. so if your module is called xxReviews then in xxReviews_init() you would have:

function xxReviews_init(){
 jrCore_register_event_listener('jrCore', 'daily_maintenance', 'xxReviews_daily_maintenance_listener');
return true;
}

/**
 * Daily maintenance
 * @param $_data array incoming data array
 * @param $_user array current user info
 * @param $_conf array Global config
 * @param $_args array additional info about the module
 * @param $event string Event Trigger name
 * @return array
 */
function xxReviews_daily_maintenance_listener($_data, $_user, $_conf, $_args, $event)
{
   // do whatever you want to do here, then return $_data
   // this function will run once a day.

    return $_data;
}

--edit--
This could be useful to you too:
"Developers guide to customizing Jamroom"
https://www.udemy.com/developers-guide-to-customizing-jamroom
updated by @michael: 11/27/14 12:15:11AM
  628