Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2005-08-10 22:28:58

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

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

First off have you switched the plug-in on? If you have then more info is required. Can you post the code you are using. Place it inside < code>< /code> tags (without the spaces).


Stuart

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

Offline

#74 2005-08-11 19:29:19

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

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

Plug-in is turned on =) Here is what I used:

<code><txp:glx_if_frontpage> <p>FRONT PAGE.</p> </txp:glx_if_frontpage> <txp:glx_if_not_section_frontpage> <p>NOT SECTION FRONTPAGE.</p> </txp:glx_if_not_section_frontpage> <txp:glx_if_section_frontpage> <p>SECTION FRONTPAGE.</p> </txp:glx_if_section_frontpage></code>

On my front page and section front page, what was supposed to show did show and what wasn’t supposed to show didn’t (so that works fine). However, on the frontpage, section frontpage, and section page this always displayed:

<code><txp:glx_if_not_section_frontpage> <p>NOT SECTION FRONTPAGE.</p> </txp:glx_if_not_section_frontpage></code>

And also, on my frontpage this also showed:

<code>SECTION FRONTPAGE.</code>

I even placed the <b>if_section_not_frontpage</b> tag above the <b>if_section_frontpage</b> like stated in the help file, but that above still showed on my pages.

Offline

#75 2005-08-11 19:45:18

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

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

Is this a recent download of the plug-in because it now uses “evalElse” which means that the correct usage of if_section_frontpage would be something like:-

<code><txp:glx_if_section_frontpage>
blah blah
<txp:else />
blah blah
</txp:glx_if_section_frontpage></code>


Stuart

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

Offline

#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

Board footer

Powered by FluxBB