creatiwity / witycms Goto Github PK
View Code? Open in Web Editor NEWInnovative CMS in PHP to easily build a website
Home Page: https://creatiwity.net
License: MIT License
Innovative CMS in PHP to easily build a website
Home Page: https://creatiwity.net
License: MIT License
WSystem garde les instances de WSession, WTemplate et WDatabase sou sforme de singleton.
Pourquoi ne pas déporter ces fonctions dans leurs classes respectives, comme de vrais singletons ?
Au lieu de faire WSystem::getSession(); on ferait WSession::getInstance(); De même pour les 3 autres classes.
Qu'en penses-tu ?
Cette variable sert-elle à quelque-chose ? Il ne me semble pas.
News application has no front part, so we'll need to do one.
PHP Error : Notice: Array to string conversion in C:\wamp\www\Wllta\system\WTemplate\WTemplate.php(160) : eval()'d code on line 78
Notice: Undefined index: hash in C:\wamp\www\Wllta\system\WCore\WSession.php on line 57
Hello Julien,
Some months ago, i created a changelog txt file in the root directory in order to list all modifications made to wityCMS but I failed maintaining this file up to date :p
What do you think about this file?
Add a new bootstrap-based theme for admin and system theme.
Implement an automagically generated Control Panel for each application.
News et User pour commencer...
Je me demandais si on ne pouvait pas envisager d'automatiser l'initialisation des classes système grâce à l'autoload de PHP 5.3 ?
Voilà un article très intéressant sur le sujet http://forum.phpfrance.com/vos-contributions/autoload-php-avec-sans-namespace-t254834.html
Pour une appli, l'en-tête d'un fichier doit-il ressembler à ceci ?
<?php
/**
* User Application - Controller - /apps/user/front/main.php
*/
defined('IN_WITY') or die('Access denied');
/**
* UserController is the front Controller of the User Application
*
* @package Apps
* @author Johan Dufau <[email protected]>
* @version 0.3-29-01-2013
*/
class UserController extends WController {
Quand on est sur l'action par défaut (exemple : news/ ou news/listing qui est la même page) selon le lien utilisé, on reçoit un getArgs() différent. C'est plutôt gênant puisqu'on a besoin de cette donnée pour le tri des news par exemple.
Est-ce qu'on aurait pas un moyen de stocker dans config l'action demandée et l'enlever des résultats donnés par getArgs() ? Quitte à implémenter une méthode qui retournerait l'action en cours. Qu'en penses-tu ?
Création d'un éditeur dynamique permettant de placer dynamiquement des applications dans les Blocks définis dans le thème.
Relatif à #38.
Ligne 20 on crée USERS_TABLE, mais on ne l'utilise pas toujours.
WForm est la passerelle qui est chargée d'une part, de mettre en forme les formulaires lors de leur génération coté serveur et de fournir un set de vérifications dynamiques à la saisie coté client, en cohérence avec ce que le développeur a pu demander.
D'autre part c'est la passerelle qui va dispatcher les inputs reçus entre les différentes applications concernées.
Relatif au Rendering multi-app (#8)
Sometimes we need to use {} inside a javascript call in the template file and we can't use {} properly because of the template compiler.
There is a way to do it with // I think but it's not intuitive. Why not simply ignoring the node and writing it as is in the output string ?
I think that it's time to talk about connecting applications in a better way than including some files.
For example, in the "accueil" app :
// News loading
include APP_DIR.'news/front/model.php';
$newsModel = new NewsModel();
foreach ($newsModel->getNewsByCat(array('home'), 0, 1) as $news) {
$news['date'] = substr($news['date'], 0, 10);
$this->view->tpl->assignBlockVars('news', $news);
}
This implementation can cause some problems :
That's why I purpose another way to do this connection, I hope a better way.
Considers that we are in our "accueil" script :
$parameters = new array();
$parameters['filter'] = new array('category' => 'home');
$parameters['model'] = new array('id','title','content','date','author');
$newsTriggerResponses = WTrigger::signal('news',$parameters);
foreach($newsTriggerResponses as $appResponse) {
echo 'Application name: '.$appResponse['name'];
echo 'Application version: '.$appResponse['version'];
echo 'Application API compatibility: '.$appResponse['compatibility'];
//$appResponse['content'] contains the content which follows the model previously given
echo '\n';
}
It returns the following:
Application Name: "News"
Application Version: "1.0"
Application API compatibilty: 1
Application Name: "Newsletter"
Application Version: "0.5"
Application API compatibilty: 2
Compatibility level shows if the response given is completely as it was asked.
For example Newsletter application can give responses to 'news' signal but with no 'author' datas, so it returns the content without it. So compatibility level is set to 2.
We could imagine that the behavior of the signal method can be changed thanks to some others variables in its call.
For example a 'strict' mode which returns only compatibility level 1 responses, or a 'verbose' response which could return a compatibility level 0 if the application wasn't able to respond with these arguments (could be useful for a debug mode I suppose).
What is in WTrigger ?
It has to contain a list of all signals and slots contained in all the applications that could response to a specific signal.
That's why we need something like another file that could contain these links that could be periodically parsed by WTrigger in order to have a dynamic list of all these connections.
To be continued by someone.
What about allowing applications to create some dynamic permissions ?
For example for the news application it would be the category list. It would be really interesting to extend the actual permission system.
I think we could add a variable in the future application control panel to say if the website administrator want to use the extension (only with compatible applications). Each application which want to use this system should provide an entry point in it's model (or controller by WTrigger ?) in order to get the model (list of ids, related short names and eventually if needed a longer description). This entry point should be in the manifest if it's possible to use a permission extension.
It remains some questions : should we use a white list or a black list ? Should we give the administrator or the application conceptor the choice between these two options ? Is there a need to implement a hierarchical relation between permission ? (for example between news_listing and it's categories)
What do you think about this idea ?
In App/User, display a message if the session cookies were not created.
With the last update of WTemplateCompiler which removes the fact that brackets are mandatory to wrap variable in loops, it introduced an issue:
{for $cntry in glob('themes/system/images/flags/*')}
disfunctions since glob(...)
does not start with a $
so the all string was ignored.
Tu trouves pas ça gênant que les actions de l'admin soient accessibles depuis manifest.xml ?
L'inclusion d'une boucle dans une autre semble empêcher l'autre de fonctionner.
C'est sans aucun doute un problème d'index lors de la compilation, il faudrait "exploder" la variable array déclarée dans le for selon le caractère ".".
{for $registration in $registrations}
{for $count,$archer in $registration.archers}
...
{/for}
{/for}
Je pense qu'il manque quelque chose comme ça dans le "compiler" :
$levels = explode(".",substr($array, 1));
$array = "\$this->tpl_vars";
foreach ($levels as $level) {
$array .= "['".$level."']";
}
Je continue les investigations, pull request à venir à moins que je ne fasse fausse route ? ^^
Si j'ai bien compris, avec le moteur de template actuel, une instance de WTemplate ne peut compiler qu'une seule et unique application par render ?
Il serait donc intéressant de voir où peut se situer la multiplicité des rendering d'application :
Il faudrait pouvoir mettre plusieurs emplacement d'applications dans le thème, voire avoir la possibilité d'éclater le thème en plusieurs parties suivant l'état de la page.
Qu'en penses-tu ?
Je sais pas si t'as déjà reçu un email quand j'ai créé la page ou pas ^^
Mais tu pourrais me donner la procédure pour mettre à niveau une branche à partir d'une autre ?
News application will be modernized.
Je ne sais plus comment tu fais pour faire ça ^^. Ca serait pratique pour faire un render d'une popup chargée en ajax.
Il me semblait qu'actuellement tu passais par le WTemplate en direct pour faire ça mais je ne me souviens plus trop...
WNote will be enhanced to be able to send mail, keep debug trace, automatically display a block alert or a simple alert ...
For some errors, the email handler is used to send an email notification to the developper or webmaster, based on the email provided in config.php.
When no email software installed on server, php tries to send the mail anyway and I don't what it tries to do but it is very slow.
I don't know how to fix this one because it is impossible to stop php from sending the email.
Possibilities:
As discussed during the pull request, analyse the debug stack and find where the error occured (2 lvls upper).
Implémenter un système de signaux afin que les applications qui le souhaitent puisse écouter des actions bien déterminées effectuées par d'autres applications.
Par exemple une application de News qui pourrait proposer automatiquement la création d'un article relatif à l'ajout d'un album photo.
Implements a photo galery.
Can't delete category from NewsAdmin because cat_del isn't listed in the manifest.
WARNING : Deleting a category can let some news with an inexistent category.
Ces blocks doivent permettre de placer des morceaux d'applications à d'autres endroits que la où se situe la balise {include} unique actuelle.
Implements a persistent ajax console to help debugging applications.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.