Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-21 16:41:39

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Some suggestions

Hi Wet.

What do you think about this :

1.° Your lastest revisions are very usefull (from 3196 to 3202). Tks lot.
Perhaps you could add a better message for unauthorized users: instead of ‘restricted_area’ what do you think about ‘permissions_needed’?

2.° It will be usefull if “HISTORY.txt” could be read within the “diag” tab :

Sample code (yours will be better :) in file /textpattern/txp_diag.php (line #585 on TXP V.4.0.9) :

echo tr(td(join('',$out))), read_history(), endTable(); } function read_history() { $out = tr(td('<h1>'.gTxt('history_file').'</h1>')); $out .= '<tr><td><textarea cols="78" rows="18" readonly="readonly" style="width: 500px; height: 300px;">'; $history = fopen('../HISTORY.txt','r'); while (!feof ($history)) { $buffer = fgets($history, 4096); $out .= $buffer; } fclose($history); $out .= '</textarea></td></tr>'; echo $out; } ?>

3. It’s easy to offer the possibility to hide sections for non administrators without the need of the orphan sed_sections plugin (this feature had been asked a long time ago )

in file /textpattern/include/section.php (line #132 ) :

n.n.tr( fLabelCell(gTxt('section_hidden')). td( yesnoradio('is_hidden', $is_hidden, '', $name).sp.popHelp('section_is_hidden') , '', 'noline') ).

in line (#220) :

if ($name) { $rs = safe_insert( "txp_section", "name = '".doSlash($name) ."', title = '".doSlash($title)."', page = 'default', css = 'default', is_hidden = $is_hidden, is_default = 0, in_rss = 1, on_frontpage = 1" );

line (#283) :

else { extract(array_map('assert_int',psa(array('is_hidden','is_default','on_frontpage','in_rss','searchable')))); // note this means 'selected by default' not 'default page' if ($is_default) { safe_update("txp_section", "is_hidden = 1", "is_default = 0", "name != '$old_name'"); } safe_update('txp_section', " name = '$name', title = '$title', page = '$page', css = '$css', is_hidden = $is_hidden, is_default = $is_default, on_frontpage = $on_frontpage, in_rss = $in_rss, searchable = $searchable ", "name = '$old_name'"); safe_update('textpattern', "Section = '$name'", "Section = '$old_name'"); update_lastmod(); }

… and the ‘section’ table need a new column : ‘is_hidden’ to store a boolean value in this example (you can see the result here ).

4.° For French translators :

I think the sub tab title “Organize” (Organiser in French) isn’t correct. This sub tab offer access to categories only. What do you think about “Categorize” (Catégorisation in French)

Best regards Wet,

Last edited by Pat64 (2009-05-22 19:18:26)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2009-05-26 08:52:00

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Some suggestions

Thanks for your suggestions. I’ll try to explain my stance on each of them:

Pat64 wrote:

Perhaps you could add a better message for unauthorized users: instead of ‘restricted_area’ what do you think about ‘permissions_needed’?

Semantically, it’s a matter of “cause” vs. “result” terminology, and therefore a reason for endless debates. I pragmatically chose “restricted_area” because we have translations for this particular string from other places, and we won’t put more burden on our translators than necessary by introducing new strings just for the fun of it. So, if no-one will come up with a killer argument for your proposed terminology, the text will stay this way.

It will be usefull if “HISTORY.txt” could be read within the “diag” tab :

Care to explain the alleged usefulness, please?

It’s easy to offer the possibility to hide sections for non administrators without the need of the orphan sed_sections plugin

We still have no concept for permissions which would fit nicely into such a feature, so I’d rather delegate this feature into the realm of plugins where compatibility is a lesser concern. All necessary hooks have been introduced into the core to make the user experience as smooth as an avid plugin programmer could imagine.

I think the sub tab title “Organize” (Organiser in French) isn’t correct.

The original en-gb text is “Categories”, so you probably wouldn’t have to exert much pressure to convince the current French translator Jeremie to use your wording in the French translation.

Offline

#3 2009-07-02 19:02:14

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Some suggestions

Robert,

Tks for your very technical answer.

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB