Support Forum

Move "Submit" button

GR gringojason
gringojason
Member

Hello…

When creating a new topic or replaying to an existing topic, I would like to move the line of buttons (“Submit Topic/Reply”, “Cancel”, “Preview”) from below the Smileys and Options menus to either…

1) Ideally, on the same line as the “Upload Attachments” buttons, justified right.

Or…

2) Between the bottom of the reply box and the top of the “Upload Attachments” buttons.

I assume that the 2nd option is easier, probably just moving a lin of PHP around, whereas the first option may require more coding. 

Can you please point me in the right direction? Thanks…

9 Answers

New Answer

MP Mr Papa
Mr Papa
Member

it seems a bit odd to have the form submit buttons above elements of the form itself…  seems like a confusing UIX… does the stuff below the buttons go with the buttons? (rhetorical question of course)…

you are going to have to create some custom filters to do that…  most of the sections of the submit form have filters on them… you will need to remove the buttons from the location you do not want and then copy the code from our form to your custom function in order to add them back in…

actually quickly looking at the submit section, its not that easy – doesnt look like its uniquely filterable…

so you would need to filter on ‘sph_post_editor_controls’ and replace the current spEditorSubmitButton div section with an empty string…

then you could filter on ‘sph_post_editor_footer_top’ and add the code you removed back in…  it would actually be duplicating it since the latter actually occurs first…

so definitely possible and doable, but a bit of a mess if you are not familiar with hooks and filters…  we might need to look into filtering each of the sections separately so they could be removed or added to much easier…

YS Yellow Swordfish
Yellow Swordfish
Member

I see that Steve (Mr Papa) has opened a ticket on this – which makes sense – and that means we will get some extra filtering in place to help make what you want to do a simpler task. We will aim to get that into 5.1.2 so I would advise waiting for that if you can. Wont be long in coming.

GR gringojason
gringojason
Member

I can definitely wait. Thanks for the effort and the update. In the meantime, I would like to remove the button “View Existing Media Uploads” and just have the 3 buttons that you guys have here (“Upload Attachments”, “View Existing Image Uploads” and “View Existing File Uploads”). How do I make that button disappear? I disabled media uploads in the settings, but that did not remove the button. Thanks…

MP Mr Papa
Mr Papa
Member

working the code changes tonight… will need testing but looks good for 5.1.2…

the view existing media uploads button will disappear if you dont have permission to do so…  BUT keep in mind, as admin, you have permission to do everything… so was this viewed as admin? or regular user where you still see the button?

GR gringojason
gringojason
Member

Great point…I was viewing as admin. So I logged in as a user and this is what it looks like. Why are the buttons stacking? Do they do that by default? Is there a way to make them uniform and next to each other, like on the forum here? Thanks…

attachements-shot.jpg
YS Yellow Swordfish
Yellow Swordfish
Member

Most commonly if they are stacked like that it is an artifact – or leakage – from your Wp theme CSS. if you know how to use a tool like Firebug you can inspect the CSS on the page to see what might be the cause… We can do it but we would need a user account so we could actually see the buttons…

BR Brandon
Brandon
Member

That looks like the issue on ticket #3124 in the Simple:Press development and bug tracker.
http://mantis.simple-press.com/view.php?id=3124

It should be fixed in the next update.

GR gringojason
gringojason
Member

Awesome. Looking forward to the update. Thanks!!