Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-07-21 13:30:27

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Random questions about $pretext

Mainly just out of curiosity.

What does $pretext['p'] do?

Does $pretext['month'] have any intended purpose other than for sites using “year/month/day/title” permanent link mode? Just poking around I discovered that a URL such as <http://mysite.com/?month=2009-07> works. Does anybody use it this way?


Code is topiary

Offline

#2 2009-07-21 13:47:19

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

Re: Random questions about $pretext

jsoo wrote:

What does $pretext['p'] do?

*shrug* can’t find it in my copy. Which version did you see it in?

a URL such as <http://mysite.com/?month=2009-07> works. Does anybody use it this way?

I think some of the archive plugins/templates use it that way for giving month-by month article lists. And both mdp_calendar and smd_calendar (currently) use it for the minical. But I don’t think it’s a mainstream URL scheme. Could be wrong.


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

Online

#3 2009-07-21 14:18:37

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Random questions about $pretext


Code is topiary

Offline

#4 2009-07-21 14:34:25

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

Re: Random questions about $pretext

jsoo wrote:

4.0.8. See line 222 of publish.php

Oh, that p :-)

I believe it’s something to do with the bizarre image_index and image_display tags. It keeps track of the ID of the current image between those tags, and is probably a kludge to get round the fact there’s no $thisimage context. Yet…


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

Online

#5 2009-07-21 14:57:08

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Random questions about $pretext

Thanks for the explanations. Reeeally looking forward to v4.2.


Code is topiary

Offline

Board footer

Powered by FluxBB