Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#109 2012-05-24 05:01:45
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_matrix – Multi-article update tabs
Bloke, mrdale, redbot – glad you like it!
Bloke wrote:
A minor request for the next version, if I may be so bold. Instead of assuming that the lifecycle event fires on install, would it be possible to call the installation routine if you find the table’s missing when visiting the adi_matrix_admin page, instead of returning the ‘not installed’ message?
That’s how I used to do it … but then lifecycle events came along & gradually I’ve been changing all my plugins to use them!
The reason is twofold:
- If someone puts adi_matrix in the cache dir, the lifecycle event doesn’t fire.
- The new version of the plugin composer I’m working on has the ability to install plugins directly from the composer’s panel (skipping the preview step, btw) and you can choose to inhibit the lifecycle event on install, as well as have the plugin auto-enable itself.
Forgive the naive/ignorant/idealistic question but isn’t the plugin cache directory for developing plugins, rather than for production use?
In both situations, there’s potential for the plugin to be left in a half-installed limbo state with no way (that I can find: please educate me if I’ve missed something) of getting the table created, besides uninstalling and reinstalling conventionally (or re-uploading with the composer’s ‘run post-install lifecycle’ radio button switched on). Having the plugin do a check-and-install-if-not-installed when the tab is visited gives both groups of people a get-out clause so they can enjoy the plugin in all its glory.
Nil desperandum! The plugin does detect if it’s not “installed” & should automatically add an extra entry under the Extensions tab called “adi_matrix options”. In there is the Textpack stuff (what you’d normally see in the plugin options page) as well as an install button. This is how I get it to install/uninstall when I’m developing from the plugin cache. Would this suitable for your purposes?
Offline
#110 2012-05-24 10:50:57
Re: adi_matrix – Multi-article update tabs
gomedia wrote:
isn’t the plugin cache directory for developing plugins, rather than for production use?
In theory yes. But maniqui thinks otherwise :-) I don’t think there’s any inherent problem with running cache_dir plugins on a live site. Might be wrong.
The plugin does detect if it’s not “installed” & should automatically add an extra entry under the Extensions tab called “adi_matrix options”.
Hmmm, I don’t see that, hence my (probably ill-conceived) question. On the Extensions tab all I see is Article Matrix and when I click it I get a “Not Installed” message as it tries to run ?event=adi_matrix_admin
. The Options page takes me to ?event=plugin_prefs.adi_matrix
where I see “adi_matrix Not installed”. Might just be me not using my eyes properly.
Last edited by Bloke (2012-05-24 10:56:09)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#111 2012-05-24 12:51:01
Re: adi_matrix – Multi-article update tabs
gomedia wrote:
isn’t the plugin cache directory for developing plugins, rather than for production use?
I would say it’s for developers, which is what Textpattern users in general are (if you aren’t one, you really shouldn’t be using Textpattern). The way Textpattern manages plugins isn’t exactly ideal if you ask me. Evaluating large blocks of code with eval() isn’t best for the performance, and the procedure isn’t SCM friendly. As many of us use SCMs, we do not use the database to install plugins. It’s not feasible. Would make development so-so-so tiresome.
Bloke wrote:
A minor request for the next version, if I may be so bold. Instead of assuming that the lifecycle event fires on install, would it be possible to call the installation routine if you find the table’s missing when visiting the adi_matrix_admin page, instead of returning the ‘not installed’ message?
I’ve taken the approach of making the installer functions to follow same rules in all my plugins. With the help of OOP it becomes like a small API which allows installing plugins manually with single line of PHP. All rah-plugins that have a similar static installer method called install wrapped in a class named after the plugin (rah_plugin_name::install(event, step)
).
If the installer doesn’t run for reason or other (or if I drop the fallback installer call at later date in favor of only plugin lifecycle callback), users can install any of the plugins very easily by placing code to their page template, or using something like rah_teriminal to run following;
rah_plugin_name::install();
Where rah_plugin_name
is the name of the plugin installed/updated, e.g. rah_terminal::install()
. The main reason for that is, tho, development versions and re-running installer manually when doing changes to database structure. Normally the installer is only ran on version changes (plugins don’t have the file checksums to work on, and manual version updating on every commit is generally bad practice), which is where the class comes into play. The installer also allows version bumping.
rah_terminal::$version = '0.3-newversion';
rah_terminal::install();
Which forces the installer to re-run the process using different number despite the currently installed version. Reverting changes is possible too:
rah_terminal::install('deleted');
It’s nothing more than naming conversion and styling (well, skeleton) but makes it consistent and easier to use, even for those that aren’t developing the plugins and are just loading plugins by alternative ways.
Offline
#112 2012-05-24 15:14:15
Re: adi_matrix – Multi-article update tabs
Hello Adi,
Thank you for improvements to your plugin.
I thought being a small project manager/ToDo List with Textpattern.
I thought the project could be a sticky article, and requests/sprint are articles, put in relation with a ‘custom field’ which would contain the id of the sticky article.
Is it easy to change/hack this plug’in to display a articles matrix with the same value for a custom_field?
Thanks
Offline
#113 2012-05-24 23:12:27
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_matrix – Multi-article update tabs
gomedia wrote:
The plugin does detect if it’s not “installed” & should automatically add an extra entry under the Extensions tab called “adi_matrix options”.
Bloke wrote:
Hmmm, I don’t see that, hence my (probably ill-conceived) question. On the Extensions tab all I see is Article Matrix and when I click it I get a “Not Installed” message as it tries to run
?event=adi_matrix_admin
. The Options page takes me to?event=plugin_prefs.adi_matrix
where I see “adi_matrix Not installed”.
Sorry Stef, the above covers scenario 1 – where the plugin is loaded from the plugin cache.
For your second scenario, where you’ve installed the plugin but the lifecycle events are being disabled, the quickest workaround would be to:
- Go to the adi_matrix Options page
- Tack
&step=install
onto the end of the URL (i.e. after?event=plugin_prefs.adi_matrix
) & hit return
In future versions I’ll continue to use lifecycle events but I’ll restore the install button in the Options page, to give users a second chance.
Offline
#114 2012-05-25 01:25:21
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_matrix – Multi-article update tabs
sacripant wrote:
Is it easy to change/hack this plug’in to display a articles matrix with the same value for a custom_field?
Hi sacripant. The short answer is no. The longer answer is maybe in the future. Currently, you can select articles based on the values of categories, authors & keywords but not custom fields. It’s something I’ll consider though.
Offline
#115 2012-06-05 21:36:57
Re: adi_matrix – Multi-article update tabs
Hi Adi
I am using your plugin in one of my project, and found a little limitation: we havent the possibility to change article title!
hope in next release it will be included.
Cheers
Offline
#116 2012-06-05 23:02:48
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_matrix – Multi-article update tabs
Dragondz wrote:
… we havent the possibility to change article title!
hope in next release it will be included.
Yep, it’s on the list.
Offline
#117 2012-08-31 03:35:40
Re: adi_matrix – Multi-article update tabs
Wow. This plugin sounds awesome. I’m definitely going to try it out.
Might it be possible in the future to have a version of adi_matrix for the Images Tab? It sure would come in handy to be able to add and edit a bunch of image alt and caption text without having to go one by one, back and forth.
Offline
#118 2012-08-31 04:32:28
Re: adi_matrix – Multi-article update tabs
photonomad wrote:
Might it be possible in the future to have a version of adi_matrix for the Images Tab? It sure would come in handy to be able to add and edit a bunch of image alt and caption text without having to go one by one, back and forth.
+1
Offline
#119 2012-09-04 11:37:20
Re: adi_matrix – Multi-article update tabs
Hi Adi.
Here is the French Textpack file. Consider this one much better than which I’ve sent you today (some words have a starting/final blank space required ;):
# Textpack for adi_plugins (www.greatoceanmedia.com.au/txp)
# - English language strings bundled with plugin, all others in this textpack
# - Translator: Patrick LEFEVRE <patrick[dot]lefevre[at]gmail[dot]com>, 04/09/2012
# - please submit corrections/additions at www.greatoceanmedia.com.au/textpack, thanks
#@public
#@language fr-fr
adi_alphabetical => Alphabétique
adi_any_category => Toutes les catégories
adi_article_data => Données de l'article
adi_article_matrix => Matrice d'article
adi_article_highlighting => Mise en évidence du titre de l'article
adi_article_limit => Nombre maximum d'articles
adi_articles_not_modified => Aucun article n'a été modifié
adi_article_selection => Sélection d'article
adi_article_tooltips => Info-bulle du titre de l'article
adi_article_update_fail => Échec de mise à jour de l'article
adi_articles_saved => Articles enregistrés
adi_cancel => Annuler
adi_any_child_category => toutes les catégories enfants
adi_default_sort => Classement par défaut
adi_display_article_id => Afficher l'ID des articles
adi_expiry => Expiration
adi_footer => Footer inclus
adi_has_expiry => a expiré
adi_include_descendent_cats => Inclure les catégories descendantes
adi_install_fail => Impossible de désinstaller
adi_installed => Installé
adi_invalid_timestamp => Horadatage invalide
adi_jquery_ui => Fichier javascript de jQuery
adi_jquery_ui_css => Fichier CSS de jQuery UI
adi_logged_in_user => Utilisateur connecté
adi_matrix => Matrice
adi_matrix_admin => Gestionnaire des matrices d'article
adi_matrix_cfs_modified => Liste des champs personnalisés modifiée
adi_matrix_delete_fail => Échec de suppression de la matrice
adi_matrix_deleted => Matrice supprimée
adi_matrix_input_field_tooltips => Infos-bulle sur les champs de saisie
adi_matrix_validation_error => Les champs invalides ont été ignorés
adi_matrix_name => Nom de la matrice
adi_matrix_update_fail => Échec de mise à jour des paramètres de la matrice
adi_matrix_updated => Paramètres de la matrice mis à jour
adi_no_category => Pas de catégorie
adi_no_expiry => Pas d'expiration
adi_not_installed => Non installé
adi_numerical => Numérique
adi_ok => OK
adi_one_category => Une catégorie
adi_any_parent_category => Toutes les catégories parentes
adi_pref_update_fail => La mise à jour des préférences a échoué
adi_reset => Réinitialiser
adi_scroll => Défilement
adi_sort_type => Classement
adi_textpack_fail => L'installation du fichier Textpack a échoué
adi_textpack_feedback => Retour utilsateurs pour le Textpack (feedback)
adi_textpack_online => Le textpack est également disponible en ligne
adi_tiny_mce => TinyMCE
adi_tiny_mce_dir_path => Chemin du répertoire de TinyMCE
adi_tiny_mce_hak => TinyMCE (hak_tinymce)
adi_tiny_mce_javascript =>TinyMCE (Javascript)
adi_tiny_mce_jquery => TinyMCE (jQuery)
adi_tiny_mce_config => Configuration de TinyMCE
adi_two_categories => Deux catégories
adi_uninstall => Désinstaller
adi_uninstall_fail => Impossible de désinstaller
adi_uninstalled => Désinstallé
adi_update_matrix => Mettre à jour les paramètres de la matrice
adi_update_prefs => Mettre à jour les préférences
adi_upgrade_fail => Impossible de mettre à niveau
adi_upgrade_required => Mise à niveau nécessaire
adi_upgraded => Mis à niveau
adi_user => Utilisateur
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#120 2012-10-18 03:37:22
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: adi_matrix – Multi-article update tabs
Version 1.2 available for download.
- TXP 4.5-ified
- French colon-isation
- lifecycle “upgrade” pseudo-event
Offline