Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-07-03 23:16:51

grapeice925
Archived Plugin Author
Registered: 2004-03-25
Posts: 5

Hack: Save New button

Hi all, I created a tiny hack in Textpattern (not a plugin!) that fixed an issue that was outlined in this forum topic: http://forum.textpattern.com/viewtopic.php?id=2566. Don’t know if this will help anyone, but again, thought I would post it out here so people that may need it could see how it is done.

Essentially, this is a “Save New” button that appears when you are editing an existing article, so that if you make enough changes and want to use it as an existing article, you can definitely do so.

In the textpattern directory (or whatever directory you installed the textpattern software), look in the include/txp_article.php file.

Go to line 696, where you will see this line:

<code>fInput(‘submit’,‘save’,gTxt(‘save’),“publish”)</code>

And replace and add to it, resulting in the following (the current line and the hack should all be on one line):

<code>fInput(‘submit’,‘save’,gTxt(‘save’),“publish”) . ‘<br />’ . fInput(‘submit’,‘publish’,gTxt(‘save_new’),“publish”)</code>

Jon

Offline

#2 2004-07-03 23:36:00

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Hack: Save New button

Really really useful, thanks. I hope this becomes part of the core code.

Can the button be made to fit the button lebel better?

Lee

Offline

#3 2004-07-04 09:49:17

grapeice925
Archived Plugin Author
Registered: 2004-03-25
Posts: 5

Re: Hack: Save New button

Thanks lee, glad it was helpful. I’m looking at the button in both Safari and Internet Explorer (both on the Mac) and the button seems to encompass the words “Save New” without any problems. What browser are you using to view it?

Offline

#4 2004-07-04 12:15:10

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Hack: Save New button

Hi, XP/IE6.
The save new button is exactly the same size at the save button. The w in new is right up against the edge, even cut oo by a pixel or 2. No big deal really. Thanks again.

Offline

#5 2005-04-07 18:19:20

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

Re: Hack: Save New button

Converted to plugin: upm_savenew

Offline

#6 2005-04-07 21:42:28

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Hack: Save New button

That was kind of you, thanks.

Offline

Board footer

Powered by FluxBB