Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2005-08-11 20:15:42

xmerokox
New Member
Registered: 2005-08-09
Posts: 3

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Yes, it’s a recent download. It’s fixed now since I’ve edited the plug-in with the code posted by <b>osei thêta</b>. Thanks for your help! :D

However, there is still one problem. On my frontpage of the site, stuff for the section frontpage still shows up.

Offline

#77 2005-08-30 10:38:08

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

The glx_if plug in looks very interesting, giving you simple control over some of the default parameters. Essential really, if you want a site with some individualised pages – not a site where every page uses the same template.

However, the options in the plug in dont give me what I need. I need something like if_article_is_called_then_blahblahblah

Presumably this could be added to the plug in quite easily?

Offline

#78 2005-08-30 14:08:02

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Isnt this available as a generic tag?

<a href=“http://textpattern.net/wiki/index.php?title=Txp:if_individual_article”>if_individual_article</a>


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#79 2005-09-25 18:21:35

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Updated to 0.6.6

I just updated this plugin to 0.6.6, this update comes with zero documentation, this is just a test update to see that this plugin stil works with the latest stable release. (Textpattern 4.0.1) Please report bugs or fixes back to me.

-get 0.6.6

get 0.7 instead: download link

Last edited by osei (2005-10-15 15:35:55)


Johan Nilsson

Offline

#80 2005-09-30 04:46:41

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 125

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Johan

I have installed 0.6.6 on a TXP 4.0.1 site (std r888) and have tested the following tags of the plugin:

  • if_frontpage
  • if_section_frontpage
  • if_not_section_frontpage
  • if_category_list

All of these seem to work just fine :)

SH

Offline

#81 2005-09-30 19:11:37

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

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Thanks for updating! No problems as of yet…….

Jamie

Offline

#82 2005-11-07 17:22:35

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

if_not_section_frontpage no longer works for me R1090

OK so it works gotta remember the glx_ prefix.
stoopid, stoopid, stoopid.

Thanks Osei

Last edited by mrdale (2005-11-14 23:26:47)

Offline

#83 2006-02-23 17:55:26

rbe
Member
Registered: 2006-02-12
Posts: 27
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

johan – I added a few functions to the plugin for my site (I was using 0.6.4, so if these are already in there sorry!).. I needed additional functionality for paging – if you would like the code, here it is…

function glx_if_first_page($atts, $thing){ global $pretext; return (empty($pretext[“pg”]) || $pretext[“pg”] == “1”) ? parse($thing) : “”;
}

function glx_if_not_first_page($atts, $thing){ global $pretext; return (!empty($pretext[“pg”]) && $pretext[“pg”] != “1”) ? parse($thing) : “”;
}

and also I added and if not category list

function glx_if_not_category_list($atts, $thing)
{ global $pretext, $is_article_list; return (empty($pretext[“c”]) && $is_article_list == true) ? parse($thing) : “”;
}

feel free to add it, thanks!

-rbe

sorry for the edit, the code tags got messed up

Last edited by rbe (2006-02-23 17:59:31)

Offline

#84 2006-03-18 00:03:39

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Hi guys,

I don’t think certain of the conditionals are working as expected. The code I have at present consists of:

<code>
<txp:glx_if_comments_open><txp:comments_invite/></txp:glx_if_comments_open>
<txp:glx_if_comments_closed_comments><txp:comments_count />Comments</txp:glx_if_comments_closed_comments>
<txp:glx_if_comments_closed ignorecomments=“false”>Comments are closed for this article</txp:glx_if_comments_closed>
</code>

<br />

The output on the main page is either “Comment [1]” or “Comments are closed for this article” which is correct. However when going into perma-view, the output when a comment has been left is “” (i.e. there is no output). I would like the output to be “1 Comment”.

<br />

To see an example, visit my site

Any help appreciated (using the latest version of the plugin).

Saj

Offline

#85 2006-03-18 02:28:51

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

But what version of TXP are you using? I’m not sure you need this plug-in. Check out the existing “if_comments” native TXP tags.

Last edited by thebombsite (2006-03-18 02:29:11)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#86 2006-03-18 19:42:35

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

I’m currently using version Textpattern · 4.0.3.

Offline

#87 2006-03-18 21:46:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Did you look at the “if_comments” conditionals in the link I gave above?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#88 2006-04-01 10:39:39

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Can anyone explain how <code>glx_if_section_frontpage</code> and <code>glx_if_not_section_frontpage</code> differ from <code><txp:if_individual_article></code> and <code><txp:if_article_list></code>?

I ask because the rss_suparchive plugin generates root/section/year archive pages within a section and I’d like to distinguish these pages in my page template from the section frontpage. I thought this plugin might do that, but the root/section/year URLs still display as if they were the section frontpage.

Can anyone suggest a way to use/hack glx_if to get that result?

Offline

#89 2006-04-01 18:20:58

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Hmm, it seems that this plugin doesn’t recognise /section/?c=categoryname urls as being different from the section frontpage either.

Can anyone confirm that being the case, or does it suggest I’m using it wrong somehow?

Offline

#90 2006-04-01 20:33:52

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] glx_if: some conditional tags

Well <code><txp:if_individual_article></code> and <code><txp:if_article_list></code> can be used in any section not just the “default” section which means they don’t necessarily indicate THE front-page, but they would point to the front or back page of the section they were being used in. On the other hand the <code><txp:if_section name=”“></txp:if_section></code> tags would target the default section so we are half-way there. If you combined that with the other tags like so:-

<code>
<txp:if_section name=”“>
<txp:if_article_list>
This is THE front-page
<txp:else />
This is the comment page of the default section
</txp:if_article_list>
</txp:if_section></code>
<br />

you can target THE front-page specifically. Did that make any sense?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB