Forum Activity for @michael

michael
@michael
12/07/18 10:47:23PM
7,816 posts

Is it feasible to build a central "Text editor settings" control module?


Suggestions

If "Open Sans" is not in the list, then it must be the default. If its the default then removing the formatting would return it to the default.

#3 a search for "tinymce adjust avaialbe font sizes" turned up this:
https://stackoverflow.com/questions/20183796/tinymce-4-how-change-font-size-styles
which suggests adding this to your form_editor.tpl file
 fontsize_formats: "8pt 9pt 10pt 11pt 12pt 26pt 36pt",
michael
@michael
12/07/18 10:42:20PM
7,816 posts

Comments in groups


Using Jamroom

in whichever template you're wanting to adjust put in {debug}
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

Then find 2 matching variables, so something like:
{if $_user._user_id == $some_variable_for_the_user_id_who_owns_the_group}
put the code for the comments section in here
{/if}
so the comments box will only show if the user id of the user looking at the screen matches the user_id of the owner of the group.
michael
@michael
12/07/18 10:39:19PM
7,816 posts

menus and footer menu visibilty how?


Using Jamroom

Use the {debug} in your footer template to find out what variables you have.
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

The one you're after is probably {$_user.user_quota_id} then wrap your menu items in a check
{if $_user.user_quota_id == 3}
Stuff here will only show to users in quota id 3
{/if}
michael
@michael
11/30/18 11:57:43PM
7,816 posts

Dynamically changing $_user quota settings


Jamroom Developers

jrProfile_get_quota() doesnt look like it touches $_user.

'session_started' is not such a commonly used listener judging by a code search. One set that is commonly used is:
* 'db_get_item'
* 'db_search_items'

eg:
    // Expand Poll options
    jrCore_register_event_listener('jrCore', 'db_get_item', 'jrPoll_db_get_item_listener');
    jrCore_register_event_listener('jrCore', 'db_search_items', 'jrPoll_db_search_items_listener');

Might try tweaking the data via both of those.

--edit--
Why: because the session start gets its info from:
jrCore_db_get_item('jrUser', $uid, true, true)) {.........
so you'd be tweaking before it arrived at the session start.
updated by @michael: 11/30/18 11:59:15PM
michael
@michael
11/30/18 11:51:04PM
7,816 posts

Img Tag Override to Amp-Img


Jamroom Developers

That template code looks like it will fail.

template:
{if jrCore_is_mobile_device()}
  {myModule_amplify html=$html}
{else}
  {$html}
{/if}
michael
@michael
11/29/18 11:11:45PM
7,816 posts

Dynamically changing $_user quota settings


Jamroom Developers

The event that returns the $_user variable back into router.php is 'session_started'.

You get the $_SESSION data passed into that listener and whatever you return becomes your $_user.

--edit--
in your modules _init()
jrCore_register_event_listener('jrUser', 'session_started', 'jrYourModule_session_started_listener');

updated by @michael: 11/29/18 11:13:42PM
michael
@michael
11/29/18 11:04:10PM
7,816 posts

Help creating a menu item


Design and Skin Customization

$_user is the user looking at the screen
$_profile is the profile being looked at
$_conf is all the global settings

You seam like your getting into the good stuff quickly so these docs could be useful

Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

Not all variables are the same everywhere, so {debug} helps you understand what you have to work with wherever you are.

and {jrCore_list} is the main go-to function from templates to get stuff from the database.

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list
michael
@michael
11/29/18 10:58:42PM
7,816 posts

Comments text area missing


Installation and Configuration

Thanks for the info on disqus not being installed.

First thing that jumps to mind to check is: is the comments allowed for all the quotas:
ACP -> MODULES -> ITEM FEATURES -> COMMENTS -> QUOTA CONFIG -> Allowed On Profile -> CHECK

and use the APPLY TO ALL QUOTAS button at the top to make sure every quota gets those same settings.
michael
@michael
11/29/18 10:54:05PM
7,816 posts

Dynamically changing $_user quota settings


Jamroom Developers

Probably the function that you're after is:
jrUser_session_sync($_user['_user_id']);
That will make sure the $_SESSION is inline with what is in the database for that user_id.
michael
@michael
11/29/18 03:28:06AM
7,816 posts

blog url changefor local seo


Installation and Configuration

The url's are just decorative, so:
your-site.com/someone/blog/15
is exactly the same as
your-site.com/someone/blog/15/the-title-of-the-blog

Usually the title of the blog is run through a function and saved to the datastore on 'blog_title_url' then used in the templates like {$item.blog_title_url}.

But if you want to do your own formatting of the blog title and adjust the links you can.

Docs: "Defining your own SMARTY function"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1569/defining-your-own-smarty-function

Then you could pass in the title to the SMARTY function and structure it into whatever format you liked.
  101