Forum Activity for @michael

michael
@michael
06/12/15 10:06:00PM
7,839 posts

How To Customize The File Download Module?


Design and Skin Customization

It should have been doing that anyhow. Update to the marketplace and its working correctly in 1.0.9.

Thanks for finding that.
michael
@michael
06/12/15 09:25:18PM
7,839 posts

How To Customize The File Download Module?


Design and Skin Customization

Great explanation, makes it easy to move on. :) I'll check it out and get back to you.
michael
@michael
06/12/15 08:55:06PM
7,839 posts

Turn off notifications for everyone


Installation and Configuration

not via the ACP, but you can via SFTP.

Your SFTP details can be got from:
https://www.jamroom.net/strumelia/

* HOSTING -> SERVER DASHBOARD -> SERVER SETTINGS

You'll see something like:
SFTP Login: something • Rfx3szNPJuBaSbjhvuCjcNJId3GAjB

That is your username / password for logging in via SFTP

When you login you will see the sites on the server, locate the one your after (if you have more than one site on your server), go into that folder and you'll see the standard jamroom structure:
/data
/modules
/skins

the config is in:
/data/config/config.php

That's the file your after.
michael
@michael
06/11/15 10:48:22PM
7,839 posts

Creating A Subscriptions Page


Design and Skin Customization

if you put any new .tpl file into your skin (its advisable to clone the skin first and give it a new name)
ACP -> TOOLS -> DEVELOPER TOOLS -> CLONE SKIN

Give it a name with a 2 letter prefix, since its not going into the marketplace, xx would do:
xxYourName

Then all changes from that point on wont be effected by updates.

Your skin will appear in the filesystem at:
/skins/xxYourName

and if you want a new url, then just add that url's name as a template
/skins/xxYourName/subscription.tpl

will show up at:
your-site.com/subscription

If you want to include the header and footer, then add
{jrCore_include template="header.tpl"}

// all your stuff shows up here.

{jrCore_include template="footer.tpl"}

If you want to add a new .css file rather than add to the ones that exist already, you add the name of it into
/skins/xxYourName/include.php

inside the _init() function, there are others there already:
function jrNovaLight_skin_init()
{
    // Bring in all our CSS files
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_html.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_grid.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_site.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_page.css');
.......
so add the name of the .css file you've added, then add that file to
/skins/xxYourName/css/whatever.css

and the CSS will come out. (might need to put the site into developer mode or clear the caches after each change so you can see it happening.)

"Clear the Cache"
ACP -> CORE -> TOOLS -> RESET CACHE

"Developer mode"
ACP -> TOOLS -> DEVELOPER TOOLS -> GLOBAL CONFIG -> Run in developer mode

Developer mode stops the caching system from running.

So that should get you to the point of being able to add things to the page.

From there the FoxyCart module has a smarty function to get the url your after:
{jrFoxyCart_subscribe_url quota_id="1"}

The function by itself will return the url for the user to click on to signup to that subscription. You can put it wherever you need to put it.

maybe in a link like this:
<a href="{jrFoxyCart_subscribe_url quota_id=3}"><div class="button_sml orange">Monthly Subscription @ $29</div></a>


---
If its not a 1 off kind of thing, and you wanted to go get all the subscribable quotas too, then this function would be useful:
{jrFoxyCart_subscribable_quotas assign="subscribable"}

That would go and get all the quotas that allowed subscriptions and return them as an array.

so the full loop could be:
{jrFoxyCart_subscribable_quotas assign="subscribable"}
{foreach $subscribable as $quota}
<a href="{jrFoxyCart_subscribe_url quota_id=`$quota.quota_id`}"><div class="button_sml orange">{$quota.quota_name}/div></a>
{/foreach}

or it might be {$quota.quota_jrProfile_name}, not sure. but if you put a {debug} in there you will be able to see what variables you have available.

"{debug}"
http://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug
michael
@michael
06/11/15 05:56:17PM
7,839 posts

(officialy a bug report now) multiple photos in a timeline status update issues


Installation and Configuration

your images are missing the /_v=1433815364 parameter

They look like this:
https://www.dreadlockssite.com/upimg/image/upimg_file/267/256

if they looked like this:
https://www.dreadlockssite.com/upimg/image/upimg_file/267/256/_v=123456

Then they would show.

so add the item._updated variable at the end of the URL to your custom template link.

That will show the updated time as the _v parameter and if it ever changed, then the browser would know to clear the cache and get it again.
michael
@michael
06/11/15 05:46:26PM
7,839 posts

Photo Gallery Request


Suggestions

The issue is we don't want to build functionality in that is unwanted by some users. If we added this to the core module then someone built a site that was totally explicit and no-one under 18 is allowed to use, then all the content is going to be explicit and the button becomes irrelevant.

Its much harder to get rid of a feature that you don't want that exists in a core module than to add in something you do want.

Perhaps a custom module built with events and listeners

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

I tried building a module to address the young users concern, but its not quite right and I'm not understanding how to make it right.
michael
@michael
06/11/15 05:40:05PM
7,839 posts

Turn off notifications for everyone


Installation and Configuration

The function responsible for sending user notifications is jrUser_notify()

Its in:
/modules/jrUser/include.php around line 1010 ish. It looks like this:
/**
 * Notify a User about a specific event
 * @param mixed $to_user_id User ID to send notification to (int or array of int)
 * @param int $from_user_id User ID notification is from
 * @param string $module Module that has registered the notification event
 * @param string $event Event Name
 * @param string $subject Subject of notification
 * @param string $message Message of notification
 * @return bool
 */
function jrUser_notify($to_user_id, $from_user_id, $module, $event, $subject, $message)
{
    global $_conf;
    // Make sure we're not recursive
    if (jrCore_get_flag('jruser_notify_is_running')) {
        return true;
    }
    jrCore_set_flag('jruser_notify_is_running', 1);

    // Make sure module has registered
    $_tmp = jrCore_get_registered_module_features('jrUser', 'notification');
    if (!isset($_tmp[$module][$event])) {
//.........

There is no setting to turn off the notifications system, but the goal is to not have that function fire.

Its used in many many modules, so the best way is just to let it fire, but not allow it to complete.

If you alter the code to add
function jrUser_notify($to_user_id, $from_user_id, $module, $event, $subject, $message)
{
return true;

Right after the opening bracket and leave the rest in tact that would do what your after.

But probably a safer way is to not alter that and instead go into:

/data/config/config.php and add this line to the end of the file:
jrCore_set_flag('jruser_notify_is_running', 1);

Which is already contained in the code so you won't need to alter any module files.

The full config.php file will look something like this after that:
<?php
$_conf['jrCore_db_host'] = 'localhost';
$_conf['jrCore_db_port'] = '????';
$_conf['jrCore_db_name'] = '???';
$_conf['jrCore_db_user'] = '????';
$_conf['jrCore_db_pass'] = '????';
$_conf['jrCore_base_url'] = 'http://????.com';

jrCore_set_flag('jruser_notify_is_running', 1);

That will also tell jrUser_notify() not to run. Just remember to take it out again when you want to turn notifications back on.
michael
@michael
06/11/15 02:30:16AM
7,839 posts

Turn off notifications for everyone


Installation and Configuration

Probably the easiest way would be:
ACP -> MODULES -> COMMUNICATION -> EMAIL SUPPORT -> ACTIVE EMAIL SYSTEM -> "log sent email to debug log"

So it goes to the database instead of sending out.
  525