Forum Activity for @michael

michael
@michael
06/09/14 07:37:31PM
7,839 posts

System Tips Modification


Suggestions

Its using anchors for the tips, then figuring out what to write.

Technically doable.
michael
@michael
06/06/14 11:01:20PM
7,839 posts

How daily maintenance execute


Jamroom Developers

If you want to fire off a function from your module when the daily maintenance is run, use the 'daily_maintenance' listener.

You can see examples of modules registering to listen for it in the _init() function of these modules.
/modules/jrBackup/include.php
/modules/jrCharts/include.php
/modules/jrCore/include.php
/modules/jrImage/include.php

It will look like this:

    // Once a day we cleanup old cache entries
    jrCore_register_event_listener('jrCore', 'daily_maintenance', 'jrImage_daily_maintenance_listener');

What that piece of code reads is:
"When the daily maintenance is run, also fire off my function jrImage_daily_maintenance_listener()"

Then in jrImage_daily_maintenance_listener() the jrImage module cleans up cached files that have not been used lately.
michael
@michael
06/06/14 09:33:18PM
7,839 posts

How daily maintenance execute


Jamroom Developers

It fires when the site is opened after the period has expired. So you can fire it by having cron open the webpage once per day.

The code for it is at the bottom of router.php which controls the routing system if you want to see whats happening.

/modules/jrCore/router.php
michael
@michael
06/03/14 12:22:03AM
7,839 posts

Vimeo


Using Jamroom

There's some instructions on this forum thread:

"Where may I find the following on vimeo and soundcloud."
http://www.jamroom.net/the-jamroom-network/forum/installation-and-configuration/9034/where-may-i-find-the-following-on-vimeo-and-soundcloud
michael
@michael
06/02/14 10:43:21PM
7,839 posts

Union and Join in Jamroom


Jamroom Developers

too much to guess at, need more info.
michael
@michael
06/02/14 09:54:29PM
7,839 posts

Union and Join in Jamroom


Jamroom Developers

Standard database tables can be used instead of using a datastore if you like.

There are some examples of this in the code. One example from the jrChainedSelect module:
    $tbl = jrCore_db_table_name('jrChainedSelect', 'sets');
    $req = "SELECT * FROM {$tbl} WHERE set_id = {$sid} LIMIT 1";
    $_rt = jrCore_db_query($req, 'SINGLE');

so you can build tables and join them however you like.

The concept of the datastore is that you dont need to define database structure. And that any other modules can add to your modules data if they need to.

So there really shouldn't bee a need for a union or a join, the data should just be there in the datastore.

One example of this is the jrTags module that allows users to tag items like an audio item.

As well as storing the tags in its own datastore for look up, it also writes the tag directly to the datastore of the jrAudio module.

So when someone gets a list of audio items, the tags just come back as part of the item.

------
If your wanting to add your (something) into the results for an item list lookup, you can use the 'events' and 'listeners' system to listen for when that/those item(s) are requested and inject whatever you want to add in when the results are returned.
  688