Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-07-12 15:21:07

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: Better support for "static pages" by hiding sections on the write tab

Mary wrote:

bq. …is about 3-15 lines of code I guess.
bq. It’s more than that.

The whole diff I made was about 70 lines. It does (truncated) section titles instead of names ad hoc, which is adding lines. That new feature was asked too btw. (Tag builder’s section popper uses titles already. Is that the reason making the request semi-fixed and worth ignoring? Puzzling the consistency is.)

So – no. It really isn’t more than that. And do remember I said it depends how one counts those lines.

You have to modify the database table, the sections and article tab.

Yes, I did all those. Updated table with safe_alter, added radio buttons to sections, changed the SQL for section_popup().

You missed txp_tag.php btw.

There’s more to it than “how many lines does this add or change”.

Of course. Most of the maintaining is to have old code haunting. If I was a dev I sure too would like picking my nightmares. Yet features thrive on code.

In case it has been overlooked, I’ve said on several occasions that we’re avoiding adding new features to 4.0.x and shifted focus to the crockery branch.

Users have heard all versions of mantras devs have. Every “it’s in the crockery”, “perhaps in crockery”, “could be done in crockery”, “can’t be done” and their plugin-flavours. I wait for the “can be done in crockery with a plugin”. Not a very friendly way to treat suggestions and requests. This isn’t the first time making static pages easier is asked either.

Devs should say aloud 4.0.x is frozen, stop developing it and really leave it for bugfixes only. Instead of repeating that. Updating jQuery to 1.1.3 while repeating “bugfixes only” contradicts. jQuery isn’t that essential yet. But that won’t happen – freezing 4.0.x would make it officially deprecated and AFAIK crockery isn’t near primetime. So there wouldn’t be any fresh TxP flavour available. Not a very good move to grow userbase.

Besides, when has TxP seen a feature NIH anyway. Wet has said he don’t like such things (though on one subject) and it describes the concensus. Not getting more identifiers yet getting “<tr id=“branding”> supports that. Yes, I’m bitter.

Now to think of it – what features in the last 3 versions have come from users’ feature ideas/requests? “You don’t need that! There’s nothing wrong!” is a silly excuse. So is “we don’t get enough patches”. Why would someone like patching a deprecated branch if it’s clearly obvious patches will be categorically ignored in silence as useless?

The more new stuff (features) added to 4.0.x, the more likely upgrading to the next major version (crockery) will be complicated, possibly broken,

That’s a nice way to think features – something to avoid to make upgrading easy. Major versions often break stuff; how feature-less is a value beats me. It’s not about having all the features, it’s about having at least some.

and that adds up fast (think large numbers of manual changes on your part for each site).

Yeah, sounds bad. From experience I can tell it is – I have to patch and tweak every site I build with TXP already. And again after upgrading. I’m still running 4.0.3 because I too lack the time. It’s not a dev’s privilege.

It it in the user’s best interest that we be careful about 4.0.x feature changes, especially when adding them is only resolving a minor irritation (know that each of the developers run several sites on Txp, so we can totally understand).

I’m so awed with several. Ever thought that users might run several sites too? 5 installations has 7-15 users all needing to publish images and files. Not all users treat their TxP installations as “nice blogs”. If I had known TxP won’t scale over 4 bloggers I wouldn’t have picked it. Even selecting articles becomes a chore with over 1000 articles and 15 users, images and files are horrifying remembering it is year 1998. No, wait – it is 2007. It’s too late to pick another poison when it is running the system.

You see, even TxP users might have people to support.


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#17 2007-07-12 16:01:47

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: Better support for "static pages" by hiding sections on the write tab

Whoa … Anoke … that was a pretty hardy rant. And to Mary and the others, I’d like to counter by saying your approach seems measured and careful, and correct. For me, it’s much better to have a seamless upgrade1 than new features that I don’t need. Anoke, your feature request could be fulfilled by a plugin.

I’d just like to point out that a simple, straightforward solution was presented by me above, using existing TXP and not requiring anything but a little of if-this-then-that.

  • Ben

1 I upgraded to 4.0.5 — getting the bugfixes and the security fix — without a single problem, in five minutes.

Last edited by benbruce (2007-07-12 19:04:34)

Offline

#18 2007-07-12 17:57:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Better support for "static pages" by hiding sections on the write tab

Ben,
probably I’m wrong but I’m not sure you understood what alesh was asking for. He was talking about the sections dropdown in the write tab so I think your solution won’t work here…

Offline

#19 2007-07-12 19:02:45

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: Better support for "static pages" by hiding sections on the write tab

redbot,

Yup, you’re right — I’m confused. I did manage to bring down the number of Pages, though, didn’t I?

;)

In any case, my point about the devs taking a measured stance stands on its own — I’d rather have them decline features they think will add bugs.

  • Ben

Last edited by benbruce (2007-07-12 19:14:50)

Offline

#20 2007-07-12 19:32:09

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: Better support for "static pages" by hiding sections on the write tab

anoke wrote:

Wet has said he don’t like such things (though on one subject)

It’s not about what I like or dislike, but about necessities. Maybe I was a little unclear with my opinion on additional element ids, but I tried to express that these are not generally necessary as most of the interface elements are easily found by a jQuery selection. And judging from your answer I thought you were content with my reply then, and wanted to start learning jQuery: $("form.search-form").

Offline

#21 2007-07-13 07:32:33

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: Better support for "static pages" by hiding sections on the write tab

benbruce wrote:

Whoa … Anoke … that was a pretty hardy rant. And to Mary and the others, I’d like to counter by saying your approach seems measured and careful, and correct. For me, it’s much better to have a seamless upgrade1 than new features that I don’t need

Yes, it was :( And true, 80% of people use 20% features. I still don’t get the “every feature will bring this shattering apart”-idea. Especially if some features are already implemented in the core since 404. Surely that is tested.

Anoke, your feature request could be fulfilled by a plugin.

Did you read the first page? It was said a plugin couldn’t do that. Yet it can be done, in a very “this is an awful mess, why I have to inject HTML, why there isn’t callback for section_popup function or category_popup?” way. Why should someone (like me) care asking for new core functionality to build plugins on if even the features that could be built are considered merely useless?

These aren’t the dro^h^h^h features your looking for, hm?

Wet: yes, and still am. jQuery is a total new thing (but got hooked already :) to me. The more I understand it, the more I wish for a few classes and ids though. Oneliners start wrapping.


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#22 2007-07-13 14:15:09

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Better support for "static pages" by hiding sections on the write tab

Also remember that jQuery supports a lot of XPath type selectors. So you can do things like $("//div/a[href=‘http://www.textpattern.com’]”)@ and select links that point to texpattern.com or $("#article-col-1 h3.plain:last") to get the last header toggle in the left column of the write tab.

It gives you lots and lots of freedom.

Last edited by hakjoon (2007-07-13 14:21:37)


Shoving is the answer – pusher robot

Offline

#23 2007-07-13 17:44:10

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Better support for "static pages" by hiding sections on the write tab

Personally, I have no problem waiting for version 4.1. After all this is a convenience feature, not something I need. If the developers recognize the usefulness and want to implement it at some point, I’m satisfied.

Personally, I think the “Can contain articles” option is less flexible then “Show section in write tab”, because it allows for the 1-article sections, sections that have articles added to them very infrequently, and for old section that has a bunch of articles but which is for whatever reason closed.

I’m not sure lashing out at the developers is helpful… they’re volunteering their time and it’s their prerogative to steer TXP in the direction they see fit. Managing this many lines of code, and this many competing interests and priorities, is more of a headache then I’d care to partake in, even for a handsome salary. Thanks to all the developers!


Yes, I have tried turning it off and on.

Offline

#24 2007-07-14 03:34:29

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Better support for "static pages" by hiding sections on the write tab

Devs should say aloud 4.0.x is frozen, stop developing it and really leave it for bugfixes only.

I have. We have. If you took 5 minutes to calm down and look at what’s actually happening, you’d see that. jQuery isn’t ‘ours’, isn’t used by 4.0.x and will not be. I fail to see how updating an external, an unused library, included for user convenience, is active development of a new feature.

Anyway, yes Alesh, we realize this can be handled better and we’re working to improve the situation. In the meantime, there are, as benbruce points out, ways to work around the current difficulty. :)

Offline

#25 2007-11-25 17:46:59

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Better support for "static pages" by hiding sections on the write tab

Alesh,
I think I found a solution to your initial question.
replace
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.'>'.htmlspecialchars($alabel).'</option>';
with
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.' class="option_'.htmlspecialchars($avalue).'"'.'>'.htmlspecialchars($alabel).'</option>';
around line 80 in txplib_forms.
This will simply add a class=“option_(section name)” to every item in the section dropdown of the “write” tab (and also in any other dropdown in txp interface).
Now you can hide a section via css adding in your textpattern.css something like
option.option_about { display:none; }
Note that I used the prefix “option_” to avoid any possible conflict with other class names.
That’s all, usually I tend to avoid hacks but I think this won’t do any harm.

Last edited by redbot (2007-11-26 01:17:22)

Offline

#26 2007-11-27 22:08:04

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Better support for "static pages" by hiding sections on the write tab

I have used the one post per section another time and I think this is a great idea. But I am also patient enough to wait for it to be implemented.

Reading over this thread (as well as some of the others) it sometimes seems like the disconnect isn’t whether or not a feature will make it into 4.0.x but rather is it something the developers are interested in pursuing at all.

Offline

#27 2009-07-10 07:57:11

divan
New Member
From: Ukraine
Registered: 2009-04-30
Posts: 7

Re: Better support for "static pages" by hiding sections on the write tab

And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.

Offline

#28 2009-07-10 09:32:32

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

Re: Better support for "static pages" by hiding sections on the write tab

divan wrote:

And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.

the hide in admin plugin hides back end interface elements from users other than admins. So if you have your “news” as default you’d have that ability.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB