Skip to main content
Recent Posts
33
Chit Chat / Docker, mysql, apache and connection
Last post by emanuele -
Hey all!
I've finally found some time to set up a NAS-like Frankenstein and I slapped on it unraid for testing it and see if it fits with what I had in mind.
And so I started immediately trying php and mysql to finally set up again a place I could use to develop some code (scared, right? :D ).
Though, I'm facing a bit of a problem with docker (that I'm quite the noob about) and can't understand most of the instructions I find on line...:joy:

So, I'm running unraid and installed 3 docker containers:
# ApachePHP8 (192.168.1.250 <-> 192.168.1.250)
# MariaDB (172.17.0.3 <-> 192.168.1.136)
# phpmyadmin (172.17.0.2 <-> 192.168.1.136)

The latest two talk happily and I can access the db from phpmyadmin, though the apachephp one doesn't connect to mariadb.
The only thing that differs are the IPs, mariadb and phpmyadmin have the same IP 192.168.1.136 and work on different ports, while the apachephp has its own 192.168.1.250.
Could it be that this is the issue?
Any idea how to convince mariadb docker to accept connections from php?
34
Addons / Re: [ADDON] SimplePortal
Last post by Steeley -
Quote from: Burke Knight –
Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';

One of my project programmers years ago was lamenting the code he inherited and was trying to "clean up"... told us in a progress meeting: "Until I put one of the nonsensical comments that I deleted back in, including all three trailing periods, the damn thing wouldn't compile!"  :confused:

:stuck_out_tongue:
38
Addons / Re: [ADDON] SimplePortal
Last post by Burke Knight -
Quote from: Spuds – That first one is strange since that variable does not appear on that line.

I found what it was. I removed the bit about drag & drop of the blocks on portal page.
However, I had removed the main call for javascript. (Starts around 237)

Code: (FULL) [Select]
// We use drag and sort blocks for the front page
$javascript = '';
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


That's what had removed, but in reality, this is what needed to remove:

Code: (CORRECT) [Select]
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';
40
Addons / Re: [ADDON] SimplePortal
Last post by Burke Knight -
On a new install, with ElkArte 1.1.9 Install and elk_simple_portal-1.0.2 I get an error when enable SP:

Code: [Select]
Type of error: Undefined
Warning: Undefined variable $javascript
/index.php?action=admin;area=portalconfig;sa=generalsettings
File: /allpoints.cc.nf/sources/subs/Portal.subs.php
Line: 240

I've had this issue on 2 sites, and had to disable Resize images on portal.


Also, when uninstall SP:

Code: [Select]
Type of error: General
Warning: require_once(/sources/subs/Portal.subs.php): Failed to open stream: No such file or directory
/index.php?action=admin;area=packages;sa=uninstall2;package=elk_simple_portal-1.0.2.zip;pid=2
File: /sources/admin/ManageSPortalModule.controller.php