Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-09-02 19:36:04

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

OK
In an head form (where you put your head tags ;-) and before </head>, try :
<txp:poe_bbclone bbcdir="/myrep/webserver/momsite/bbclone/" /> dont forget the last slash !
bcdir is the absolute path to the directory where you’ve put BBClone.
You can get it with this snipet <?php echo getcwd(); ?>


françois

Offline

#17 2007-09-02 20:04:03

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

françois, thanks for the help, but BBClone is still only recording hits on the site index. Maybe I have something wrong with how BBClone is set up

Offline

#18 2007-09-03 05:14:09

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

In your BBClone config file (at the end), try the debug option :
$BBC_DEBUG = 1; and look at the messages BBC displaying on your main page.


françois

Offline

#19 2007-09-03 17:55:56

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

I get the following three messages… access.php and last.php have been written to, but counter12.inc is empty. Folder “var” is 775. Hope that sheds some light on the matter, ‘cos I’m in the dark!! Thanks

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

It seems that BBClone has successfully written to file counter12.inc. If you keep getting this message despite access.php and last.php remain empty, it means the file system is denying access and returning a flag PHP doesn’t understand. On Windows NT/2k/XP/2k3 the problem will occur with PHP 4.x if the var directory only has read permissions.

It seems that BBClone has successfully written to file access.php. If you keep getting this message despite access.php and last.php remain empty, it means the file system is denying access and returning a flag PHP doesn’t understand. On Windows NT/2k/XP/2k3 the problem will occur with PHP 4.x if the var directory only has read permissions.

It seems that BBClone has successfully written to file last.php. If you keep getting this message despite access.php and last.php remain empty, it means the file system is denying access and returning a flag PHP doesn’t understand. On Windows NT/2k/XP/2k3 the problem will occur with PHP 4.x if the var directory only has read permissions.

Last edited by woollyhat (2007-09-03 17:56:17)

Offline

#20 2007-09-03 19:14:42

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

That seems normal : all the counterxx.ins are temporaries files.
So, if I resume, you have all your hits counted but only counted as the index. So it works ! but it doesn’t have the right title, isn’t it?


françois

Offline

#21 2007-09-03 19:41:02

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

Yes… that’s it exactly. Every hit is counted, but only as the index. It works on the test.php page containing the activation code that I created during the setup – that’s counted as a separate page, so it must be something in textpattern… I really appreciate your time françois!!

Offline

#22 2007-09-03 20:12:34

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

Can you give us the content of your installed plugin ?
In TXP, go to ADMIN > PLUGIN > click MODIFY on you plugin, copy and paste this content.
And the snippet you’ve put in your head page.


françois

Offline

#23 2007-09-03 20:21:35

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

The code in the plugin is…

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

function poe_bbclone($atts) {

/*—— Configuration parameters ——*/

// Set this to the absolute path of bbclone and don’t forget the last “/”
// Example: $bbcdirectory = “/myvolume/webserver/mywebsite/docs/bbclone/”;
$bbcdirectory = “/home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/”;

// This is the Prefix to the Page’s name:
$bbcprefix = “BTCV blogs: “;

// If you don’t want the title of the Start page to be empty enter a value here
$bbcstartpagetitle = “Home page”;

/*—— Do not configure anything below this line ——*/

GLOBAL $sitename;

//Make a beautiful title String
$bbcsubtitle = substr(page_title(array()), strlen($sitename)+2);
if ($bbcsubtitle == “”) { $bbcsubtitle = $bbcstartpagetitle; }
$bbctitle = $bbcprefix.$bbcsubtitle;

//Recreate the global environment, so bbclone can find what it needs
$globalvars = array(“PWD”, “PGCLIENTENCODING”, “USER”, “MAIL”, “LANG”, “SSH_CLIENT”, “LOGNAME”, “SHLVL”, “LC_CTYPE”, “SHELL”, “HOME”, “TERM”, “PATH”, “SSH_TTY”, “_”, “DOCUMENT_ROOT”, “HTTP_ACCEPT”, “HTTP_ACCEPT_ENCODING”, “HTTP_ACCEPT_LANGUAGE”, “HTTP_CONNECTION”, “HTTP_HOST”, “HTTP_USER_AGENT”, “REMOTE_ADDR”, “REMOTE_PORT”, “SCRIPT_FILENAME”, “SERVER_ADDR”, “SERVER_ADMIN”, “SERVER_NAME”, “SERVER_PORT”, “SERVER_SIGNATURE”, “SERVER_SOFTWARE”, “UNIQUE_ID”, “GATEWAY_INTERFACE”, “SERVER_PROTOCOL”, “REQUEST_METHOD”, “QUERY_STRING”, “REQUEST_URI”, “SCRIPT_NAME”, “PATH_TRANSLATED”, “PHP_SELF”, “argv”, “argc”, “HTTP_POST_VARS”, “_POST”, “HTTP_GET_VARS”, “_GET”, “HTTP_COOKIE_VARS”, “_COOKIE”, “HTTP_SERVER_VARS”, “_SERVER”, “HTTP_ENV_VARS”, “_ENV”, “HTTP_POST_FILES”, “_FILES”, “_REQUEST”, “GLOBALS”, “vars”, “val”, “BBC_ROOT_PATH”, “BBC_VERSION”, “BBC_LIB_PATH”, “BBC_LANGUAGE_PATH”, “BBC_CACHE_PATH”, “BBC_DOC_PATH”, “BBC_IP2EXT_PATH”, “BBC_IMAGES_PATH”, “BBC_CONF_PATH”, “BBC_CONFIG_FILE”, “BBC_LOG_PROCESSOR”, “BBC_LOCK”, “BBC_COUNTER_PREFIX”, “BBC_COUNTER_SUFFIX”, “BBC_COUNTER_COLUMNS”, “BBC_COUNTER_COLUMN_NAMES”, “BBC_COUNTER_FILES”, “BBC_SEP”, “BBC_TIMESTAMP”, “BBC_LAST_FILE”, “BBC_ACCESS_FILE”, “BBC_MAINSITE”, “BBC_SHOW_CONFIG”, “BBC_TITLEBAR”, “BBC_LANGUAGE”, “BBC_MAXTIME”, “BBC_MAXVISIBLE”, “BBC_MAXOS”, “BBC_MAXBROWSER”, “BBC_MAXEXTENSION”, “BBC_MAXROBOT”, “BBC_MAXPAGE”, “BBC_MAXORIGIN”, “BBC_MAXHOST”, “BBC_DETAILED_STAT_FIELDS”, “BBC_TITLE_SIZE”, “BBC_SUBTITLE_SIZE”, “BBC_TEXT_SIZE”, “BBC_NUM_SIZE”, “BBC_TIME_OFFSET”, “BBC_NO_DNS”, “BBC_NO_STRING”, “BBC_NO_HITS”, “BBC_IGNORE_IP”, “BBC_IGNORE_REFER”, “BBC_IGNORE_BOTS”, “BBC_IGNORE_AGENT”, “BBC_KILL_STATS”, “BBC_ENT_REV”, “page”, “browser”, “os”, “robot”, “msg”, “al”, “access”, “last”, “af”, “name”);
foreach ($globalvars as $globalvar) { GLOBAL $$globalvar;
}

//call bbclone
define(“_BBC_PAGE_NAME”, $bbctitle);
define(“_BBCLONE_DIR”, $bbcdirectory);
define(“COUNTER”, _BBCLONE_DIR.“mark_page.php”);
if (is_readable(COUNTER)) include_once(COUNTER);

}

***********

The snippet in the page is…

<txp:poe_bbclone bbcdir=”/home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/” />

Offline

#24 2007-09-04 05:07:31

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

Everything seems to be right…
But some of your double quotes are not the same : or , so try replacing all these quotes with “verticals” quotes ".
Hope I’m clear.


françois

Offline

#25 2007-09-04 18:34:55

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

I’ve replaced all quotes with normal quotes, but it doesn’t appear to make any difference. I’m still recording hits, but only to the index. This is a mystery!

I tried running textpattern in Debugging mode and the following error, which I can’t decipher, occurred:

tag_error <txp:poe_bbclone bbcdir=”/home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/” /> -> Notice: Constant _BBCLONE_DIR already defined on line 32

textpattern/lib/txplib_misc.php(512) : eval()’d code:32 define(_BBCLONE_DIR, /home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/)
textpattern/publish.php:958 poe_bbclone(Array, , <txp:poe_bbclone bbcdir=”/home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/” />)
processTags(Array)
etc etc rest of page…

Offline

#26 2007-09-04 19:15:13

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: BBClone stats plugin

Hmmm – it means that you dont have to put the bbcdir in you poe_bbclone tag, cause it’s already defined in the plugin code.


françois

Offline

#27 2007-09-04 19:23:14

woollyhat
Member
Registered: 2006-12-28
Posts: 12

Re: BBClone stats plugin

Okay, after removing the directory attribute from the tag, I still get the following error:

tag_error <txp:poe_bbclone/> -> Notice: Constant _BBCLONE_DIR already defined on line 32

textpattern/lib/txplib_misc.php(512) : eval()’d code:32 define(_BBCLONE_DIR, /home/customers/intranet.btcv.org.uk/htdocs/blogs/bbclone/)
textpattern/publish.php:958 poe_bbclone(Array, , <txp:poe_bbclone />)
processTags(Array)

Offline

Board footer

Powered by FluxBB