Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-11 03:28:05

jauhari
Member
Registered: 2007-05-24
Posts: 97
Website

How to Create Counter Number like this

Hi All

I want to do this.
I want integrate my post section with some java script. This is the details

On my Java Script will need add this code automatically this is example the code

pausecontent[0]='My Section Post will be here'
pausecontent[1]='My Section Post will be here'
pausecontent[2]='My Section Post will be here'

What I need to do is, How to make pausecontent number add automatically and auto increased? from 0 to unlimited number.

How to do that?

Offline

#2 2008-02-11 04:19:53

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: How to Create Counter Number like this

More details would be great ;). Post all your JavaScript.

Offline

#3 2008-02-11 06:43:36

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: How to Create Counter Number like this

Yeah, same as jm: more details ;) with that information we can’t tell anything – we can’t even see which coding language that is (yeah you told us that – but without that information). But details would make helping you out possible ;)

On my Java Script will need add this code automatically this is example the code

How to make pausecontent number add automatically

Btw where and what? Or maybe I just need subtitles :/ (where did that subtitle come from? I didn’t mean my writings… :P)

Offline

#4 2008-02-11 13:26:05

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: How to Create Counter Number like this

Sounds like jauhari wants simple incrementing number to be output by textpattern for use in the script, e.g. for newsticker entries, image lists for flash data etc. Try putting this in your txp form where you want the number to appear:

<txp:php>global $i;$i++;echo $i;</txp:php>

(I’m sure the php-profis can improve on my elementary method)


TXP Builders – finely-crafted code, design and txp

Offline

#5 2008-02-11 17:56:38

kus
Member
From: madiun, Indonesia
Registered: 2007-03-15
Posts: 64
Website

Re: How to Create Counter Number like this

To making Newsticker, I prefer to using this way : http://medienfreunde.com/lab/innerfade/ , using jquery that already coming with TxP packed.

Last edited by kus (2008-02-11 17:57:12)

Offline

Board footer

Powered by FluxBB