Forum Activity for @michael

michael
@michael
11/29/18 11:11:45PM
7,821 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,821 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,821 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,821 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,821 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.
michael
@michael
11/26/18 10:21:04PM
7,821 posts

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


Suggestions

The request is "A way to remove any text formatting done in the editor"?

There's this button:
https://stackoverflow.com/questions/21159778/clear-formatting-button-in-tinymce

To set it up for the blog post editor, the file you want to adjust is jrCore 'form_editor.tpl' and where it reads:
    toolbar1: "formatselect | fontselect fontsizeselect forecolor 
change it to
    toolbar1: "removeformat | formatselect | fontselect fontsizeselect forecolor 

remove_formatting.jpg remove_formatting.jpg - 119KB
michael
@michael
11/25/18 04:13:44AM
7,821 posts

Img Tag Override to Amp-Img


Jamroom Developers

When you copy the content of the $html and put it into a variable
$html =  <<<EOF
    <p>Hello</p>
    <p>world and the rest of your html here.....</p>
EOF;
echo ampify($html);

Does it look like you want it to look?

White page will show in your error log what the error is.
michael
@michael
11/23/18 03:04:05AM
7,821 posts

Img Tag Override to Amp-Img


Jamroom Developers

Did you the first suggestion?
  102