Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2007-09-01 19:12:06
- woollyhat
- Member
- Registered: 2006-12-28
- Posts: 12
Re: BBClone stats plugin
I’ve installed poe_bbclone and BBClone itself seems to be working perfectly – except it’s recording every hit as a hit on the index of my site – and not for the articles themselves.
I’d like to be able to use BBClone to show most popular articles, but at the moment, I have only ONE page that is being visited!
Anything I’m doing wrong? Any help most welcome… thanks in advance
Offline
Re: BBClone stats plugin
What did you put in your head form to call poe_bbclone ?
françois
Offline
#15 2007-09-02 08:41:29
- woollyhat
- Member
- Registered: 2006-12-28
- Posts: 12
Re: BBClone stats plugin
Aha..! I detect a problem already! I couldn’t find any useful documentation on poe_bbclone anywhere. I simply placed <code><txp:poe_bbclone /></code> in the body of the page and not in the head.
Offline
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
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
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
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
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