Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2020-01-05 09:47:00

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: How to for writers

I was just being facetious. My point being, it’s never about the platform or the format. It’s always about humans never wanting to write/maintain documentation. Whether it’s word-processed or tediously marked up with HTML makes no difference in the end. One is as good as the other.

But, I’d say what would work in your case is a URL-less section — e.g. /docs. If that lands, then there’s no additional back-end functionality needed. Write the docs like Txp articles and read them via the View or Preview features from the Write panel.

Offline

#14 2020-01-05 09:58:19

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,224
Website

Re: How to for writers

Destry wrote #320841:

But, I’d say what would work in your case is a URL-less section — e.g. /docs. If that lands, then there’s no additional back-end functionality needed. Write the docs like Txp articles and read them via the View or Preview features from the Write panel.

Nope, that may work for a (smallish) site with few or only one participant. I noted upthread how I used the original ID=1 welcome article as an ersatz for this. 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).

A dedicated menu item as suggested by Colak has a much greater chance of being accessed.

Your point about writing an maintaining the documentation is of course completely correct.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#15 2020-01-05 11:53:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,743
Website

Re: How to for writers

I’ve tried both PDF and html variants:

  • PDF: some clients like to have a printout to refer to, so a PDF with 1-page per topic and a cover “contents-page” is perfect for them.
  • Help section: For the few multi-author sites I’ve done, I just made a separate textpattern section that didn’t appear in the menu or feed and linked to it from the dashboard in the admin area.

The lady often and regularly forgets how to view (view link) or access (search the article by date/ id in the backend).

For me the obvious solution for users who edit infrequently and forget their way around the admin area is a dashboard. Set that as the start page in Admin › Settings and it’s the first thing they see on logging in. You can give them pointers to what they can do, how they can reach what they were last editing, and you can point to your article ID# directory … or output it’s contents in your dashboard.

Here’s some outline code for a very simple dashboard that you can use in conjunction with smd_tabber or similar. I’ve dumbed it down from an own dashboard and used phil’s hive styles so this should give you a welcome message across the top followed by three columns with options and recent articles. You can spruce this up, add things like recent comments, your moderation queue, site stats, links to template articles to use as starting points or add a big “Let me just write…” button to skip the dashboard.

<div class="txp-layout  welcome-dashboard">

    <div class="txp-layout-1col">
        <h1>Welcome to <txp:site_name /></h1>
    </div>

    <div class="txp-layout-4col">
        <p>Welcome to the Admin area. Here you can write and edit articles, enter new projects, check for new comments or post suggestions and upload files and images.</p>

        <h3>Need help?</h3>
        <p>See the <a href="/link-to-your-helf-file">quick start reference</a>.</p>
        <p>If you have any problems or questions <a href="mailto:admin“@site.com>send the admin a quick email</a>.</p>
    </div>

    <div class="txp-layout-4col">
        <h3>What would you like to do?</h3>
        <ul id="welcome_options">
            <li class="article"><a href="?event=article">Write a new article</a></li>
            <li class="list"><a href="?event=list">See the existing articles</a></li>
            <li class="image"><a href="?event=image">Upload an image</a></li>
            <li class="file"><a href="?event=file">Upload a file</a></li>
            <li class="password"><a href="?event=admin">Change my password</a></li>
        </ul>
    </div>

    <div class="txp-layout-4col">
        <h3>Recent articles:</h3>
        <txp:article_custom limit="5" wraptag="ul" break="li">
            <a href="?event=article&step=edit&ID=<txp:article_id />"><txp:title /></a>
        </txp:article_custom>
        <p><txp:article_custom limit="9999" pageby="1" pgonly /> articles in total. <a href="?event=list">&rsaquo; see all</a></p>
    </div>

</div>

You can go crazy and style this all nicely, add icons, etc.

BTW: I have this topic on my list of txptips to write (but it won’t happen right away).

@Phil: BTW, could we perhaps have a .txp-layout-3col in the hive patterns? On my own site, I’ve used your 4col and added style="width:33%" to override it.


TXP Builders – finely-crafted code, design and txp

Offline

#16 2020-01-05 12:31:08

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

#17 2020-01-05 13:11:27

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,093
Website GitHub Mastodon Twitter

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

#18 2020-01-05 16:57:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#19 2020-01-05 18:18:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,093
Website GitHub Mastodon Twitter

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

#20 2020-01-05 18:43:57

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,743
Website

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

#21 2020-01-05 22:19:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

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.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB