En particulier en affichage mobile, il n'était pas facile de voir quelle
catégorie ou flux on était en train de lire. Ce patch l'affiche sur la
ligne du jours, avec une suggestion de style.
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)