Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-21 09:35:46

jpdupont
Member
Registered: 2004-10-01
Posts: 752

A client of mine want to see the article number on the edit page

Possible to display the article id near the article title ?
With an existing plugin ?

Last edited by jpdupont (2012-11-21 09:50:05)

Offline

#2 2012-11-21 10:49:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,795
Website GitHub

Re: A client of mine want to see the article number on the edit page

smd_article_stats displays the article ID (among other things).

EDIT: use the beta v0.30 for Txp 4.5.x.

Last edited by Bloke (2012-11-21 10:50:18)


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

#3 2012-11-21 11:21:04

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: A client of mine want to see the article number on the edit page

:) Thanks Stef !

Offline

#4 2012-11-21 14:08:05

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: A client of mine want to see the article number on the edit page

I’ve said before, but the ID really should be displayed in the article footnotes in core in my opinion. Not sure why there is resistance against it – we’re talking maybe 5 or 6 characters here so it’s not like it’s going to clutter the page.

Offline

#5 2012-11-21 14:26:30

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: A client of mine want to see the article number on the edit page

My client expect to see it near the title of the article, at the top of the page …

Offline

#6 2012-11-21 21:04:43

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: A client of mine want to see the article number on the edit page

adi_recent_tab gives you a menu of recently access articles/images etc, with their IDs – it’s a handy reference, regardless of which admin page you’re on.

Offline

#7 2012-11-21 22:19:02

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: A client of mine want to see the article number on the edit page

philwareham wrote:

I’ve said before, but the ID really should be displayed in the article footnotes in core in my opinion. Not sure why there is resistance against it – we’re talking maybe 5 or 6 characters here so it’s not like it’s going to clutter the page.

In my opinion the whole ID heavy design is ‘flawed’, and it should not be crucial part of the site.

The ID should be as much out of the way as possible, and used just for internal relations. Preferably there would be close to no visible ID in the admin-side interface and no ID attributes in templates. The less places the ID is announced, the less reasons the developers will have to design flawed and hard to use solutions that make clients to copy paste the IDs. Copying numerical IDs from one field to another should not be an option that you would want to consider.

IDs should not be a crucial part of the site, and as such I believe the ID should not be visible anywhere and the least in the editor. In a well designed site there should be no reason to see it, or involve that magical, meaningless number in anything. Involving the ID just makes the system look bad.

Last edited by Gocom (2012-11-21 22:25:41)

Offline

#8 2012-11-21 23:32:21

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,120
Website Mastodon

Re: A client of mine want to see the article number on the edit page

philwareham wrote:

I’ve said before, but the ID really should be displayed in the article footnotes in core in my opinion. Not sure why there is resistance against it – we’re talking maybe 5 or 6 characters here so it’s not like it’s going to clutter the page.

i don’t see any harm in printing the id number in the footnotes of the write tab. After all it is being displayed along the left side of Articles listing tab.

There can be some useful instances where one may want to pull a number of articles into a section based on IDs.

But I would restrict this to admin view only. The client should have no need for the id number that i can foresee.


…. texted postive

Offline

#9 2012-11-22 09:15:11

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: A client of mine want to see the article number on the edit page

I’m in the process of migrating a site from one CMS to TXP, about 150 articles.
The client check each article and mail me the formating problems (from the previous formating stuff to textile).

To give me the article number, he move the mouse on the “view article” button and check the URL !

Fo him, for me, a visible ID on the edit page is very usefull .

Offline

#10 2012-11-22 10:46:42

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: A client of mine want to see the article number on the edit page

Cause it’s a very special need, you can temporary apply a hack into /textpattern/include/article.php (line #1309):

return '<span id="article_partial_article_view"><a href="'.$url.'" class="article-view" title=" '.gTxt('view').' '.gTxt('article').' ID#'.intval($ID).' " target="_blank">'.gTxt('view').'</a></span>';

A tooltip below the ‘View’ link shows the article ID. Then, when all your content review is finished, revert the core code:

return '<span id="article_partial_article_view"><a href="'.$url.'" class="article-view">'.gTxt('view').'</a></span>';

P.S. (don’t show this to Robert, Stef and Jukka ;)

Last edited by Pat64 (2012-11-22 12:16:44)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#11 2012-11-22 12:28:41

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: A client of mine want to see the article number on the edit page

Thanks Patrick,

I’m actually very happy with Stef smd_article_stats plugin.

No hack and a big article ID at the top of the edit screen !

My previous post : just to explain why some time some people need article ID on this screen …

Offline

#12 2012-11-23 10:45:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,795
Website GitHub

Re: A client of mine want to see the article number on the edit page

Pat64 wrote:

you can temporary apply a hack into /textpattern/include/article.php P.S. (don’t show this to Robert, Stef and Jukka

:-) Actually no hack is needed. You can do it with a plugin:

register_callback('pat_artid', 'article_ui', 'title');

function pat_artid($evt, $stp, $ui, $rs) {
   return str_replace('class="article-view"', 'class="article-view" title=" '.gTxt('view').' '.gTxt('article').' ID#'.intval($rs['ID']).'"', $ui);
}

It’s a bit cheap because it just does a search-n-replace, but it works.


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

Board footer

Powered by FluxBB