Skip to main content
Recent Posts
31
Addons / Re: [ADDON] PDF Print
Last post by Spuds -
This ElkArte addon replaces the default print button with a create PDF.   Clicking the PDF button will output a PDF to the browser of the current topic, including images, attachments, and links.  The user can then print or save the PDF.

The package file is large due to the included TTF fonts, so your server will need to support uploads of 5M ... if not use the download from addons site option as outlined below.

Here is what is new in V1.2.1

  • Address various issues with PHP 8.2
  • Update tfdpf library to the latest (improved PHP 8.2 support)
  • Improved processing / formatting of ILA and Gallery images
  • Change to use DomDocument instead of the simple dom php library

To get the addon you can do one of two things:
  • You can download the file from the Addons site and then upload that file to your server
    • Admin > Packages > Upload > Select the zip file you just downloaded > Upload
  • Or Download it directly to your site
    • Admin > Packages > Download Package > click "Browse" by "ElkArte Third-party Add-ons Site", expand Enhancement > Print to PDF > [Download] (use the button)
32
Chit Chat / Re: Docker, mysql, apache and connection
Last post by Spuds -
I should note, in that setup the  $db_server  would be:drum:  db  that is what you would use in something like Settings.php
when to use adminer you would navigate to 123.123.123.123:8080
and sphinx server would be:drum:  sphinx
and mailhog (a way to test smtp) would be at 123.123.123.123:8025 and you would setup the mail server as 123.123.123.123 port 1025 in the ACP
35
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?
36
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:
40
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 = '';