Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: bbclone plugin
> maniqui wrote:
I write this post to help other users, so they know how to proceed if they go into problems like me.
When you read, you should read, not just do a quick view over the post :)
I’m glad you got this working but you make a very good point maniqui. Especially because this is the exact solution and utf-8 suggestion I posted for you a week ago. :)
Last edited by wilshire (2004-11-17 20:18:21)
Offline
Re: bbclone plugin
Yes, Wilshire, you are right.
I have “read” your solutions, but I were very confused at that moment.
They make me search a lot about encoding and charset.
I have read <a href=“http://www.w3.org/International/tutorials/tutorial-char-enc/”>this great tutorial</a> about encoding and charsets, and etceteras..
The truth is that I didnt test the solution (the one changing some lines in the plug-in, and using “ and putting the code in the right order) with a non-UTF-8 version of BBClone.
I first changed to UTF-8 version and then figured out that one of the problems was using a wrong quotation mark and not this (") one, and that I must put the plug-in code in the right order.
So, I think that maybe, this plug-in works with a non-UTF-8 version of BBClone.
Offline
#33 2004-11-17 20:45:45
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: bbclone plugin
I wrote the BBClone folks about more details of their application in order to try to gain some insight into how the plugin might be changed to make the URLs correct. I haven’t had time to deal with it the past couple of weeks, so I’m going to post what they sent me. Perhaps it’ll spark someone’s genius.
<hr>
[Pagestat issue with invalid paths]
>
> Now I’m certain this is NOT BBClone’s fault. The plugin tinkers with
> the environment when it calls BBClone to make sure it works within the
> Textpattern page rendering context.
Sounds like you did some research yourself. There are very rare occasions,
where this can happen on a stock BBClone installation as well: If the
server is using non standard environmental variables for which BBClone has
no workaround.
> I was hoping though that you could give me some insight into what global
> parameter is read that BBClone gets the page URL from. If I know that,
> then I can modify the plugin and correct it so it links the page titles
> correctly.
First of all BBClone doesn’t simply grab “Request Uri” or “Url” (on IIS)
because it cannot be handled accurately and would result in duplicate
entries which unnecessarily bloat stats data. Example:
On Apache 1.3.x the following calls would be identical:
http://example.com/index
http://example.com/index/
http://example.com/index.php
http://example.com/
Additionally the default could be “default.php” which is standard on IIS,
or anything else what the server was configured for. For this reasons,
BBClone uses a different approach:
It creates a “Request Uri” variable itself which uses PATH_INFO, PHP_SELF
and the script filename. this is happening in lib/marker.php in the
function bbc_filter_uri(). Variable definitions for $filename and
$REQUEST_URI are inside of bbc_marker() (same file). BBClone omits query
strings because there’s no generic way to handle them. This only can be
done individually depending on the host application being used.
Maybe a note on the environmental variables used inside of the bbc_marker
class (still lib/marker.php). These are local variables and although they
may look like someone coding with register_globals “on” they’re not. In
fact bbc_marker() grabs the environmental variables it needs (names stored
in an array) and filters each of them with bbc_clean, which can be found
in lib/io.php starting at version 0.4.4. This is done for two reasons:
To get rid of any unsafe characters or embedded tags and to have
shorter names.
Offline
Re: bbclone plugin
:)
i think bbclone should separate the totals from the robots and totals of everyone else, so you can see how many non-robots visit (without opting to not see any robot visits at all). ..or is there already a way to do this?
at any rate, thanks for looking into it, Remillard.. (though i confess i’m not sure what you guys are looking into….
thanks again, Wilshire, for the mod.
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#35 2004-11-17 21:15:42
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: bbclone plugin
I think you can use the total for OS and Browser for the number of non-robot viewers you’ve had. Seems like the Total Robots, plus the Total Browsers equals the Total Unique.
Offline
Re: bbclone plugin
or even just total unique minus total robots. or something.
but how can you get it to calculate and display for you? or what if you’d like it to print somewhere? this is where php becomes useful, among other places, eh…
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#37 2004-11-18 00:40:59
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: bbclone plugin
Well true, it doesn’t exactly break it out for you anywhere so you can actually use it :). I don’t think you have to do the calculation yourself. Like I said, the number under “Total Browsers” does seem to be the “Total Unique” minus “Total Robots”. So at the very least visually looking at the BBClone page, you can see it pretty easily.
However it might be nice to be able to fetch that back into the page content somewhere. I have no idea if BBClone publishes these numbers anywhere easily accessible.
Offline
Re: bbclone plugin
I have upgraded to the latest version of BBClone (0.4.6).
Now, I’m having this warning in all pages managed by TXP.
<code>Warning: strtr(): The second argument is not an array. in /home/midimidi/public_html/bbclone/lib/io.php on line 25</code>
I have disabled (just deactived) the plugin and the warning has desapperad.
well, i’m not php developer, but I will investigate the line 25 and look for something…
Edit: this is PHP code in io.php file.
<code> // only look for separator if really needed $input = (!empty($sep) && ($sp !== false)) ? substr($input, 0, $sp) : $input; $input = strip_tags(str_replace(“\\”, “/”, stripslashes($input))); $input = trim(strtr($input, $BBC_ENT_REV)); $input = str_replace(“$”, “$”, htmlspecialchars($input, ENT_QUOTES));</code>
And line 25 is:
<code> $input = trim(strtr($input, $BBC_ENT_REV));</code>
The “weird” thing is that, in PHP Coder Pro! (editor), the two first “$input” are in red color.
But the two last “$input” are in “light blue” color.
¿Maybe a typo error?
If anyone find the solution, I will appreciate it very much.
Thanks
Last edited by maniqui (2004-12-11 17:27:16)
Offline
Re: bbclone plugin
hey… has anyone had success with the poe_bbclone version 0.3 plugin and the new version 0.4.6 of bbclone?
i’m nervous to try it if others have not met with success… i believe the last time i tried upgrading to a newer version of bbclone (i’m on 0.4.4a..but i’d tried one after that at one point, for a very short time), it thoroughly failed for me (dunno if it was incompatible with the plugin… i may have just done something wrong…).
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#40 2005-02-02 19:16:53
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: bbclone plugin
working ok for me with those versions.
Offline
Re: bbclone plugin
It works quite fine for me with BBClone 0.4.6c-utf8 ;-)
Just two things :
- if I turn on “$BBC_KILL_STATS” … to kill the stats … then I have the following message when I reload my page and the stats are not killed :
Warning: fopen() expects at least 2 parameters, 1 given in /home/mysite/www/bbclone/lib/io.php on line 131
Warning: fclose(): supplied argument is not a valid stream resource in /home/mysite/www/bbclone/lib/io.php on line 131
- My web site is in french with “accent” and they display in bbclone like that : “<code>pièce1</code>” instated of “pièce”
Some idea ?
Last edited by fpradignac (2005-02-22 22:37:45)
françois
Offline
Re: bbclone plugin
- it’s OK for the
françois
Offline
Re: bbclone plugin
I’m trying to use BBClone 0.4.6e-utf8 with the 0.4 version of the plugin on RC3. Every page visit is being double counted. One hit is recorded for the correct page but the home page has a hit recorded for it each time I view a page.
Anyone seeing anything like this or gotten the above combo to work?
Offline
Re: bbclone plugin
Still waiting with the RC1 and it works very fine with some hack to store in BBClone accentueted page title (see this post )
Though/hope Gernot will update is plugin when 1.0 final will came out.
françois
Offline
Re: bbclone plugin
> wilshire wrote:
> I’m trying to use BBClone 0.4.6e-utf8 with the 0.4 version of the plugin on RC3. Every page visit is being double counted. One hit is recorded for the correct page but the home page has a hit recorded for it each time I view a page.
>Anyone seeing anything like this or gotten the above combo to work?
I think this may be an issue with RC3 itself. I was testing RC3 and got double hits in TxP’s own logs too.
Offline