Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-10-10 15:09:34

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Removing "Preview" from Forms tab

Just lately I have been using some code generously donated by Bert (hcgtv) which removes the “Preview” button and related text from the Forms tab. Everything else then fits onto a single line more in keeping with the Pages and Style tabs. Apart from the consistency it reduces page height as well.

Here is an image showing the result (Vitraux theme).

The code requires modifications to the “form_edit” function in the “txp_form.php” file. You can see it here.

Back in the mists of time when Txp was still growing up such a facility was no doubt useful to many though I have to say that I have hardly ever used it myself. These days though, most browsers have “tabbing” so it is for me a lot more convenient to have the site open in a second tab and simply switch when I have made any modifications to, or created a form template. I also have the feeling that it always assumes that you want to preview in the default section so you don’t really see what you want if the form is section specific. I’m just wondering if many people still use this facility and, if not, whether it could be removed?

Last edited by thebombsite (2010-10-10 15:17:25)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2010-10-10 16:21:18

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: Removing "Preview" from Forms tab

Remove it for me.

In the past I’ve often clicked it and been presented with baffling, completely unrepresentative results, so Like Stuart I just open another tab now and preview form changes that way.


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#3 2010-10-10 16:42:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Removing "Preview" from Forms tab

I never use it, so I don’t mind if it goes :)

Offline

#4 2010-10-10 16:43:12

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

Re: Removing "Preview" from Forms tab

I’ve never seen the point of it either but someone might use it. Uhhh, maybe.

I too find it just doesn’t seem to show what I expect so feels a bit of a pointless feature. And since you can only preview article forms — which typically make up less than a third (if that) of all Forms on most of my sites — having it take up real estate when it can’t even be used on the current (non-article) form is daft.

I won’t do anything just yet for 4.3.0 though, as my time is tight over the next few weeks. Plus we need to wait to see if anyone chimes in who can actually defend it. Sam or Robert may elect to do something about it for 4.3.0 or we could defer this to TXP 5 when we streamline the default forms.


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

#5 2010-10-10 17:35:31

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

Re: Removing "Preview" from Forms tab

You might be interested in the fact that we have a release candidate for 4.3.0 ;)

Offline

#6 2010-10-10 17:52:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Removing "Preview" from Forms tab

I know that Robert, though a release candidate rarely holds any surprises for me as I use the SVN version anyway. ;)

I’m not worried if this has to wait for 5.0.0, I was just testing the water to see what reaction there might be.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2010-10-10 18:24:06

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Removing "Preview" from Forms tab

Now that Stuart has tested his water with regard to the forms preview button, it’s down the plug hole with it I say.

Offline

#8 2010-10-10 20:21:02

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Removing "Preview" from Forms tab

Ha haa! Well I have mine thank you. It can be done fairly simply anyway. It obviously isn’t going to make the 4.3.0 base code because we are already at the RC1 stage. But is it redundant code? What I was really testing was “does anyone actually use this facility and get something useful from it?”. It sort of reminds me of that secondary style facility we’ve just removed.

I suspect a certain amount of removal can be done with CSS though it still leaves the problem of getting it onto a single line with those hard-coded <br /> tags.

Still, where would we be now if awkward people like me didn’t ask silly questions like this. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2010-10-10 20:42:57

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Removing "Preview" from Forms tab

I think this “preview form mode” is really difficult to understand. And more difficult to use on complicated sites. I can’t understand 100% how this feature works :) And all the experience I had with it, when pressed it by occasion and got very strnage site look :) I vote for eliminating this feature and deleting all code from core, which is invoked.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#10 2010-10-10 20:43:19

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Removing "Preview" from Forms tab

thebombsite wrote:

What I was really testing was “does anyone actually use this facility and get something useful from it?”.

No, as far as I’m concerned it can go. I only tried it long time ago and it didn’t look like anything on the real site anyway.

In general I’m all for removing features that get little to no use at all. That warrants a separate, dedicated thread.

Offline

#11 2010-10-12 01:39:36

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Removing "Preview" from Forms tab

This button has probably done more damage than good to TXPs popularity.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#12 2010-10-12 02:36:37

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Removing "Preview" from Forms tab

masa wrote:

In general I’m all for removing features that get little to no use at all. That warrants a separate, dedicated thread.

That would be a good thread to start, I’d join in and offer my views.

As for the removing the preview button, I just hacked a quick solution to see how it how it would look and because the feature doesn’t work that well anyway. I’ve been working on a new site using the 4.3 code base and with the Tag Builder removed, the text areas widened and the save button in the same spot across the pages, forms and style tabs I’ve been much faster in coding up the site, feels like a new CMS.

Stuart asked for the hack and I posted it for his usage, didn’t think we’d get into a features tug of war.

Which brings another question, it seems like any feature changes are getting thrown towards TxP 5.0, of which I have no idea what the timeline for that is going to be. Is 5.0 the next release or is there going to more 4.x’s in the interim?

Offline

Board footer

Powered by FluxBB