As per xxdex's request, here's a simple plugin so that you don't have to edit NM files.
News Manager Auto-open Post Options 0.1 - download
Automatically open the post options when editing News Manager posts
(similar to what this plugin does for pages, but not remembering last state)
Optional:
- To enable only when creating new posts (but not editing existing ones), add this to your site's gsconfig.php file:
Code:
define('NMAUTOOPEN','new');
- To disable auto-open without deactivating the plugin:
2014-09-26, 07:50:20 (This post was last modified: 2014-09-26, 07:52:34 by TeeJay.)
I've just published a post with a text-based image (too bad for jpg) - 900x471px, text "Bootstrap classes", large letters (72 font-size). The PhotoShop export looked great, 75 JPG quality and 33 kB in size. I uploaded it to my site, added to the article and got shocked by the compression it must have gone through. The file got like 8 kB smaller, but the quality went down rapidly (I'm aware that it looked so bad just because there's the text in the image, but that's what the image is like and I can't use PNG because of pic.php - I could edit it, but I don't need png for every post's image).
So I checked pic.php and changed line 75
Code:
imagejpeg($dst, $thumbdir.$outfile, 75);
so that the quality became 100.
Now, it almost doesn't decrease the quality (it still does but nothing serious), but the filesize is now 88 kB instead of 33 kB (and the quality is still slightly worse as it uselessly (in this case) went though the jpeg generating process again).
I don't really need News Manager to recompress my images - I do upload them in the final resolution that I use on the frontend. I'm fine with recompression for the sidebar thumbs, but for the main image not - it just causes my files to be bigger or/and worse quality.
I know I could play with the number and set 90 or something like that, but I'd be glad if I could just choose to skip the recompression for the nmimage*.jpg that is not gonna be resized (uploaded in the final resolution) and also change the quality value in the administration via custom settings in the textarea.
Is there a possibility that you'll add such feature in the future?
Thank you. If not, I'll edit pic.php myself and just overwrite it each time I update, but there might be other people that would use this feature as well - who knows. Just an idea, thanks for consideration
I remember this solution: you already post it a couple of years ago. Right?
(2014-09-26, 01:58:18)Carlos Wrote: As per xxdex's request, here's a simple plugin so that you don't have to edit NM files.
News Manager Auto-open Post Options 0.1 - download
Automatically open the post options when editing News Manager posts
(similar to what this plugin does for pages, but not remembering last state)
Optional:
- To enable only when creating new posts (but not editing existing ones), add this to your site's gsconfig.php file:
Code:
define('NMAUTOOPEN','new');
- To disable auto-open without deactivating the plugin:
@TeeJay
You can skip resizing/recompressing your post images by setting both width and height to 0 (or leave empty) in NM settings.
(Or if you wish to apply this only to single posts, by using custom setting single imagesize full)
@D.O.
What I fixed 2 years ago was an issue with post options not visible with javascript disabled.
I managed to bring News Manager individual post title tags together with individual page title tags from the Custom Title plugin with this sequence for title tag:
Okay, this is my variation. It's been some time since I wrote it, maybe it's not even the most effective way, but it gets me what I want (with proper Custom Title settings) and is easy to understand
Page Title | Site Name
(and on on a single post page)
Post Title | Site Name
Some basic semantic markup is possible with NM 3.0: You can change the html tags used for the post container and title with custom settings markupPost and markupTitle
For example, if you want <h2> for your post titles, but <h1> if it's the single/full post view:
Code:
markupTitle h2
single markupTitle h1
If you want to change the default <div> tag used as wrapper for posts, by HTML5's <article> tag:
Code:
markupPost article
Full post layout customization will be possible in some future version.
(2014-10-01, 16:59:17)Hypertexter Wrote: Hmm, I tried
"markupPost article"
but it lead to funny formatting of the overview blog page... each short entry had a big box around it.
You probably have some styling for the article tag in your theme's css.
(2014-10-01, 17:02:35)Hypertexter Wrote: now I see that in my installation GS makes no sitemap entries for the blog posts!
What did I do wrong? Do I have to switch it on somewhere?
[...]
You don't have to do anything, it's enabled by default (you can disable it with NMNOSITEMAP)
It seems there's an issue: when you create a new post, it is not inmediately added to the Sitemap, but only after you've done some other update (saved/removed any page or post, saved settings...). I'll look into it.
Previous posts, however, should be present in sitemap.xml, unless you're using GS 3.1.x or 3.2.x. If you're using 3.3.x, it could be a conflict with some other plugin.
I am assuming i18n never lets it get there, since it does its own redirects, and does not call new stuff since 3.3
It also could fix this by using filters and getting rid of its changedata shim.
NM currently only generates the sample htaccess if you use a GS "standard" fancy URLs structure (default, %parent%/%slug%, %slug%/, ...)
You get that "error" (or notice) if you use:
- a non-standard GS permalink structure (e.g. with %language%, %nondefaultlanguage%, ...)
or
- NM custom URL parameters/prefixes (e.g. NMNOPARAMPOST, NMPARAMPOST, etc)
In both cases you'd have to create specific rewrite rules for your setup. (Ask here if you need help.)
I know that the "Failed..." message is not very helpful. It's kind of a temporary thing until I decide how to deal with special structures. (Ideally NM would not require changes in htaccess, that's what I'd like to do.)
(2014-10-03, 06:27:35)shawn_a Wrote: I am assuming i18n never lets it get there, since it does its own redirects, and does not call new stuff since 3.3
It also could fix this by using filters and getting rid of its changedata shim.
Exactly.
I just suggested a quick patch. Ideally I18N would use the 'sitemap' filter, but I suppose that mvlcek would also prefer to keep a fallback for GS versions < 3.3
(2014-10-04, 18:32:51)Carlos Wrote: NM currently only generates the sample htaccess if you use a GS "standard" fancy URLs structure (default, %parent%/%slug%, %slug%/, ...)
You get that "error" (or notice) if you use:
- a non-standard GS permalink structure (e.g. with %language%, %nondefaultlanguage%, ...)
or
- NM custom URL parameters/prefixes (e.g. NMNOPARAMPOST, NMPARAMPOST, etc)
In both cases you'd have to create specific rewrite rules for your setup. (Ask here if you need help.)
I know that the "Failed..." message is not very helpful. It's kind of a temporary thing until I decide how to deal with special structures. (Ideally NM would not require changes in htaccess, that's what I'd like to do.)
again , somewhere to use the new pageid hook to deal with special structures instead of making special rewrites. Let me know thoughts on this while thinking about it. Do we need to add theme functions to help plugins handle path splitting and parsing ? Would we build this into the multi level url support issue on github and merge in that ancient proposed rewrite rule change? 3.4 is at almost 2/3 completion
For this I intended to play with parsing $_SERVER['REQUEST_URI'] to get params and stuff, and then assign the proper page id with the indexid filter. (but I haven't started experimenting yet)
(As for multilevel URLs, I think that in principle there's no need to change anything in current rewriterules. It's more about find_url, etc. to generate proper URLs, as we were discussing in issue 655.)
Oops.
No, that's not a correct URL scheme - better not to have NM posts included in the Sitemap then.
It seems it does not work properly with your custom permalink structure. I suggest you undo the patch for now.