How to load custom "tools" index.php/tools/required/mytool.php
PermalinkNot blocks, packages, single pages etc.
Tools. Like how on the dashboard the statistics flash thing is shown. I want to add my custom flashy thing and the only way I get it to work in placing it directly in the tools directory in the "core" concrete directory.
How to request it like this: index.php/tools/required/mytool
(or a similar url)
and have it place in this
concreteroot/tools/mytool.php
and not in
concreteroot/concrete/tools/mytool.php
I'm sure someone knows and if I get this too work I will be one step closer to making a sharable BASIC statistics thingy.
concreteroot/tools
you then add /mytool.php
If your talking about website statistics. I have already developed a package that uses BBClone. It's just waiting for the core team to approve it for the marketplace. It'll be a free package.
What I mean is this:
For build in tools C5 uses this constant: REL_DIR_FILES_TOOLS_REQUIRED = /concrete/index.php/tools/required/basicstats/chart_handler.php
So I thought... well mabye I need this one:
REL_DIR_FILES_TOOLS = /concrete/index.php/tools/basicstats/chart_handler.php
But.. nooo....
so.. it's not the required/ thing, but what then? Why is it not loading that tool from the root/tools/basicstats/ directory?
So if I create a file in c5root/tools/ called test.php, and I can access it via the path:
$url=REL_DIR_FILES_TOOLS.'/test/';
You should get access denied, but nothing.. just nothing.
I'm using this code:
<?php echo "flashvars = { 'data': '".BASE_URL.REL_DIR_FILES_TOOLS_REQUIRED."/basicstats/chart_handler' }"; ?>
And when placing it in the tools dir in the concrete dir, I use this one:
<?php echo "flashvars = { 'data': '".BASE_URL.REL_DIR_FILES_TOOLS."/basicstats/chart_handler' }"; ?>
And that works, but why not the other one?
$uh = Loader::helper('concrete/urls');
$bt = BlockType::getByHandle('document_library');
$url = $uh->getBlockTypeToolsURL($bt, 'advanced_search.php');
I really like to know how, as the documentation doesn't help me.