Forum Activity for @softdesigns

SoftDesigns
@softdesigns
04/06/17 02:55:47PM
242 posts

Server Environment Variables


Jamroom Developers

Ok - That makes sense - no worry.
--
Another way is to just run some code in the first "startup" on each JR site.
For example - on WordPress - we accomplish this - by running some simple code in theme: functions.php
--
Is there an existing simple JR PHP file - that runs "before any other modules" - so we could DEFINE a Site-Wide var that all other modules could access?
--
We could create custom module, but is there already some JR "startup" code area (like functions.php) - maybe that we could use?
updated by @softdesigns: 04/06/17 02:58:20PM
SoftDesigns
@softdesigns
04/06/17 02:25:41PM
242 posts

Server Environment Variables


Jamroom Developers

We need set a Server Level Global Constant - accessible from ALL JR Sites on the same server, custom modules, or smarty templates. Prefer not mess with DB, just a simple Server Environment variable - get value from code with $_SERVER['HTTP_MY_VAR'] - would be easy method...
--
We use Env vars on Azure - simple setup via control panel on Azure app
--
How can we Get/Set - Server Level Global Constant - on JR Hosted Server?
updated by @softdesigns: 04/06/17 02:27:33PM
SoftDesigns
@softdesigns
04/06/17 10:50:51AM
242 posts

Server Environment Variables


Jamroom Developers

On a Jamroom Premium Hosted Server: How to Set environment variables via: .htaccess
--
Goal: have Apache set environment variables for use in our Smarty Templates, via a .htaccess file, using SetEnv. We assume these variables must start with 'HTTP_' for security purposes.
--
Examples:
--
SetEnv HTTP_MY_VAR "my value"
SetEnv HTTP_MY_VAR myValue

Then use $_SERVER to fetch it from custom Module or somehow from Smarty Template.
$_SERVER['HTTP_MY_VAR']
--
FYI: On Azure - we can set these directly via Azure App Control Panel.
--
On a Jamroom Premium Hosted Server: How to Set Server Level environment variables, that can be accessed from any of our multiple JR sites?
updated by @softdesigns: 07/09/17 02:06:29PM
SoftDesigns
@softdesigns
03/31/17 06:58:33PM
242 posts

Module Session Variable


Jamroom Developers

Thanks for the various options above.
Very helpful to have some guidance when searching thru JR source.
Will need time to study...
--
Great Support
updated by @softdesigns: 03/31/17 06:59:01PM
SoftDesigns
@softdesigns
03/31/17 03:30:51PM
242 posts

Module Session Variable


Jamroom Developers

What is the correct way a custom module should set global session variables that all other modules can access?
--
Raw PHP would be: $_SESSION["favcolor"] = "green";
--
Are there equivalent JR platform functions to handle session?
updated by @softdesigns: 07/01/17 08:35:18PM
SoftDesigns
@softdesigns
03/30/17 07:39:51AM
242 posts

Amazon S3 Media Revert


Using Jamroom

Quote: Amazon S3 Media module changelog

Version 1.1.2:
- Bug Fix: Transfer S3 Files back to local system tool not working correctly
- Bug Fix: Profiles with more than 1,000 media files may not transfer all files back from S3
Two Questions about this Module: Amazon S3 Media module

#1 : Is this BETA module stable enough for testing on a live site? How to install this BETA module, since we could not find this in the normal marketplace? How do we get to the Cloud marketplace?

#2: We need to ensure there is a rollback if this module breaks our media. Before we install, can we "undo" this module, by reverting to a previous nightly backup?
updated by @softdesigns: 07/11/17 03:19:20AM
SoftDesigns
@softdesigns
03/30/17 05:47:19AM
242 posts

Ninja Skin Upgrades


Design and Skin Customization

Yes, waiting on some various fixes floating around this forum.
We prefer get fixes from updates, rather than manually modify our current skin.
--
Also want to compare latest Ninja skin to recently upgraded Elastic2 to see which skin has more mobile features. So we want to compare latest upgrades of both skins...
SoftDesigns
@softdesigns
03/29/17 11:31:16AM
242 posts

Ninja Skin Upgrades


Design and Skin Customization

Any Idea or ETA when the next Ninja Skin Upgrade might be released?
SoftDesigns
@softdesigns
03/20/17 03:57:04PM
242 posts

Page Module Current ID


Jamroom Developers

Thanks ALL for the great replies...
Quote:
MySite/ProfileA/page/2/home
MySite/ProfileA/page/2/three-birds-in-a-tree
MySite/ProfileA/page/2/wednesdays-i-like-to-bake
Basically, Question #2 - was: What is the easiest way - or a JR variable that contains - that ID "2" in the links above.
--
From the replies, it sounds like just using raw PHP, or "reading-the-post", and parse the URL seems to be the easiest way...
--
Great Support - Solved...
updated by @softdesigns: 03/20/17 05:43:19PM
SoftDesigns
@softdesigns
03/20/17 08:17:59AM
242 posts

Page Module Current ID


Jamroom Developers

RE: Page Module, custom profile pages:
--
We get the current module here:
$_sModuleURL = strtolower($_data['module_url']);
--
Question #1: Is the page ID "2" below unique per profile, or site wide?
Example: MySite/ProfileA/page/2/home
--
Question #2: Is there a JR variable that will give us ID or Name of current profile custom page being viewed?
$_sHOST = strtolower(parse_url($_sURI, PHP_URL_HOST));
We can use raw PHP like above, if we must, but prefer a JR variable.
updated by @softdesigns: 06/18/17 11:09:07PM
  19