We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Extension: Publish Tweeks

Development and Programming

Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

Fred/Travis,

Nice to see nGen File Field worling like a charm now. Last I tried it, there were some issues with Playa, but doesn’t seem to be a problem now - Not sure if you guys or Brandon fixed that, but good to see it good and dandy now.

I think using this makes a lot of sense with nGen File Field since the default redirect behaviour to the preview page is pretty pointless (as it doesn’t show image previews). Add in an LG Live Look tab and you’re pretty good to go with a publishing workflow that is more sensible.

I think a delete button appear beside the save button after a submission has been saved makes sense. It’s tedious enough having to go into edit, select a check box, choose delete from a dropbox, then clicking submit. Just a suggestion!

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
16 years ago
Dom Stubbs's avatar Dom Stubbs

Thanks for this addon, it looks extremely handy. One thing that occurred to me is that I don’t really want the ‘Saved!’ message hanging around once the user has updated their entry. If they keep working on it and then save again there is no new element on the page to confirm that they update’s been successful, as the ‘Saved!’ message was already there from the last update.

Fortunately a little bit of jQuery makes it really simple to have the saved message fade out after a few seconds:

[script type="text/javascript"]
$(document).ready(function () {
    $("#message-publish-tweeks")
    .animate({opacity: 1.0}, 5000)
    .fadeOut("slow");
});
[/script]

I imagine there are lots of ways you could add this to the markup. I’m using Leevi’s Add Sitename extension, so I just placed it in the XHTML field that includes. The above code will make the saved message disappear after 5 seconds - you can adjust that by modifying the 5000 variable.

       
Peter Lewis's avatar
Peter Lewis
280 posts
16 years ago
Peter Lewis's avatar Peter Lewis

@Dom.S - Genius! Excellent tip.

       
Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

It would be really great if Dom.S’s code were added to extension!

       
Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

Hi again,

Found a way to add Dom.S’s code to extension.

To add it open the file exp.publish_tweaks.php in text editor and found the line 175:



Change it with this code:



THat’s it! Now the message “Saved!” will fade out after a few seconds.

       
Laisvunas's avatar
Laisvunas
879 posts
16 years ago
Laisvunas's avatar Laisvunas

Hi Travis,

Just found that Publish Tweaks extension it does not play well with Reeveal Comments extension.

If Publish Tweaks extension is disabled, then Reeveal Comments works correctly, but with Publish Tweaks enabled Reeveal Comments does not work - no comments in Comment tab are shown.

It seems that Publish Tweaks somehow clashes with Reveal Comments extension and prevents it from working correctly.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Hmm that’s odd - I’ve got both those extensions enabled on my blog with no difficulties.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Using 0.8 I found an odd behaviour which looks like a bug. I am setting up a new website, and only have 1 weblog currently. Using the publish tab, if I use the hover state and click on my weblog start a new entry then publish tweaks works fine. But, if I click on the publish tab to start a new entry (not the hover state name of my weblog), it automatically starts one from my one and only weblog, in which case publish tweaks doesn’t work - all buttons and the file upload link are all there.

I’ve noticed that the breadcrumbs in the CP to the publish page are actually different when getting there these two different ways - when it is working (click on the hover state of publish tab) you’re here:

CP Home › Publish › New Entry › Page

But if you just click on the publish tab and it starts one automatically for you you’re here:

CP Home › New Entry › Page

That’s not handled by your extension obviously, but thought it might help in debugging…

Thanks for the great extension!

       
jakepaul's avatar
jakepaul
19 posts
16 years ago
jakepaul's avatar jakepaul
Using 0.8 I found an odd behaviour which looks like a bug. I am setting up a new website, and only have 1 weblog currently. Using the publish tab, if I use the hover state and click on my weblog start a new entry then publish tweaks works fine. But, if I click on the publish tab to start a new entry (not the hover state name of my weblog), it automatically starts one from my one and only weblog, in which case publish tweaks doesn’t work - all buttons and the file upload link are all there.

Just want to confirm that I can replicate this behavior. Like Brian, I only notice it when there is only 1 weblog and I click directly on the Publish tab. Any ideas what might cause this?

Thanks for the awesome extension.

Jake

       
Phil Norton's avatar
Phil Norton
41 posts
15 years ago
Phil Norton's avatar Phil Norton

I love this extension. But it doesn’t play nicely with the equally awesome NSM Publish Plus extension, as it hides the required “Draft” buttons etc. If only this extension was more configurable: rather than simply giving the option to remove the upload file box, it’d be great if we could choose what options we wanted to action. So, for me, I’d want to have it redirect to the same page; I’d want it to remove the file upload box; but I’d want it to leave the draft buttons etc.

Is this possible? Or am I missing something?

       
VRDL's avatar
VRDL
23 posts
15 years ago
VRDL's avatar VRDL

I found that the ‘Saved!’ message sometimes a bit confusing. After saving the entry you’ll get the message, but having multiple tabs open with multiple Saved! messages makes it a bit confusing, so I added a bit of code, that removes the message after 10 seconds.

In you extentions, add after line 175 the following code:

$msg .= '
< script type="text/javascript">
$(document).ready(function() {
    $("#message-publish-tweeks")
        .animate({opacity: 1.0}, 10000)
        .hide(2000, function() {
                $(this).remove();
        });
});
</ script>';

(remove the two spaced in the script tags 😊 )

       
Neil Evans's avatar
Neil Evans
1,374 posts
15 years ago
Neil Evans's avatar Neil Evans

Just a quick reply to this… once again a great extension and one that i am using now… However it does seem to throw up a little problem with LG HTACESS Generator!!! Not your fault i know…

The LG Extension (i am pretty sure) uses hooks so that when a new entry is created, and the pages module is used, it updates the htaccess file to include the new pages URI.

At the moment the publish tweeks addon seems to side step this and the htaccess is not updated? This might be because the hook is no longer called, similar or something completely else. But any advice on how to work around this issue is appreciated… link to LG on devotee to see details and hooks used: http://devot-ee.com/add-ons/extensions/lg-htaccess-generator/

Cheers, N

       
GDmac - expocom's avatar
GDmac - expocom
350 posts
15 years ago
GDmac - expocom's avatar GDmac - expocom

Hello publishtweekers. thanks for the tips for fading the msg. Currently i’m trying to add the weblog name to the title field so that editors can more easily distinguish between webogs/channels (see image attachment).

i’m changing the “label for=title” but need a way to get the weblog name. In the “change_submit_buttons” function, just before returning the html, i added:

$new = '<label for="title">weblog_name title</label>';
$find = '#<label for="title">.+?</label>#is';
$html = preg_replace($find, $new, $html);

Is there a way to get weblog_name from some variable or do i need to use a costly db-query?

       
123454329's avatar
123454329
144 posts
15 years ago
123454329's avatar 123454329

is it possible that the ext creates a conflict with “button mode” in the most recent Build: 20091201?

       
LucPestille's avatar
LucPestille
146 posts
15 years ago
LucPestille's avatar LucPestille

I’m having problems with Publish Tweeks on the latest build and using MSM - it seems enabling it in one site enables it in all, and the settings aren’t saved from site to site, which first produces undefined index errors, and then when trying to set preferences, a different php error. Any chance of an update?

       
First 2 3 4 5

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.