Forum Activity for @developer-networks

Developer Networks
@developer-networks
01/11/24 02:07:51AM
566 posts

MAMP Setup


Jamroom Developers

Anyone develop on mac?
Developer Networks
@developer-networks
01/09/24 03:51:10PM
566 posts

MAMP Setup


Jamroom Developers

MAMP is a way to develop on a Mac and it runs apache, mysql, php and this error is happening on installation of Jamroom on a MAMP development environment.

https://www.mamp.info/en/mac/
updated by @developer-networks: 01/09/24 03:53:51PM
Developer Networks
@developer-networks
01/09/24 12:30:04PM
566 posts

MAMP Setup


Jamroom Developers

I tried to set up a localhost development site using MAMP today for mac and it gives me an error while trying to create the initial admin account.


Screen Shot 2024-01-09 at 12.23.53 PM.png Screen Shot 2024-01-09 at 12.23.53 PM.png - 189KB

updated by @developer-networks: 04/12/24 06:50:54AM
Developer Networks
@developer-networks
01/04/24 07:12:17PM
566 posts

URL from button in ACP


Jamroom Developers

Thank you both those answers are super helpful.

I couldn't make it back to look at the code today but I will hopefully soon.

We are trying to pass the configuration variable from the datastore in our module called "store_url" as a button in the modules ACP windows for the admin because we are bridging Jamroom to another API

So the URL they input in the config file of the module will simply take admins to that sub domain with the API bridged and logged in. Thanks
updated by @developer-networks: 01/04/24 07:18:10PM
Developer Networks
@developer-networks
01/02/24 08:32:24PM
566 posts

URL from button in ACP


Jamroom Developers

I thought you had a function for it and could help provide clarity where the docs are lackin'
Developer Networks
@developer-networks
01/01/24 10:00:45PM
566 posts

URL from button in ACP


Jamroom Developers

Is there videos on how to get the data from the datastore in jamroom? I tried the jrCore_get_setting function i found from reading your code to pull it... I looked for documentation or videos but there doesn't seem to be anything available but this one line

 $_temp = jrCore_db_get_item('xxFoo', $id);

do i use get item instead of get setting?



updated by @developer-networks: 01/01/24 10:14:16PM
Developer Networks
@developer-networks
01/01/24 08:39:16PM
566 posts

URL from button in ACP


Jamroom Developers

<?php
function myModule_redirect() {
    // Retrieve the value of the 'store_url' setting
    $myModule_store_url = jrCore_get_setting('myModule', 'store_url');

    // Check if the URL is valid before using it
    if (filter_var($myModule_store_url, FILTER_VALIDATE_URL) === false) {
        // Handle invalid URL (e.g., display an error message)
        echo 'Invalid Store URL';
        exit();
    }

    // Redirect to the store URL
    header('Location: ' . $myModule_store_url);
    exit();
}

updated by @developer-networks: 01/01/24 08:41:53PM
Developer Networks
@developer-networks
01/01/24 08:20:50PM
566 posts

URL from button in ACP


Jamroom Developers

I also tried...

<?php
// Redirect to another website
// $redirect_url = 'https://store.mysite.com/login?back=my-account';

$redirect_url = $_conf['myModule_store_url'] ;


header('Location: ' . $redirect_url);
exit(); // Make sure to exit after sending the header to ensure the script stops executing


and i also tried... 

$redirect_url = jrCore_get_setting('myModule', 'store_url');


but im not doing it right..
updated by @developer-networks: 01/01/24 08:33:46PM
Developer Networks
@developer-networks
01/01/24 07:17:03PM
566 posts

URL from button in ACP


Jamroom Developers

I get it working with this on the backoffice page view but i want to use the store_url from the module.
<?php
// Redirect to another website
$redirect_url = 'https://store.mysite.com/login?back=my-account';
header('Location: ' . $redirect_url);
exit(); // Make sure to exit after sending the header to ensure the script stops executing

Developer Networks
@developer-networks
01/01/24 06:37:04PM
566 posts

URL from button in ACP


Jamroom Developers

I created a function in the module init and I then put the name of the function in that place and it just tried to go to a page view of what the function was called.

So I put the function back on the view page backoffice.php and it has a 500 error.

Can you please provide an example of what you ment?

Where 'store_url' holds the name I saved in the config file to the datastore for the module with the URL.


Heres the code in the config file where i input the url
    $_tmp = array(
        'name'     => 'store_url',
        'default'  => '',
        'type'     => 'text',
        'validate' => 'url',
        'label'    => 'Store URL',
        'help'     => 'Enter the Store URL',
        'order'    => 1
    );
    jrCore_register_setting('myModule', $_tmp);


Thanks
updated by @developer-networks: 01/01/24 06:51:52PM
  3