added newsletter

This commit is contained in:
Joeri de Bruin 2026-04-21 11:25:55 +02:00
parent 5fc1c6bdae
commit 63cb6c3723
8 changed files with 729 additions and 1101 deletions

View file

@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt -y install perl cpanminus libaspell-dev make libdbd-mysql-perl libdigest-perl-md5-perl libxml-simple-perl \
libmodule-install-perl gcc libperl-dev default-libmysqlclient-dev libpng-dev build-essential libgd-dev mariadb-client imagemagick \
libpng-dev libjpeg-dev libtiff-dev libapache2-mod-perl2 libapache2-mod-perl2-dev libapache2-request-perl libimage-magick-perl vim \
apache2 apache2-utils
apache2 apache2-utils mailutils
RUN cpanm --notest --force \
@ -79,6 +79,7 @@ RUN cpanm --notest --force \
List::MoreUtils \
Locales \
Log::Log4perl \
Mail::DeliveryStatus::BounceParser \
MIME::Tools \
Module::Find \
Monkey::Patch \
@ -140,6 +141,7 @@ RUN cpanm --notest --force \
common::sense \
namespace::autoclean
RUN apt -y remove libjson-xs-perl
#RUN cpanm --notest --force \
# DBD::mysql@4.051

View file

@ -29,8 +29,16 @@ for configfile in `perl -Ilib sbin/wgd for-each`;do
## perl -Ilib sbin/wgd db --config-file=www.example.com --webgui-root=/data/WebGUI
#install newsletter module
perl -I /data/WebGUI/lib -I /data/WebGUI/custom/webgui_newsletter/lib /data/WebGUI/custom/webgui_newsletter/sbin/install_icons.pl --customRoot=/data/WebGUI/custom
cd /data/WebGUI/lib
perl -I /data/WebGUI/lib -I /data/WebGUI/custom/webgui_newsletter/lib /data/WebGUI/custom/webgui_newsletter/sbin/install_newsletter.pl --configFile=www.example.com.conf
fi
done
perl -I/data/WebGUI/lib sbin/spectre.pl --daemon

View file

@ -1,6 +1,6 @@
<VirtualHost 0.0.0.0:80>
ServerName www.example.com
ServerAlias webgui localhost example.com unitedknowledge.vps2.unitedknowledge.net www.unitedknowledge.eu unitedknowledge.eu www.united-knowledge.eu united-knowledge.eu www.unitedknowledge.net unitedknowledge.net
ServerName localhost
ServerAlias webgui www.example.com example.com unitedknowledge.vps2.unitedknowledge.net www.unitedknowledge.eu unitedknowledge.eu www.united-knowledge.eu united-knowledge.eu www.unitedknowledge.net unitedknowledge.net
DocumentRoot /data/WebGUI/www
SetEnvIf SSLPROXY "1" \
SSLPROXY

View file

@ -4,7 +4,7 @@
# system is capable of. To unleash the full power read the config file manual
# http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/Config.html
log4perl.logger = ERROR, mainlog
log4perl.logger = WARN, mainlog
log4perl.appender.mainlog = Log::Log4perl::Appender::File
log4perl.appender.mainlog.filename = /var/log/webgui.log
log4perl.appender.mainlog.layout = PatternLayout

File diff suppressed because it is too large Load diff

View file

@ -155,6 +155,7 @@ sub loadSiteData {
}
else {
my $siteData = {};
print "Reading site configs. $url responded with: " . $response->content . "\n";
eval { $siteData = JSON::decode_json($response->content); };
if ($@) {
$self->error("Couldn't fetch Spectre configuration data for $key : $@");

View file

@ -19,7 +19,7 @@ use WebGUI::Asset;
use WebGUI::Form;
use WebGUI::Utility;
use WebGUI::International;
use JSON;
use JSON -convert_blessed_universally;
our @ISA = qw(WebGUI::Asset);
@ -664,9 +664,10 @@ EOHTML1
if ( $ask ) {
$config->{mode} = "none";
}
$self->session->log->debug("config: $config->{mode} ");
$out .= $self->getLoadPlugins;
$out .= "\ttinyMCE.init(" . JSON->new->pretty->encode( $config ) . " );\n";
$out .= "\ttinyMCE.init(" . JSON->new->allow_blessed->pretty->encode( $config ) . " );\n";
$out .= "</script>";
}

View file

@ -233,7 +233,7 @@ sub crud_createTable {
my $tableName = $class->crud_getTableName($session);
$class->crud_dropTable($session);
$db->write('create table '.$dbh->quote_identifier($tableName).' (
'.$dbh->quote_identifier($class->crud_getTableKey($session)).' CHAR(22) binary not null primary key,
'.$dbh->quote_identifier($class->crud_getTableKey($session)).' CHAR(22) binary not null default "" primary key,
sequenceNumber int not null default 1,
dateCreated datetime,
lastUpdated datetime
@ -468,7 +468,7 @@ sub crud_updateTable {
my $notNullClause = ($isKey || $defaultValue ne "") ? "not null" : "";
my $defaultClause = '';
if ($fieldType !~ /(?:text|blob)$/i) {
$defaultClause = "default ".$dbh->quote($defaultValue) if ($defaultValue ne "");
$defaultClause = "default ".$dbh->quote($defaultValue);
}
if (exists $tableFields{$property}) {
my $changed = 0;