Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-11-08 04:14:00
- Nell
- Member
- From: Mexico City, Mexico
- Registered: 2005-06-21
- Posts: 48
Display article and image ID number in admin
Is there a way to display the article ID number next to each article in the articles tab, and the image ID number in the images tab?
This would help my client to keep track of his articles and images, and to see the image ID number in an easy way so he can add images to his articles.
Thank you!
Offline
#2 2005-11-08 06:00:54
- Niconemo
- Member

- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Display article and image ID number in admin
Oh yes ! I second that, especially in the image list. It is so helpful in the file list. In the image list I must roll-over the link to see the number in the url in the FF status bar…
Nico
Offline
#3 2005-11-08 08:36:36
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Display article and image ID number in admin
this is not a macro:
upm_img_popper solves article image insert issues : )
Offline
Re: Display article and image ID number in admin
In pre- upm_img-popper times, I simply added a column at the beginning of the image list with with the image ID. It requires a hack in txp_image.php as follows:
File: txp_image.php
1) Find <code>function image_list</code> and the following excerpt and add the line marked. This adds the column header ID at the beginning of the list:
<code>
tr(
hCell(gTxt(‘id’)) . // ID table header added
hCell(ucfirst(gTxt(‘name’))) .
hCell(gTxt(‘image_category’)) .
hCell(gTxt(‘tags’)) .
hCell(gTxt(‘author’)) .
hCell(gTxt(‘thumbnail’)) .
hCell()
);
</code>
2) a short way further down there follows a second similar bit of code where the relevant information for each picture is read in. Add the line marked.
<code>
echo
tr(
td($id). // ID table cell added
td($elink).td($category).td($txtilelink.’ / ‘.$txplink.’ / ‘.$xhtmlink).
td($author).
td($thumbnail).
td($dlink,10)
);
</code>
I imagine the process is similar for articles.
Aside: In my code I have added my initials to the comment, and comment every mod I make. That way I can track down any hacks/mods made again if I need to transpose them for an update. The code above is from a 1.0 RC3 site but I suspect it has not changed (much) since.
TXP Builders – finely-crafted code, design and txp
Offline
#5 2005-11-08 10:23:06
- marvincooper
- Member
- Registered: 2004-10-13
- Posts: 43
Re: Display article and image ID number in admin
Perhaps this (display of article/image IDs in the admin article/image lists) should be a feature request?
Offline
#6 2005-11-08 10:27:51
- Niconemo
- Member

- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Display article and image ID number in admin
> nardo wrote:
> this is not a macro:
upm_img_popper solves article image insert issues : )
Yes, great plugin that makes my day in most common cases when editing articles, but when I’m working on the standard image list I’d need it there too ;-)
Last edited by Niconemo (2005-11-08 10:30:09)
Nico
Offline
#7 2005-11-08 20:30:06
- Nell
- Member
- From: Mexico City, Mexico
- Registered: 2005-06-21
- Posts: 48
Re: Display article and image ID number in admin
nardo : I will look into upm_img_popper. As Niconemo, I needed this feature for the image list, but I think this plugin will help my client to insert images.
jakob : Thank you, I think that’s exactly what I needed!
I agree with Marvin, this should be a regular feature in Textpattern. I think it would improve the usability of the admin area.
Thank you all! :)
Offline
#8 2005-11-08 20:37:27
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Display article and image ID number in admin
It’s on my list, if no one else gets to it first. :)
(Edit: updated list url)
Last edited by Mary (2005-11-08 23:22:35)
Offline
#9 2005-11-08 23:10:17
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Display article and image ID number in admin
damn yer to-do list is password protected!
Offline
#10 2006-07-04 16:58:04
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Display article and image ID number in admin
Added in svn recently.
Offline