Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
yab_article_crossref - cross-reference articles in custom fields
With this small Textpattern CMS plugin you can assign an article in another articles custom field for a cross-reference. You can select the articles by n dropdown of article titles.
Download: yab_article_crossref_v0.1.txt
yab_article_crossref
Easy cross-reference an article in custom fields.
Version: 0.1
Table of contents
Plugin requirements
yab_article_crossref’s minimum requirements:
- Textpattern 4.x
Configuration
Open the plugin code. the first function contains the configuration values:
'custom_field_nr' => ', // custom_field number containing the cross reference article ID
'sections' => ', // sections from which we build the dropdown, comma separated
'categories' => ' // categories from which we build the dropdown, comma separated
Changelog
- v0.1: 2017-02-12
- initial release
Licence
This plugin is released under the GNU General Public License Version 2 and above- Version 2: http://www.gnu.org/licenses/gpl-2.0.html
- Version 3: http://www.gnu.org/licenses/gpl-3.0.html
Author contact
Last edited by trenc (2017-02-12 14:48:54)
Offline
Re: yab_article_crossref - cross-reference articles in custom fields
Doers this work with 4.6.2?
I’ve installed and I get nothing.
Offline
Offline
Re: yab_article_crossref - cross-reference articles in custom fields
Hmm. I’ve put it in on a fresh install and get nothing. No indication that it is there. Is GLZ_Custom_FIelds an issue?
Offline
Re: yab_article_crossref - cross-reference articles in custom fields
Hmm. I’ve put it in on a fresh install and get nothing. No indication that it is there. Is GLZ_Custom_FIelds an issue?
Hm could be, depending on the usage of glz_cf. Yab_article_crossref will modify the custom_field in the article write tab to an dropdown menu (HTML select element). This could interfere with the glz_cf for the same field.
Offline
Re: yab_article_crossref - cross-reference articles in custom fields
I am also using glz_cf in conjunction with yab_article_crossref.
Am i supposed to edit your plugin first to put in at least the ID of an empty custom field?
In fact i cannot find out even the ID other than using phpMyAdmin to look straight into the database itself.
Neither glz_cf nor the admin preferences tab show IDs of custom fields in 4.6.2
Last edited by jayrope (2018-02-21 19:18:16)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: yab_article_crossref - cross-reference articles in custom fields
Hi Jayrope,
Am i supposed to edit your plugin first to put in at least the ID of an empty custom field?
Yes.
You have to put at least the number of the custom_field in the config array (field custom_field_nr
) in the plugin code.
In fact i cannot find out even the ID other than using phpMyAdmin to look straight into the database itself.
Neither glz_cf nor the admin preferences tab show IDs of custom fields in 4.6.2
Go to »admin« -> »preferences« -> »cutom fields« in the textpattern backend. Here you find the custom fields and the number of the field.
Note: Do not forget to fill in the blanks here. The custom field can only be used if its properly named here, of course.
On my demoshop it looks the following (Textpattern 4.6.2 with hive neutral theme):
Offline