GithubHelp home page GithubHelp logo

litotex / litotex-0.8 Goto Github PK

View Code? Open in Web Editor NEW
17.0 15.0 5.0 7.07 MB

Home Page: litotex.net

License: Other

PHP 79.55% JavaScript 8.28% CSS 6.05% ApacheConf 0.04% HTML 0.23% ASP 1.53% Shell 0.01% Smarty 4.31%

litotex-0.8's Introduction

Litotex-Developer Preview Version

This version is for developers who know what they are doing We don't assume liability of any kind For help, support or just talking, you can

  • visit our website at litotex.net (currently only german)
  • visit our github repository
  • or join our IRC-Cannel at Freenode

Your Litotex Team

Installation

  • Place your files properly (in most cases your webspace)
  • Copy the config files to their right place and adjust them

packages/core/config/const.php.dist -> packages/core/config/const.php packages/core/config/database.php.dist -> packages/core/config/database.php packages/core/config/path.php.dist -> packages/core/config/path.php acp/packages/core/config/const.php.dist -> acp/packages/core/config/const.php

You have to set LITO_ROOT and LITO_URL in this file You can use this on a Linux-Shell

cp packages/core/config/const.php.dist packages/core/config/const.php
cp packages/core/config/database.conf.php.dist packages/core/config/database.conf.php
cp packages/core/config/path.php.dist packages/core/config/path.php
cp acp/packages/core/config/const.php.dist acp/packages/core/config/const.php
  • Set write permissions (0777) to the following folders and create them if needed:

packages/core/cache/ files/cache/ files/packages/cache/ tpl_c/ acp/tpl_c/ log/

Or use this on a Shell:

mkdir packages/core/cache/ files/cache/ files/packages/cache/ tpl_c/ acp/tpl_c/ log/
chmod 777 packages/core/cache/ files/cache/ files/packages/cache/ tpl_c/ acp/tpl_c/ log/
  • Create a database (and adjust the settings in the config file) and import all data from dbUpdates/litotex.sql
mysql -D litotexDB -u litotexUser -p < dbUpdate/litotex.sql

Admin Login: Username:admin Password:admin

User Login: Username:tester Password:tester

litotex-0.8's People

Contributors

extremmichi avatar jnugh avatar linuxdoku avatar mkuh avatar quuery avatar sebix avatar secondtruth avatar sisosnoop avatar smoki23 avatar sonorc avatar wehmeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

litotex-0.8's Issues

Remove Basic_Entry

e.g.: Notice: Uninitialized string offset: 0 in packages\core\classes\userField.class.php on line 51

packages/core/classes/plugin.class.php error on line 128

Hey,

Error:

Warning: fopen(/litotex/packages/core/classes/userFields.plugin.cache.php) [function.fopen]: failed to open stream: Permission denied in /litotex/packages/core/classes/plugin.class.php on line 128

Ich glaube da wurde was falsch definiert ^^
Code wo der Fehler sein soll:

private final function _flushCache() {
    $file = fopen(dirname($this->_currentFile) . '/' . $this->_cacheLocation, 'w');
    if (!$file)
        return false;
    fwrite($file, time() . ';' . serialize($this->_cache));
    return fclose($file);
}

Class naming

  • Class names in CamelCase
  • Filenames must have exactly the same name as the class (+ '.class.php')

More Logging

The Logger is already implemented beginning with 74ce8f8, but actually only logins and Database queries are logged. So more logging is needed to make it useful for debugging, statistical evaluations and other use cases.

user, lastActive needs to be more exact

At the moment the users last activity is saved as

`````` YYYY-MM-DDbut to generate a "is user xy online" function we need a more exact time. At leastYYYY-MM-DD HH:MM```
better would be an unix timestamp.

Cache User/Group permissions

We need a caching for user and group permissions, the caching should be integrated into the user object as this will be recreated with the same data every call during a session.
A timestamp is needed to release the cache when a change in the permissions table was done.
+Rework Permission class (too much overhead)

Coding Style

Der Coding Style ist grundsätzlich gut, aber:

  • an manchen Stellen könnte man noch Leerzeilen einfügen, damit es besser zu lesen ist.
  • es sollte mehr und gründlicher dokumentiert werden.

installer::_patchDatabase: no output

                    try
                    {
                        if ($install)
                        {
                            $this->rollback();
                            $this->_patchDatabase(false, $blackList);
                        }
                    }
                    catch (exception $e)
                    {

                    }

should look like this

                    try
                    {
                        if ($install)
                        {
                            $this->rollback();
                            $this->_patchDatabase(false, $blackList);
                        }
                    }
                    catch (exception $e)
                    {
                        echo 'Fehler beim Patchen der Datenbank:<br />',  $e->getMessage();
                    }

Delete unneccessary packages

Wir sollten Pakete wie Screenshots, Spielregeln, AGB usw. löschen, da nicht jeder diese benötigt. Die Erstellung solcher Inhaltsseiten sollte der Benutzer selbst mithilfe des content-Pakets erledigen.

Language vars for JS

On the client side we need also language vars. But with smarty you can not place Smarty vars in JavsScript blocks. E.g.
<script>hello = {$hello};</script>
Because you have to put {literal} tags around.

My idea was creating a pseudo html tag which will be placed at the and of the HTML template. JavaScript parses and stores them in an object.
<language name="hello" value="Hallo" />

What do you think?

installer::_generateFileListReq nix besonderes aber sieht schöner aus

von :

    if (!file_exists($file . '/' . $fileAdd)) return false;
    if (!is_dir($file . '/' . $fileAdd))
    {
        return false;
    }
    $dir = @opendir($file . '/' . $fileAdd);

zu:

    $generateFile = $file . '/' . $fileAdd;
    if (!file_exists($generateFile)) return false;
    if (!is_dir($generateFile)) return false;
    $dir = @opendir($generateFile);

Exception class cleanup

Do we really need so many Exception classes? Can we merge (or even delete) some of them?

Due to #1 and #3 we have to additionally split them into separate files, so it's good if we don't have so many classes.

Optionen uns Combobox

Wir benötigen bei den Optionen eine Möglichkeit nicht nur Textwerte einzutragen, sondernn auch aus einer Liste einen Wert auszuwählen.
wichtig für Ja / Nein Optionen , oder eben auflistungen von mehreren Möglichkeiten.

/tpl directory

Grundsätzlich gefällt mir die Struktur des /tpl-Verzeichnisses, aber ich habe trotzdem ein paar Änderungsvorschläge.

/themes -> ersetzt /tpl (1)
   /<themename>
      /<package> -> inkl. 'core'
         /css
         /images -> ersetzt /img
/packages
   /<package>
      /js -> gehört nicht bei themes/tpl rein
      /templates
/lang -> gehört nicht bei themes/tpl rein (2)
   /<package>

(1) Ein "Template" ist von der Bedeutung her nicht das selbe wie ein Theme, Design oder wie man es auch nennt.
(2) vllt. sogar überflüssig (siehe #4)

Permission/Errorhandling system broken

Fatal error: Uncaught exception 'LitotexError' with message 'Sie haben nicht genügend Berechtigungen diese Seite zu betrachten.

DEVDEBUG active

Package:_castAction: /home/jonas/Dokumente/PHP/Litotex-0.8/packages/core/classes/Package.class.php:156

Package:__construct: /home/jonas/Dokumente/PHP/Litotex-0.8/packages/core/classes/PackageManager.class.php:407

PackageManager:loadPackage: /home/jonas/Dokumente/PHP/Litotex-0.8/packages/core/global.php:133

:require: /home/jonas/Dokumente/PHP/Litotex-0.8/index.php:35
' in /home/jonas/Dokumente/PHP/Litotex-0.8/packages/core/classes/Package.class.php on line 211 LitotexError: Sie haben nicht genügend Berechtigungen diese Seite zu betrachten.

Not sure what is going on!

Template {displayTplModification position=NAME}

Sobald ich in der DB "lttx1_tpl_modification_sort" das Modul Login bearbeite um es auf einer anderen Position anzeigen zu lassen, geht es nicht.

ALT: Login hat die Position -> right
NEU: Login hat die Position -> login

Template hat nun die Position

{displayTplModification position=login}

Leider wird dort nichts angezeigt.

Sobald ich aber Login auf top stelle wird es bei

{displayTplModification position=top}

angezeigt.

MFG
Simon

Date fromDbDate & fromDbTime are the same + Bug in fromDbTime

There's a bug (parameter in fromDbTime):

public static function fromDbDate($date){
    $dateTime = new DateTime($date);
    return Date($dateTime->getTimestamp());
}

public static function fromDbTime($time){
    $dateTime = new DateTime($date);
    return Date($dateTime->getTimestamp());
}

I think fromDbTime can be removed.

no access to ACP

Notice: Could not find package core_buildings which is needed by acp_buildings. The package will be deactivated automaticly! in packages\core\classes\packagemanager.class.php on line 525

Remove Basis_Entry

Okay, i am gonna remove Basis_Entry completely from Litotex.

As i have seen Basis_Entry is used in

  • tplModSort.class
  • userFields.class
  • userGroup.class

after removing this piece of s*** i will rewrite the acp usermanager, so we are over it.

Configuration cleanup

  • Constants should ALWAYS begin with LITO_*
  • Constants representing...
    • directories should end with *_DIR
    • files should end with *_FILE (?)
    • URLs should end with *_URL
  • Don't use relative paths: Prepend LITO_ROOT where neccessary
  • Paths shouldn't end with a slash, this is cleaner
  • Move constant DB_PREFIX from config/const.php to config/database.conf.php
  • Transform config/database.conf.php into a real PHP file with real variables (?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.