Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2013-10-03, 16:10:41)TeeJay Wrote: The problem with this is that you have to have a special template for the main news page to remove the heading "News" or whatever - and you just can't control that with your plugin.
...

You could do like this in your template:

PHP Code:
<?php if (return_page_slug() != 'clanky') { ?>
<h1><?php get_page_title(); ?></h1>
<?php ?>

BTW I'm going to add another conditional function to NM for this, probably nm_is_site()
Reply
Use whatever you prefer. You're the developer. Just trying to throw in some friendly input.

I agree semantically that em's are better. You use it for emphasis. Why would use it then style it opposite? You are defeating the purpose of using it anyway.

Yes devs use resets but not all developer/designers are using a traditional reset. Some are using normalize which doesn't completely reset styles. So with that in mind. I'll move along
Reply
(2013-10-04, 00:30:29)Carlos Wrote: You could do like this in your template:
PHP Code:
<?php if (return_page_slug() != 'clanky') { ?>
<h1><?php get_page_title(); ?></h1>
<?php ?>

Thank you, I will get rid of one of my templates Smile

(2013-10-04, 04:41:25)lnickel Wrote: Just trying to throw in some friendly input.

I agree semantically that em's are better. You use it for emphasis. Why would use it then style it opposite? You are defeating the purpose of using it anyway.

Yes devs use resets but not all developer/designers are using a traditional reset. Some are using normalize which doesn't completely reset styles. So with that in mind. I'll move along

I didn't mean any offense! Smile just wanted to explain things.

There is no "opposite" styling. See an example:
<h1> has { font-size: 32px; } in the current versions of the most used browsers by default. And people often style it to { font-size: 24px; }, just because 32px is way too much. If they used the logic you are talking about, they should prefer using <h2> for the main heading because it has { font-size: 24px; } by default. Yes, why should they restyle h1 when they have h2 which they don't have to restyle?
Because of SEO. See? It doesn't matter how you style things.

On one hand, I have to admit that one <em> doesn't make any difference you could notice. Search Engines look at <title> and <h1> at first, then <h2> and the rest doesn't matter that much. The best SEO is the content itself, but using semantic tags like <strong>, <em> (instead of <b> and <i> which are not semantic), proper headings and so on makes your content even better, because the search engines can find more easily and more accurately what the article is about, which keywords are the important ones etc. On the other hand, restyling { font-style: italic; } to { font-style: normal; } is not any trouble.

I just have to repeat - I don't mean any offense by this, I'm just trying to explain why do I think that <em> is better in this case Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Oh no!!! No matter of offense....none taken!! I wasn't trying to offend anyone either!!! Smile
[/align]
Reply
(2013-10-04, 05:31:36)lnickel Wrote: Oh no!!! No matter of offense....none taken!! I wasn't trying to offend anyone either!!! Smile
[/align]

Glad to hear that Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(about News Manager 2.5 beta)

I think I finally will not use components (nm-init, etc.) for advanced frontend settings, at least for now (I may use that again, with some variation, in a future version)

Instead, I'll probably add a Custom settings textarea to the settings page, where you can specify advanced settings in a simpler way (no PHP tags). Something like this:

[Image: nm25beta-settings.jpg]

In the sample capture, image title attribute is enabled, some texts (and the date format) are redefined, and custom image values are set for single/full post pages (overriding the default settings)

Thoughts? Opinions are welcome.
Reply
Looks awesome, easy to set up and change settings if needed. I look forward to seeing this.


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
Well, that looks good, just two little notes.
1) It would be nice if you could open a javascript popup or something like that in the setting itself with a complete list of possible options to be able to setup the News Manager without studying the documentation or this forum page by page. Or, you could replace the textarea with a list of checkboxes where you could check what you want.

2) I would like to be able to keep my current setting, which is the following code of nm-bottom-single component. It automatically adds the facebook comments iframe, facebook share and like buttons and the same for twitter. Both of those need a php function for getting a full URL of a post, so I couldn't use it without PHP. I'm sure you know what I mean - a place for an extra php and html code to the area at the bottom of a single post. Also, maybe you could move the components to the NM setting to keep it all on one place, but that's up to you.
Code:
<!-- Sharing -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_facebook_like" fb:like:width="120" fb:like:colorscheme="dark" fb:like:layout="none"></a>                
<a class="addthis_button_twitter" style="margin-left: 30px;"></a>
<a class="addthis_button_tweet" tw:count="none"></a>              
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-524d718d4375c6d0"></script>
<!-- Comments -->
<?php

function get_post_url() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}

?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-colorscheme="dark" data-href="<?php echo get_post_url(); ?>" data-width="580"></div>
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@islander
Thank you.



(2013-10-09, 22:46:22)TeeJay Wrote: Well, that looks good, just two little notes.
1) It would be nice if you could open a javascript popup or something like that in the setting itself with a complete list of possible options to be able to setup the News Manager without studying the documentation or this forum page by page.

I may add a help page or something. Later.

(2013-10-09, 22:46:22)TeeJay Wrote: Or, you could replace the textarea with a list of checkboxes where you could check what you want.

The problem with this is that I wouldn't like to have a big long settings page with too many options. I prefer to keep it simple and add only the essential/most used ones.

(2013-10-09, 22:46:22)TeeJay Wrote: 2) I would like to be able to keep my current setting, which is the following code of nm-bottom-single component.
...

Don't worry about this. You will be able to do this several ways, for example: put your code in a component and in your template insert
<?php if (nm_is_single()) get_component('your-component'); ?>
after the get_page_content() line.
I can tell you other ways (without the if, without a component..)

Anyway I wasn't going to remove support for nm- components in the next beta (I supposed you and maybe others are already using them)

(2013-10-09, 22:46:22)TeeJay Wrote: Both of those need a php function for getting a full URL of a post, so I couldn't use it without PHP.

Next beta will have functions/tags nm_post_slug() and nm_post_url() for this. They are already available in the dev version in GitHub. Until I psot another beta, I can tell you what files to download and update to have them.

(2013-10-09, 22:46:22)TeeJay Wrote: Also, maybe you could move the components to the NM setting to keep it all on one place, but that's up to you.

I had thought about that, but as I said, I will probably re-use this component idea, but I'm leaving it for a future version, once I do some other changes. You can do everything anyway, with code in the template and/or "normal" components.

As always, thanks for your suggestions.
Reply
Just a note on <em>, the suggested use is wrong.
em is for inline emphasis, not block level or inline blocks of content.

http://www.w3.org/wiki/HTML/Elements/em

I imagine if you were to get picky, posts would be <articles><titles><h1> with <footer>s

Styles are done via specificity, not structure.
So as long as you provide a container to style off of, but i can see the importance of also making this compatible with themes. And maybe a user want an h2 etc without coding special styles for it.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
This is the way I'm implementing it:
Code:
<p class="nm_post_author">Posted by <em>AuthorName</em></p>

Wouldn't this be inline emphasis?
Reply
(2013-10-10, 03:48:33)Carlos Wrote: This is the way I'm implementing it:
Code:
<p class="nm_post_author">Posted by <em>AuthorName</em></p>

Wouldn't this be inline emphasis?

It is, it's inline as the block element it's in is the paragraph. Yes, it's questionable whether "Posted by Authorname" should be a paragraph (it's kinda short), but I don't think there would be much better solution for this without using HTML5 as Shawn points to.


BTW,
I got an idea to expand the News Manager in the future the following way:

- Adding categories
- Allowing more "Main news pages", each for every category, so there would be all the categories in the menu (or only some of them and some "main news pages" would support showing posts from more categories, but it's getting a bit complicated...)

However, as GetSimple is a simple CMS for smaller sites, this might be a bit advanced feature that simple websites don't have to have, but I'm throwing it in here as just an idea. Some people might like it and make a use of it Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@Carlos
Your preview of News Manager 2.5 beta looks very interesting.
Thumb on to your way of implementation of the author's name.

Although I recommend not to ignore the Shawn's proposal. HTML5 is the new standard and NM should follow this line. Of course it is my point of view.

I just hope NM remains as simple as it always was. Without too complex modular structures.

About "adding categories": I could be great to merge NM with Shawn's "sa_tags", a great way of interactive tagging.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-10-11, 05:37:42)D.O. Wrote: Although I recommend not to ignore the Shawn's proposal. HTML5 is the new standard and NM should follow this line. Of course it is my point of view.

I don't think it's a good idea, because

1) Most websites are still in XHTML
2) HTML5 specification is not a finished standard, is it?

One day in the future... maybe Smile but I wouldn't mind it. I'm thinking about redoing my website into fully semantic HTML, no time though Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
oh I thought the discussion was to wrap the entire footer in an em. oops

I am still waiting to have a moment of free time to install this and figure out how to use it. Its looking pretty good.
Sad
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Yes, XHTML is still in use, but did you take a tour on the web lately? HTML5 is widely used. I am converting all my sites in HTML5 too.
E.G. Even the scripts for famous socialnetworks can be validated only in HTML5. But you seem to be busy only with your site.

(2013-10-11, 06:11:37)TeeJay Wrote: I don't think it's a good idea, because

1) Most websites are still in XHTML
2) HTML5 specification is not a finished standard, is it?

One day in the future... maybe Smile but I wouldn't mind it. I'm thinking about redoing my website into fully semantic HTML, no time though Smile
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Hey Shawn, not a big deal. Have you read what I said?

Quote:About "adding categories": I could be great to merge NM with Shawn's "sa_tags", a great way of interactive tagging.

It could be very interesting to merge these two great plugins together.


(2013-10-11, 06:12:05)shawn_a Wrote: oh I thought the discussion was to wrap the entire footer in an em. oops

I am still waiting to have a moment of free time to install this and figure out how to use it. Its looking pretty good.
Sad
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Yeah I have been meaning to make my plugin activatable on any plugin via a class, and some data attribute to load in autocomplete tags. I will see about using this to focus on those features. A plugin can just add a special class to its tag input, and add a data attribute for a json resource for tag completion and tag restriction options.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
You gave me a great news, Shawn, I will await!
According to me, GS plugins should work together like LEGO™ bricks LOL!

(2013-10-12, 03:56:13)shawn_a Wrote: Yeah I have been meaning to make my plugin activatable on any plugin via a class, and some data attribute to load in autocomplete tags. I will see about using this to focus on those features. A plugin can just add a special class to its tag input, and add a data attribute for a json resource for tag completion and tag restriction options.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Talking about useful things:
To give a more professional look to the tags section, just like this...

Categories: History, Maths, Geography, Gym.

These few lines in CSS can make our life easier...

PHP Code:
.nm_post_meta a text-transformcapitalize; }
.
nm_post_meta a:after content", "; }
.
nm_post_meta a:last-child:after content"."; } 
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Hi all

Using tags instead of categories may serve "site developer" needs, but definitely will not serve the needs of "site owner" .... and by far!!!
They won't remember the tags they used before, they won't remember that they need to use tags (sometimes they don't even remember they need to put articles in categories) ....
So: "simple" for you may not be simple for the end-user ...

Categories (sub?) will also compensate the lake of multi-lang ...
Reply
I'm thinking about enclosing post dates in html tags, so that they can be styled. I suppose that the <time> tag would be fine, and it won't affect existing NM-based sites (<em> or others may change the appearance)
Like this:
Code:
<p class="nm_post_date">Published on <time>Oct 17, 2013</time></p>
Reply
Code:
Published on <time datetime="2010-01-20" pubdate>20 January 2010</time>
interesting read
http://html5doctor.com/the-time-element/
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Thank you Shawn, very interesting.
(I'll leave it then for a future version to implement it properly.)
Reply
To: anyone using NM 2.5 beta 10, 11 or 12

If you are using those "layout blocks" (components nm-init, nm-bottom-single, etc.) that were introduced in 2.5 beta 11, I suggest you send your setup to me (here or by private message) and I will tell you how you'll have to do it in next releases.

Those components are not going to be supported, as there will be a different (easier, I hope) way to define custom/advanced settings.
(They will still be supported in 2.5 beta 13, but after that, they no longer will.)
Reply




Users browsing this thread: 7 Guest(s)