Going nuts over something I thought would be simple.

I wrote a plugin that creates a page counter function. I'm sure that
this could be done from within Boltwire directly without a plugin, but
it gave me another shot at trying a plugin to see if I understood how
they worked better.  the shell of it could be used by others to access
all kinds of data outside of the system.  I also wanted to see if I
could catch php errors and place them into an error variable without
them being exposed so it uses ob_start, ob_get_contents and
ob_end_clean which seems to work.

It places in system vars four values values:

{pgcount}             Page Count for that page
{pgpage}              Page that is being counted
{pgcountfile}         Full path of the countfile
{pgerror}              Output of errors (the ob_ related stuff)

So... I wanted to put the call to the function in the top zone so that
it would set the values, so they could be used anywhere (main/side/
bottom) etc...

So I put

[(pagecount)]

in the top.  Believing that that on its own would not display
anything.

And added

Access # {pgcount}

To the bottom section.

Works great, except that in the top it outputs the title of the page
even though I would not expect it to output anything.

So... I tried using it as a template like

[(pagecount template=pgp)]
/*[#pgp][#pgp]*/

Which I thought would output nothing as well... but when I do that it
outputs pgp

So how do I get the plugin to not output any data but still load its
stuff?

What it does...

Basically the plugin creates in a counter directory a file named after
the page that is being viewed and uses that file to keep a count of
how often it has been loaded.  Each time that page is loaded, the
counter increments the number and sets the variables as mentioned
above so they could be used.

I ripped the basic counter code out of a PHP page counter I have been
using for years.

The pagecounter actually works (in the bottom) and gets the right page
names and everything...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to