Skip to content

Commit

Permalink
email
Browse files Browse the repository at this point in the history
  • Loading branch information
barnaki committed Oct 24, 2024
1 parent 11cb055 commit 81a40b3
Show file tree
Hide file tree
Showing 10,835 changed files with 2,920,425 additions and 76 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions config/language/lang.array.en.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
"Rename_Directory" => "Rename Directory",
"Share_Directory" => "Share Directory",
"Share_With_Password" => "Share with password",
"Email" => "Email",
);
1 change: 1 addition & 0 deletions config/language/lang.array.ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
"Rename_Directory" => "Переименовать папку",
"Share_Directory" => "Открыть доступ",
"Share_With_Password" => "Открыть доступ - пароль",
"Email" => "Почта",
);
26 changes: 0 additions & 26 deletions module/Application/view/layout/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,6 @@ if(isset($_SESSION['user']))$user = $_SESSION['user'];
<script type="text/javascript" src="/jquery-ui1.12/external/jquery/jquery.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-03HREGPV42"></script>
<script>
typeof window.jQuery !== 'undefined' ? console.log(window.jQuery.fn.jquery) : 'jQuery not found!';
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-03HREGPV42');
$(function() {
var link = window.location.href;
var splitUrl = link.split('/');
var url = "";
if (splitUrl.length == 5) {
url = splitUrl[3] + "/" + splitUrl[4];
console.log(url);
} else {
url = splitUrl[3];
console.log(url);
}
$(".menu_link[href='/" + url + "']").css('border-bottom', '3px solid white');

})
</script>

</head>

<body id="body_os">
Expand Down
1 change: 0 additions & 1 deletion module/Application/view/layout/main.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ $this->translator = $GLOBALS["HELPERS"]["TRANSLATOR"];
<?php include dirname(__FILE__)."/windows/admins.phtml"; ?>
<?php include dirname(__FILE__)."/windows/blogs.phtml"; ?>
<?php include dirname(__FILE__)."/windows/frame.phtml"; ?>
<?php // include dirname(__FILE__)."/windows/payment.phtml"; ?>

<div id="window_frame_container" class="abs window" style="width:1200px;">
<div class="abs window_inner">
Expand Down
10 changes: 5 additions & 5 deletions module/Application/view/layout/parts/bar-bottom.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
Messages
</a>
</li>
<!-- <li id="icon_dock_admins">-->
<!-- <a class="bottom-bar-button" href="#window_admins">-->
<!-- Admin-->
<!-- </a>-->
<!-- </li>-->
<li id="icon_dock_admins">
<a class="bottom-bar-button" href="#window_admins">
Email
</a>
</li>
<li id="icon_dock_blogs">
<a class="bottom-bar-button" href="#window_blogs">
<img class="bottom-bar-button-image" src="assets/images/icons/blogs.png"/>
Expand Down
2 changes: 1 addition & 1 deletion module/Application/view/layout/parts/desktop.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</a> <a class="abs icon" style="left: 820px; top: 420px;"
href="#icon_dock_admins"> <img
src="assets/images/icons/admin-icon.png" />
<?php echo $this->translator["Admin"]; ?>
<?php echo $this->translator["Email"]; ?>
</a> <a class="abs icon"
style="left: 1120px; top: 100px; color: black" href="#icon_dock_frame">
<img src="assets/images/icons/iframe50.png" />
Expand Down
48 changes: 5 additions & 43 deletions module/Application/view/layout/windows/admins.phtml
Original file line number Diff line number Diff line change
@@ -1,64 +1,26 @@
<div id="window_admins" class="c-window r-border-box-area abs window">
<div class="c-window__inner _abs window_inner">

<div class="c-window__title-bar window_top">
<div class="c-window__title float_left">
<?php echo $this->translator["Admin"];?>
Email
</div>

<div class="c-window__window-controls float_right">
<span class="float_right">
<div class="float_right">
<a href="#" class="window_min"></a>
<a href="#" class="window_resize"></a>
<a href="#icon_dock_messages" class="window_close"></a>
</span>
<a href="#icon_dock_blogs" class="window_close"></a>
</div>
</div>




<div class="c-window__main _abs _window_content" id="admins_content">


<div class="c-window__tabs-wrap is-vertical-navigation _abs _window_content" id="admins_tabs">


<div class="c-window__tabs window_main user-tabs">
<ul class="c-window__tabs-inner">
<li class="c-window__tab"><a class="users-tab-link" href="#sliders">Sliders</a></li>
<li class="c-window__tab"><a class="users-tab-link" href="#blogs">Blogs</a></li>
<li class="c-window__tab"><a class="users-tab-link" href="#contact_form">Contact Form</a></li>
<li class="c-window__tab"><a class="users-tab-link" href="#main_page">Main Page</a></li>
<li class="c-window__tab"><a class="users-tab-link" href="#admins_list">Administators List</a></li>
<li class="c-window__tab"><a class="users-tab-link" href="#settings">Other Settings</a></li>
</ul>
</div>
<div class="c-window__tab-content" id="sliders">
</div>
<div class="c-window__tab-content" id="blogs">
</div>
<div class="c-window__tab-content" id="contact_form">
</div>
<div class="c-window__tab-content" id="main_page">
</div>
<div class="c-window__tab-content" id="admins_list">
</div>
<div class="c-window__tab-content" id="settings">
</div>
</div>
<iframe src="http://mail.octopus.local" height="600" width="1000" title="Email"></iframe>
</div>



<div class="c-window__status-bar _abs _window_bottom">
<div class="c-window__status-text">
<?php echo $this->translator["Admin"];?>
Email
</div>

</div>


</div>

<span class="abs ui-resizable-handle ui-resizable-se"></span>
Expand Down
4 changes: 4 additions & 0 deletions public/assets/css/desctop.css
Original file line number Diff line number Diff line change
Expand Up @@ -3111,3 +3111,7 @@ height: 30px;
width: 500px;
padding:15px;
}
#window_admins {

width: 1000px;
}
6 changes: 6 additions & 0 deletions subsystems/mailclient/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
We appreciate all feedback and support of the project.
Please use the issue tracker at GitHub to submit bug reports or feature requests:

https://github.com/cypht-org/cypht/issues

If you have questions, please join our chat at: https://gitter.im/cypht-org/community
211 changes: 211 additions & 0 deletions subsystems/mailclient/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
Requirements
------------

Cypht requires at least PHP 8.1, with the OpenSSL and cURL extensions. You will
also need PDO support if using any database features. Testing is done on
Debian and Ubuntu platforms with Nginx, Apache, standard PHP, and HHVM. We also
use Composer to manage our few PHP dependencies.

On Debian based systems you can bring in the dependencies this way;
$ sudo apt install php php-fpm php-mbstring php-curl composer

1. Download and prepare the code
--------------------------------

It's important to consider where you put the Cypht source. The web-server will
need read-only access to it, and moving it from one place to another requires
re-running the configuration script. Do NOT put the source in the document root
as this could create a security risk. On Debian, it's common to use the
/usr/local/share/ sub-directory for a situation like this. Here is short bash
script that will download the latest code, setup the correct permissions and
ownership, put the source in /usr/local/share/cypht
It requires sudo access:


#!/bin/bash

# this is where Cypht will be installed
DESTINATION="/usr/local/share/cypht"

# validate the destination directory
sudo test -r $DESTINATION -a -x $DESTINATION
if [ $? -ne 0 ]; then
sudo mkdir $DESTINATION
fi

# create working directory
mkdir cypht-temp
cd cypht-temp

# grab latest code
wget https://github.com/cypht-org/cypht/archive/master.zip

# unpack the archive
unzip master.zip

# run composer if it's there
if [ -x /usr/bin/composer ]; then
cd cypht-master && composer install && cd ..
else
echo "You may need to install php's composer."
fi

# fix permissions and ownership
find cypht-master -type d -print | xargs chmod 755
find cypht-master -type f -print | xargs chmod 644
sudo chown -R root:root cypht-master

# copy to destination folder
sudo mv cypht-master/* $DESTINATION

# remove working directory
cd ..
sudo rm -rf cypht-temp


2. Configure the program
------------------------

To configure Cypht for your environment, make adjustments to the .env file file according to your preferences. The .env file serves as the primary configuration file, eliminating the need to edit the previously used hm3.ini file.

First, copy the `.env.example` file to create a new `.env` file:
cp .env.example .env

Then edit the .env file to configure Cypht for your environment. If you choose to leverage a database for authentication, sessions, or user settings, ensure to complete the relevant sections within the .env file based on the information provided in the config/app.php file.

The necessary SQL commands for creating tables can be found in the config/app.php file, specifically starting from line 617 in the "DB Sessions" section.


Cypht needs read, and read-write access to a few directories on the server. For
security reasons these should NOT be inside the web-server document root. A
good place for these is under the /var/lib/ sub-directory. Here are the
commands To create the required directories per the default values in the ini
file (assuming your web-server software runs as the "www-data" user).

sudo mkdir /var/lib/hm3
sudo mkdir /var/lib/hm3/attachments
sudo mkdir /var/lib/hm3/users
sudo mkdir /var/lib/hm3/app_data

sudo chown -R www-data /var/lib/hm3/

The /var/lib/hm3/users directory is only required if you are using the
file-system and not a database to store user settings (user_config_type = file
in the config/app.php). You can put these directories anywhere, just make sure the
values in the config file point to the right place.


3. Generate the run-time configuration
--------------------------------------

Cypht utilizes a build process to create an optimized configuration and to combine and minimize page assets. Previously, after editing the hm3.ini file, the configuration and asset minimization were generated using the following steps:

cd /usr/local/share/cypht (or wherever you put the code in section 1)
sudo php ./scripts/config_gen.php

Recent updates have streamlined the process, and running the command above will now specifically generate the config/dynamic.php file. This file incorporates dynamic configurations, including 'handler_modules,' 'output_modules,' and 'input_filters.' Furthermore, the command continues to optimize the configuration and combine/minimize page assets, ensuring efficient runtime operation.

Additionally, executing this command will create a sub-directory called 'site' that contains the code and page assets required within the document root. If you ever relocate the source location, you'll need to re-run the config_gen script to update the program.


4. Enable the program in your web-server
---------------------------------------
The easiest way to serve Cypht is to symlink it to the web-server document
root. You can also copy the generated files to your web-server location, but
then you will need to re-copy them anytime the config_gen script is run. If the
source is located at /usr/local/share/cypht, and the web-server document root
is at /var/www/html, the following command will make Cypht available under the
"mail" path of the web-server:

sudo ln -s /usr/local/share/cypht/site /var/www/html/mail

Now going to https://your-server/mail/ should load the Cypht login page. Note
that If you use a symlink, your web-server must be configured to follow
symlinks.


5. Users
--------
Setting up users depends on what type of authentication you configure in the
config/app.php file. If you are using the local database configuration for users,
there are scripts in the scripts/ directory to help manage them:


# create an account
php ./scripts/create_account.php username password

# delete an account
php ./scripts/delete_account.php username

# change an account password
php ./scripts/update_password.php username password


6. Debug mode
-------------
Cypht has a debug or developer mode that can be used to troubleshoot problems
or enable faster development of modules. To enable the debug version of Cypht,
just sym-link the entire source directory instead of the site sub-directory:

sudo ln -s /usr/local/share/cypht /var/www/html/mail-debug

Debug mode is not as efficient as the normal version, and it is NOT designed to
be secure. DO NOT RUN DEBUG MODE IN PRODUCTION. You have been warned! Debug
mode outputs lots of information to the PHP error log that can be useful for
trouble-shooting problems. The location of the error log varies based on your
php.ini settings and web-server software.


7. Other INI files
------------------
Some Cypht modules necessitate additional configuration files for proper setup. It is crucial that these files are NOT located within the web-server document root. Certain modules may require configuration with a service provider, particularly those related to Oauth2 client setup (such as Github, WordPress, Oauth2 over IMAP for Gmail, and Outlook). After configuring related files, there is no need to rerun the config_gen script; the changes will be automatically merged into the main configuration settings.Alternatively, you can clear your app cache.

Github
Cypht can connect to github and aggregate notification data about repository
activity.

Example github.php file:
https://github.com/cypht-org/cypht/blob/master/config/github.php

Authorize an application for github:
https://github.com/settings/developers

OAUTH2 over IMAP
Gmail and Outlook.com support OAUTH2 authentication over IMAP. This is
preferable to normal IMAP authentication because Cypht never has access to your
account password.

Example oauth2.php file:
https://github.com/cypht-org/cypht/blob/master/config/oauth2.php

Authorize an application for gmail
https://console.developers.google.com/project

Authorize an application for outlook.com
https://account.live.com/developers/applications/

LDAP contacts
Cypht can use an LDAP server for contacts.

Example ldap.php file:
https://github.com/cypht-org/cypht/blob/master/config/ldap.php

WordPress
Cypht can aggregate WordPress.com notifications.

Example wordpress.php file:
https://github.com/cypht-org/cypht/blob/master/config/wordpress.php

Authorize an application for WordPress.com:
https://developer.wordpress.com/apps/

Custom themes
You can create your own themes for Cypht. Edit the themes.php file to include
your theme, and put the css file in modules/themes/assets.

https://github.com/cypht-org/cypht/blob/master/config/themes.php

Having problems?

We are happy to help trouble-shoot any installation issues you run into. Send a
message to https://gitter.im/cypht-org/community and we will get back to you as soon as we can.
Loading

0 comments on commit 81a40b3

Please sign in to comment.