Paging now works even when many entries have the same date.
SQL speed could probably be improved by testing first on date, and then
on CONCAT.
Also, having an index on date would probably help too.
In the current SQL request with LIMIT, if many dates are identical, the
pagination may not work properly. Added a little more tolerance, but
will have to be solved better.
- jQuery updated from version 1.5.2 to 1.10.2 (checked that it is ok
with jQuery Migrate Plugin)
- Put hide_posts() first to avoid flashing content during load
- Big speed optimisation of init_img()
- Use a single on() delegated event (jQuery 1.7+) instead of all
per-article click events as described on http://api.jquery.com/on/
- Moved all the per-article click events to an outside function
init_stream_delegates() that is called only once even when new articles
are dynamically added. Much lighter approach, and does not require
unbinding events and rebinding them at each dynamic load.
- Side effect: corrected the bug of favourites and read/unread that were
not properly unbound during dynamic loading.
- Corrected a JavaScript error for auto_load_more when #load_more is not
visible and therefore does not have a position() defined.
This patch is to make search work again after the new SQL optimisations,
by removing some of the optimisations when searching is used.
Optimisation of search is left for some future work.
The whole base is indeed transfered from MySQL to PHP, which is not
good.
Big effect (on speed and memory), but few changes :-)
Drastically reduced the number of SQL requests needed (from 233 down to
8 to load the home page with my own data set = 140 feeds in 15
categories).
Drastically reduced the amount of data transferred from MySQL to PHP.
Provide better access to the link of the article, and allow
control-click on the title to e.g. open in a background tab, without
having to reach the little link icon on the far right.
Use the faster str_replace() and str_ireplace() instead.
From http://www.php.net/manual/function.str-replace.php : "If you don't
need fancy replacing rules (like regular expressions), you should always
use this function instead of preg_replace(). "
The content seem to be already HTML safe, e.g. for some feeds in UTF-8
with HTML special characters encoded, for some other feeds with all
eligible characters HTML-encoded
La barre contenant le lien connexion/déconnexion est supprimée (sauf en
vue mobile)
Le lien connexion se trouve à la place de la roue des paramètres
Le lien déconnexion se trouve dans la liste des actions en cliquant sur
la roue des paramètres
*** ATTENTION, MODIFICATION DE LA BDD ***
Cette option permet de garder les vieux articles d'un flux en même s'ils
sont plus vieux que la limite des X mois d'historique (3 par défaut)
Les modifications de la base de données :
- ajout du champ "keep_history int(1) DEFAULT 0" à la table feed
- suppression des champs "is_public" et "lastUpdate" de la table entry
(n'étaient plus utilisés de toute façon)
Désormais, en cliquant sur une catégorie ou un flux, une "popup" s'ouvre
nous proposant les flux à lire directement. Les mêmes actions que la vue
normale sont alors possibles
Cela a impliqué de gros changements javascript en aval puisque les
articles n'étaient plus repérés en fonction de la fenêtre, mais en
fonction du popup (#panel)
Le code va vraiment devoir être repris pour avoir une architecture
logique (voir issue #121)
+ Début fix issue #130 : en cliquant sur une catégorie ou un flux, on
repasse en mode de vue "normale" pour pouvoir lire les articles
Ce n'est qu'un début :)
Ajout du système de token pour accéder aux flux RSS même quand la
connexion a été paramétrée.
Pour l'utiliser, il faut simplement ajouter le paramètre
?token=<votre_token> à l'url
Le token permettra d'accéder aux flux RSS cachés derrière une
authentification
L'option load more permettra de ne pas charger automatiquement les
articles suivants une fois arrivé en bas de la page
Le raccourci pour passer à l'article suivant charge automatiquement les
articles suivants si on vient d'ouvrir le dernier article de la page
Il reste à rajouter une option pour les charger si on se trouve en bas
de la page
Ajout de la date et du lien vers site externe au pied des articles
Modification comportement raccourci "up" : si la fenêtre est sous
l'article actif, on remonte en haut de cet article. Si la fenêtre est au
début de l'article actif ou au-dessus, on remonte en haut de l'écran
Réorganisation de quelques options, mise en évidence des groupes
d'option
Changement des flux de catégorie via <select /> et non plus via liste de
<radio />
Ajout de la structure pour l'utilisation de SQLite. Tout n'est pas
fonctionnel, loin de là, certaines requêtes SQL ne passent pas.
Pour essayer tout de même, décommenter le bloc TODO dans le fichier
public/install.php
Un petit bug faisait qu'un article marqué comme lu pouvait repasser en
non lu même en mettant le paramètre "only_not_read" à true pour la
fonction mark_read.
L'ouverture d'un article sur le site d'origine via le raccourci
fonctionne de nouveau normalement
Lorsque la connexion est paramétrée et la lecture anonyme autorisée, une
personne non connectée pouvait avoir l'impression de marquer des
articles comme (non) lus (mais ça n'était pas effectif après un
rafraichissement de la page). Les articles ne peuvent plus être marqués
désormais
En rapport avec l'issue #95 : je ne prends pas officiellement en charge
les menus fixes, mais comme on me l'a demandé, j'ajoute un <span /> en
bas de la colonne des flux si ça peut aider
Fix issue #96 : on peut désormais choisir un préfixe aux tables de la
BDD lors de l'installation
Fix issue #115 : échappement des guillemets pendant la phase
d'installation
Fix issue #116 : le thème de l'installateur est désormais accessible
FIx issue #117 : rajout du test de la présence DOMDocument lors de
l'installation. Si non présent, on peut pas accéder aux flux RSS.
Normalement fourni sur un système RedHat-like par le paquet php-xml
Désormais il est possible de créer des thèmes. Le thème peut être changé
sur la page de configuration. Les thèmes sont détectés grâce à un
fichier metadata.json détaillant le nom du thème, son auteur, une petite
description et une version.
Un nouveau thème "Flat design" a été ajouté et est pleinement
fonctionnel
Passage en Minz_Cache et Minz_Log
Permet d'éviter les redondances quand ces classes sont déjà définies
Je n'utilise pas d'espace de nom parce que beaucoup de boulot et
nécessite obligatoirement php 5.3
Si d'autres classes nécessitent cette modification je le ferai au fur et
à mesure qu'on me remontera les soucis
La version de Minz pour FreshRSS n'est plus compatible avec la version
distribuée à part
Modification de la zone du viewport qui faisait toute la taille de
l'écran. Désormais le viewport va du haut de l'écran jusqu'à sa moitié
Modification de la zone de marquage en la réduisant : début au 3/4 de
l'article et fin 50px plus loin (ou bas de l'article si dépasse)