Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-21 11:00:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Thanks for file and link author fields (r3176,r3179-80)

Good to see this being implemented – that’s another hack I can now remove. Neat to not have it show author on single-author sites. Thank you, Robert.

PS: Don’t you also need to add the new fields to txpsql.php too?


TXP Builders – finely-crafted code, design and txp

Offline

#2 2009-04-21 11:20:44

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

Re: Thanks for file and link author fields (r3176,r3179-80)

jakob wrote:

Good to see this being implemented

Yeah, all good stuff, thanks.

btw, wet, are there plans for some client side tags for outputting the author info from $thisfile/$thislink? e.g. <txp:file_download_author />? It would make this kind of thing easier, unless you know of an alternative I haven’t considered.

Don’t you also need to add the new fields to txpsql.php too?

Isn’t that what update_to_4.0.x.php does? I’m not exactly sure how it all works but I think txpsql.php is the same now as it was for the 4.0.0 release and new stuff just gets ALTERed/ADDed on upgrade *shrug*

Last edited by Bloke (2009-04-21 11:21:13)


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 2009-04-21 11:48:51

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Thanks for file and link author fields (r3176,r3179-80)

jakob wrote:

PS: Don’t you also need to add the new fields to txpsql.php too?

No, schema upgrades are handled by the various update/_to_a.b.c.php scripts (with one significant exception)

Offline

#4 2009-04-21 11:49:39

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Thanks for file and link author fields (r3176,r3179-80)

Bloke wrote:

btw, wet, are there plans for some client side tags for outputting the author info from $thisfile/$thislink?

Sure.

Offline

#5 2009-04-21 12:02:33

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

Re: Thanks for file and link author fields (r3176,r3179-80)

wet wrote:

Sure.

Ace, thanks! Any thoughts on conditionals? Adding if_file_download_author and if_link_author is perhaps a bit bloaty (or maybe not, since we have if_article_author already). Almost makes me pine for a <txp:if_author type="article | file | link | ..." /> tag but of course if_author is taken :-(

Adding an author="list, of, authors" attribute to file_download_list and linklist is, I assume, on the cards so it’s possible to target particular authors. Is taking action within the form or container better left for a plugin like chh_if_data or smd_if?


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