Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] gho_alternation

#1 2005-05-04 11:37:21

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

[archived] gho_alternation

Notice: This thread is archived, this plugin is no longer available.

**********************************************************

hi @all,

i needed the possibility to cycle through a given set of classnames for the articles of a page and found no suitable plugin, so here one is. hard to explain, but maybe the example will help to understand.

More info: grauhirn.org

attributes

returns
- what should be alternating returned? separated by comma here the values will be given through which the plugin will cycle.

example

<div class="entry<txp:gho_alternation returns="this,that" />">
returns the first time called class=“entrythis”, the second time class=“entrythat”, the third time class=“entrythis” and so forth.

History

2005-08-16 v.4.0
  • revised for TXP4.0
  • messed up documentation fixed
2005-08-14 v.1.0
  • revised for TXP1.0
  • fixed some annoyances with whitespaces and empty values
2005-05-04 v.0.1
  • initial version

Last edited by graumeister (2005-08-28 06:16:47)


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#2 2005-05-04 13:28:31

kennethlove666
Member
From: arkansas
Registered: 2004-04-27
Posts: 107
Website

Re: [archived] gho_alternation

i assume you could have a series of three or four or more?

wow, awesome idea. thanks.


Listen to Kenneth

Offline

#3 2005-05-04 13:49:45

marz
Archived Plugin Author
From: Barbados
Registered: 2004-11-13
Posts: 43
Website

Re: [archived] gho_alternation

this is probably like a jon hicks dream come true :p.. its great dude. thanks

Offline

#4 2005-05-04 14:08:36

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [archived] gho_alternation

Whaow, this is g-r-e-a-t !
It’s not only a John Hicks dream come true, it’s a lot of textpatterner’s dream come true :-)

the gho plugins series has started ! I already liked gho_comments_invite, but this one is going to make style sheets a lot nicer :-))
Can’t wait to see what will be next :)


.: Retired :.

Offline

#5 2005-05-04 20:52:49

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

Re: [archived] gho_alternation

Thanks for this graumeister. This is fantastic!

Offline

#6 2005-05-04 20:59:58

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [archived] gho_alternation

FWIW, you can do this kind of thing with zem_nth.


Alex

Offline

#7 2005-05-04 22:28:52

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [archived] gho_alternation

Yeah true, there are so many plugins to test (!)… I have tested and happily used almost every one of your plugins (love zem_contact, zem_ir and zem_dropcash), but missed zem_nth. I just checked the syntax of your plugin : isn’t gho_alternation more “straightforward” ?

I find it easier this way than the step=1 of=2, plus you don’t have to open and close a tag. Sure, zem_nth has probably more flexibility for this very same reason. You can choose different item to wrap into those tags :-) But for more simple purpose I guess this one will be easier…

Last edited by davidm (2005-05-04 22:33:45)


.: Retired :.

Offline

#8 2005-05-05 01:56:46

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [archived] gho_alternation

@kennethlove666: yes, as much items as you want


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#9 2005-08-14 05:23:41

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [archived] gho_alternation

Hi all, I’ve updated the plugin to work with txp1.0 (rc5).


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#10 2005-08-14 15:09:14

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: [archived] gho_alternation

I just installed the plugin and the help is a bit messed up

[code]
h1. gho_alternation h2. description I needed an alternating counter or something which alternates between maybe some classes. This plugin will do it. h2. attributes returns – what should be alternating returned? separated by comma here the values will be given through which the plugin will cycle. h2. example "> returns the first time called class=“entrythis”, the second time class=“entrythat”, the third time class=“entrythis” and so forth. h2. History 2005-08-14 v.1.0 * revised for TXP1.0 * fixed some annoyances with whitespaces and empty values 2005-05-04 v.0.1 * initial version
[/code]

Last edited by swf (2005-08-14 15:16:00)

Offline

#11 2005-08-15 06:01:08

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [archived] gho_alternation

aehem. ok. i look into it and try to correct it. its the same like in the post on top of this thread.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#12 2005-08-16 05:35:11

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [archived] gho_alternation

its fixed. thanks for the tip again.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

  1. Index
  2. » Archives
  3. » [archived] gho_alternation

Board footer

Powered by FluxBB