Page Count

Page Count

By ErichSteinboeckErichSteinboeck on 28 Mar 2009 10:33, last edit by ErichSteinboeckErichSteinboeck on 28 Mar 2009 10:34

I've just made available a solution how to count pages.

The general idea was simple:

  • write some (trivial) JavaScript that displays the length of a string,
  • use the Horizontal ListPages idea to have ListPages generate a string of X's — one X for each page, and
  • feed the string of X's into the URL of an [[iframe ...]] tag

Actual implementation though was much harder than anticipated. For example it wasn't possible to use [[iframe ...]] as iframe parsing is done before line concatenation (which removes the trailing backslashes from the “Horizontal ListPages” part) and so the iframed code (the JavaScript that calculates the string of X's length) wouldn't pick up a correct string of X's. It took me quite a while to find that [[embed]]<iframe ... would solve this issue, as embed parsing is done after line concatenation.


Tags: count javascript listpages pages

Related Community Blog Posts

The following posts have similar tags and may be related to this post.

Rate it up ?

rating: +2+x

Discuss

Add a New Comment

Share

Bookmark and Share

Community Blog feed-icon-14x14.png

Posts by date

Posts by tags

Posts by rating

Page Count
Rating: þ{rating}þ (28 Mar 2009 10:33)

Page Count
Rating: þ{rating}þ (28 Mar 2009 10:33)

Page Count
Rating: þ{rating}þ (28 Mar 2009 10:33)


Blogroll

{"module":"feed\/FeedModule","params":{"src":"http:\/\/michalf.me\/feed\/pages\/category\/blog\/t\/Michal+Frackowiak%27s+blog","limit":"1","module_body":"**[http:\/\/michalf.me Michal]:** \n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/quake.wikidot.com\/feed\/pages\/category\/dev\/t\/Piotr+Gabryjeluk+blog","limit":"1","module_body":"**[http:\/\/piotr.gabryjeluk.pl\/ Gabrys]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/squark.wikidot.com\/feed\/pages\/category\/blog\/t\/Squark%27s+Latest+Posts","limit":"1","module_body":"**[http:\/\/squark.wikidot.com\/ Squark]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}

Admin dashboard

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.