Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-02-12 14:18:15

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

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

  1. Plugin requirements
  2. Configuration
  3. Changelog
  4. License
  5. Author contact

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

Author contact

Last edited by trenc (2017-02-12 14:48:54)

Offline

#2 2017-09-03 10:37:13

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

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

#3 2017-09-04 08:16:50

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

Re: yab_article_crossref - cross-reference articles in custom fields

Yes, it does work with 4.6.2.

Offline

#4 2017-09-06 17:07:02

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

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

#5 2017-09-13 08:45:34

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

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

#6 2018-02-21 19:17:56

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

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

#7 2018-02-22 09:09:04

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

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):

See here

Offline

Board footer

Powered by FluxBB