Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2004-10-14 02:49:18

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Plugin: If Section

Well I’ve not upgraded to 1.0 as of yet, so I’m not certain if it’s a 1.0 specific problem. If it shows up on all pages, it seems to me like it may be.

I’ll start taking a look into it.

Regards,
Remillard

Offline

#26 2004-10-14 21:24:15

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Plugin: If Section

I think there are a couple issues at work. At the very least, the returned output is not parsed for more textpattern tags, so that needs to change. Additionally, while compact code, it doesn’t exactly elaborate on what it’s doing. I think I’ll try to rewrite it in my own style (my own idiom, for MP fans out there). Maybe something will fall out of that.

The reason Version 1 probably works is that it’s so simple, it’d be hard for it to fail ;-).

I’m a bit closer I think.

Offline

#27 2004-10-14 23:59:14

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Plugin: If Section

I’ve rewritten the plugin and I think it hangs together better now. I have replaced the 2.0 link at the top with the 2.1 version.

All functions are still the same. It’s thoroughly tested with g1.19 but I don’t have 1.0 to test it with. There’s nothing exotic in it now however.

Remillard

Offline

#28 2004-10-15 01:40:39

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Plugin: If Section

I have tested v2.1 of this simple and incredible plug-in and it seems to works fine!
At least, no parse errors yet!

Thanks you very much, Mr. Remillard


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#29 2005-05-05 20:51:36

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Plugin: If Section

Does anyone have this working with rc3? I am having some problems with it outputing section specific forms for some reason.

Offline

#30 2005-05-05 20:53:57

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Plugin: If Section

I do.

Offline

#31 2005-05-05 23:45:12

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: Plugin: If Section

i have it working with rc3.. but if you need, there’s also ob1_if_section.
i use both, actually, and find i can nest the one in the other :)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#32 2005-05-05 23:49:13

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Plugin: If Section

I’ve asked around and as far as I can tell, rc3 shouldn’t be a problem. Maybe if you post how you’re writing it, it would help.

Offline

#33 2005-05-06 01:45:51

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Plugin: If Section

Alicson thanks…..I always forget about that one. If I can’t get this working I will try that out.

Remillard I am trying to use one page so what I have done in the past was set up section conditionals to output section specific forms and articles. For some reason this go around I am not getting any output whatsoever. I look at the generated source code and my comments are there ( I comment all the conditionals so I know what the hell is going on later If I don’t look at a page for a while), but none of the called forms/articles are being pumped out for some reason. If I take out the conditional everything shows up fine. A bisic example that I was flustered with today was.

EDIT: OK Remillard I got it working. I diabled spc_section_alias and all is working….So I either have a basic typo somewhere in the string for spc_section_alias (most likely candidate) or there is something fishy between the two (least likely candidate). I will look deeper and if the problem persists I will report back.

Thanks! I always get so much mileage out of your plugin. Much appreciated.

Last edited by soulship (2005-05-06 02:16:45)

Offline

#34 2005-05-06 04:54:13

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: Plugin: If Section

Glad it’s working now.

I’ve never used the section aliasing plugin so I’m not certain what sorts of things it modifies. if_section uses the $s variable so if there’s another plugin that monkeys with that, there could be issues. Though, if you know what that other plugin is chaing $s to, then it should still work I would think.

Offline

#35 2005-05-06 19:24:38

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Plugin: If Section

Yeah spc_section alias does seem to bee monkeying with the conditional output. Darnit, it is really nice to alias the section names to what I want, but I need conditionals more ;)

Offline

#36 2005-07-21 23:11:23

ndp
Member
Registered: 2005-07-20
Posts: 12

Re: Plugin: If Section

Hi,

Question for y’all:

I have a mdn_if_section statement in my default article form. When I am looking at a individual article article the if statement works fine. But when I am looking at an article list, it doesn’t work. I also tried putting the if statement in the page and that didn’t work either.

From reading the posts, it sounds like a lot of you have successfully done this. I’m just looking to use a single “page” to display several article headers.

The site is www.natepaine.com. The following code is in my default article form. If the statement is working correctly, it should display “article article”…

[txp:section /]
[txp:mdn_if_section section = “article”] article [/txp:mdn_if_section]

note: replaced <> with [] for display purposes.

Any help would be appreciated!

Thanks,
Nate

Oh, and I am running RC3.

Last edited by ndp (2005-07-21 23:13:16)

Offline

Board footer

Powered by FluxBB