Page 1 of 2
BBClone
Posted: Thu Feb 22, 2007 10:22 pm
by johnqpublic
Howdy,
There was a discussion a couple years ago about how to incorporate bbclone with cmsms. There were instructions by Ted on one possible solution, but the file that was to be edited has, from what I can tell, been modified quite a bit since that time. It looks like the difficulty is returning the title of the cmsms page for the counter script to operate properly.
Anyway, here is the earlier discussion:
http://forum.cmsmadesimple.org/index.ph ... 258.0.html
Has anyone been able to get the counter script to work properly with CMS Made Simple? Thanks for your time.
http://bbclone.de/
Re: BBClone
Posted: Fri Feb 23, 2007 6:22 am
by kermit
a bbclone module would be a nice addition for the project...
Re: BBClone
Posted: Fri Feb 23, 2007 6:23 am
by cyberman
There are some similar modules for CMSms (Visitors, Statistics ...).
Re: BBClone
Posted: Fri Feb 23, 2007 7:00 am
by kermit
cyberman wrote:
There are some similar modules for CMSms (Visitors, Statistics ...).
i know that, and i've looked at them... but they are nothing like bbclone (no offense)... or even webalizer, awstats, etc....
cmsms uses many other open source projects, fckeditor, smarty, adodb, etc... so i don't see the need to re-invent the wheel here. bbclone is the king of open source php-driven web site stats.. and no database either, so it should be fairly easy integrate... or provide the necessary tweaks in the core code to allow it's use outside of the cmsms admin panel.
Re: BBClone
Posted: Fri Feb 23, 2007 9:13 am
by kermit
it's too soon to know if it'll break, but at least it's recording data with page titles... AND it required a edit to the code in index.php (something i wanted to avoid)... the one problem i can see right off the bat is the page links in the bbclone pages all point to the site root instead of to the individual page.. but at least it's sorta working.
anyhoo here goes..
extract bbclone to ./bbclone inside your site root. (the downloaded zip file contained everything conveniently inside a folder 'bbclone', so extracting it from ./ did the trick here) -- add write permissions to ./bbclone/var and all the files in it except .htaccess -- modify bbclone config if desired.
edit cmsms's ./index.php to add the bbclone code, right after or right before (i don't think it matters) the echo of the page...
echo $html;
// bbclone (these four lines -- the rest is just to show where it goes)
define("_BBC_PAGE_NAME", $pageinfo->content_title);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
@ob_flush();
$endtime = microtime();
alternatively, you can use content_alias where noted in red. so long as cmsms requires unique page aliases, this'll work just fine. i figure my page aliases will remain the same, but a page title might change occasionally.. so this is the way i did it.
Re: BBClone
Posted: Fri Feb 23, 2007 11:51 am
by cyberman
kermit wrote:
bbclone is the king of open source php-driven web site stats..
Thanks for suggestion - don't know it before ...
For myself I'm using Google Analytics

.
Re: BBClone
Posted: Fri Feb 23, 2007 3:19 pm
by kermit
cyberman wrote:
kermit wrote:
bbclone is the king of open source php-driven web site stats..
Thanks for suggestion - don't know it before ...
For myself I'm using Google Analytics

.
some people choose not to give google any more data to mine

than they're already getting on their own sites.
Re: BBClone
Posted: Sat Feb 24, 2007 8:40 pm
by johnqpublic
kermit wrote:edit cmsms's ./index.php to add the bbclone code, right after or right before (i don't think it matters) the echo of the page...
echo $html;
// bbclone (these four lines -- the rest is just to show where it goes)
define("_BBC_PAGE_NAME", $pageinfo->content_title);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
@ob_flush();
$endtime = microtime();
alternatively, you can use content_alias where noted in red. so long as cmsms requires unique page aliases, this'll work just fine. i figure my page aliases will remain the same, but a page title might change occasionally.. so this is the way i did it.
Thanks for the help, Kermit. This seems to be working just fine.

Re: BBClone
Posted: Tue Jun 03, 2008 8:40 pm
by vilkis
For those who like bbclone and want to include bbclone code in UDT and not in index.php for some reasons. I made some changes in some bbclone files and now it can be included in UDT.
Re: BBClone
Posted: Wed Jun 04, 2008 4:56 am
by cyberman
Maybe you can post the changes here

...
Re: BBClone
Posted: Wed Jun 04, 2008 6:07 am
by vilkis
Of course! In near future.
Re: BBClone
Posted: Wed Jun 04, 2008 5:03 pm
by vilkis
So - I modified the following files:
constants.php
mark_page.php
conf/config.php
lib/io.php
I did nothing else only made some variables global. So if you find row with $GLOBALS - it's my modification
These files come in next post.
Re: BBClone
Posted: Wed Jun 04, 2008 5:11 pm
by vilkis
I can't see a php file type as allowed. So I added .txt extension to each file.
Vilkis
Re: BBClone
Posted: Wed Jun 04, 2008 5:15 pm
by vilkis
Now UDT
Code: Select all
global $gCms;
$page_name =$gCms->variables['page_name'];
define("_BBC_PAGE_NAME", $page_name);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include(COUNTER);
should work.
Vilkis
Re: BBClone
Posted: Wed Jun 04, 2008 7:32 pm
by vilkis
Well,

, the empty files were attached - I reattached good ones.