Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] glx_if: some conditional tags
New version 0.6.4
now includes
- glx_if_not_search
- glx_if_not_section_frontpage
Added support for DB prefixes, thanks garrett i totaly missed that.
Johan Nilsson
Offline
#32 2004-12-21 11:23:04
- Chris
- Member

- Registered: 2004-02-26
- Posts: 22
Re: [plugin] [ORPHAN] glx_if: some conditional tags
This is a great plugin! Must play with it some more.
Do you do requests? I’m looking for something along the lines of if_logged_in that would check for a TXP cookie and show content if it exists. If it could be restricted based on a users permissions (publisher, editor, freelancer, designer etc.) that would be even better but I don’t know if the cookie contains that info.
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
Chris, ramanam did something like that a while ago, maybe that is what you are looking for.
No i dont think the cookie contains that info, but we could get that info with a DB query.
Johan Nilsson
Offline
#34 2004-12-21 12:36:00
- Chris
- Member

- Registered: 2004-02-26
- Posts: 22
Re: [plugin] [ORPHAN] glx_if: some conditional tags
Ramanan’s plugin is cool. Have been trying to get it to detect the txp cookie but changing the script to look for txp_login doesn’t work.
Do you know how I might modify Ramanan’s plugin to check for a txp login cookie?
Thanks for your help Johan.
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
> osei wrote:
> Added support for DB prefixes, thanks garrett i totaly missed that.
No problem, nice work!
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
Just another note—in the new version, the comment above glx_if_not_section_frontpage() includes some non-utf characters which cause encoding problems in some browsers. It doesn’t stop the plugin from working, but you do see some unknown-character marks in the source of it.
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
ahh, that is just some notes to myself, i remove it later on…
Chris, hmm havent really looked at his code, sorry. Right now i dont have much time to build in what you are asking for into glx_if but i do have it in my thoughts.
Johan Nilsson
Offline
#38 2004-12-21 19:53:44
- Chris
- Member

- Registered: 2004-02-26
- Posts: 22
Re: [plugin] [ORPHAN] glx_if: some conditional tags
Thanks Johan. I’m gonna tinker with some php to see if I can get something working.
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
I just modified everything to work with clean URLs, but now the glx_if_section_frontpage does not work. Is this known?
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
I’ve never had a problem with glx_if_section_frontpage, and I use the default clean URL method.
Code is topiary
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
That’s weird because it completely skips over the if statement on the section frontpage. Here’s what I’m doing on the page:
< txp:glx_if_section_frontpage>
< div id=“content”>< div class=“padding”>
< div class=“third”>< div class=“padding”>
< h5>Browse by Date< /h5>
< txp:rss_suparchive section=“photos” limit=“25” />
< /div>< /div>
< div class=“twoThirds”><div class=“padding”>
< h1>Photos Archive< /h1>
< txp:rss_suparchive_bycat section=“photos” />
< /div>< /div>
< /txp:glx_if_section_frontpage>
< txp:if_individual_article>
< div id=“content”>< div class=“padding textCenter”>
< div class=“whole”>
< div class=“breadcrumbs”>< txp:tcm_crumbs hometitle=“Home” />< /div>
< txp:low_article_no_discuss form=“photos” />
< /div>
< /txp:if_individual_article>
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
At the moment the only place I’m using glx_if_section_frontpage is in a form. But, a quick test on a page template shows that it works there too. I have no idea why your isn’t working.
Code is topiary
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
doesn’t work in forms either. i know that my hacked suparchive works because if I take of the glx_if statement everything shows up correctly. Come to think of it, none of the glx_if statements are working.
PS: I’m using ramanan’s clean url’s with mod_rewrite.
Offline
Re: [plugin] [ORPHAN] glx_if: some conditional tags
Really dumb question, but are you sure glx_if is installed and set to on?
Code is topiary
Offline