Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: How to for writers
phiw13 wrote #320842:
It only sort of work on a very good day. The lady often and regularly forgets how to view (view link) or access (search the article by date/ id in the backend).
You need documentation for the documentation, you know. ;)
(I still think a printable PDF is the fall back for most of the world. It enables them to remain in the panel context they’re trying to do something in while looking at the docs too, while using it to fan themselves.)
Offline
Re: How to for writers
There will be nothing stopping anyone creating a pdf, and uploading it on site for future reference:) I think that the idea is extending rather than excluding any other currently used methods.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How to for writers
The Start area was designed specifically for this, as jakob says. Use it like he says. Or there’s nothing to stop you writing a how-to guide here, even making a bunch of documentation tabs linked from the first
Btw, instead of writing this as a plugin or using smd_tabber, you should be able to do it as part of your theme if you hook into some callbacks with it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: How to for writers
Bloke wrote #320851:
The Start area was designed specifically for this, as jakob says. Use it like he says. Or there’s nothing to stop you writing a how-to guide here, even making a bunch of documentation tabs linked from the first
Btw, instead of writing this as a plugin or using smd_tabber, you should be able to do it as part of your theme if you hook into some callbacks with it.
Hold your horses:) The idea, is of no use to me. I have no website clients and the sites I am working on, are administrated fully by me with contributors who they have nothing to do with the back end. This is an idea which, I think that it will assist the designers, many of whom might know xml type syntaxes (like the txp tags), but they might have very little knowledge of php. Shouldn’t this be one group txp should be targeting?
ps… I just downloaded the tabber to experiment with its capabilities:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How to for writers
Bloke wrote #320851:
Btw, instead of writing this as a plugin or using smd_tabber, you should be able to do it as part of your theme if you hook into some callbacks with it.
Nice! Can you elaborate on this?
TXP Builders – finely-crafted code, design and txp
Offline
Re: How to for writers
jakob wrote #320854:
Nice! Can you elaborate on this?
Certainly. In your theme’s .php file, just after the class opening definition, add a constructor:
public function __construct()
{
if (!has_handler('abc_dashboard')) {
add_privs('tab.start', '1,2,3,4,5,6');
add_privs('abc_dashboard', '1,2,3,4,5,6');
register_tab('start', 'abc_dashboard', 'My Dashboard');
register_callback(array($this, 'draw'), 'abc_dashboard');
}
$this_theme = str_replace('_theme', '', __CLASS__);
parent::__construct($this_theme);
}
Then, somewhere within your theme’s class, define your draw() method that will render your initial tab contents:
public function draw($evt, $stp)
{
echo pagetop();
echo '<h1>Hello dashboard world</h1>';
echo '<p>Pleased to meet you!</p>';
}
Job done. Rinse and repeat the callback/tab registration in the conditional inside your constructor with as many tabs as you like and pass control of each to their own method.
You can use all plugin-type features here: even steps if you wish so you can show different content based on the &step= in the URL. That would enable you to have one draw() method and differentiate on the step instead.
The above is all smd_tabber does, just wrapping this up with some UI fluff.
If you want to defer control of content to a page, then use something like this in your draw() method (untested):
include_once txpath.'/publish.php';
$html = fetch_page('some-page', 'some-public-theme');
echo parse($html);
That should get you going.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline