Block Main NEws - No_image

Post

Posted
Rating:
#7964 (In Topic #2438)
Avatar
Standard member
Duck is in the usergroup ‘Community saint’

How to set image for blogs?

So on the front start page by default was a main news block that cycles thru recent news or blogs.
There is an image on the right that always seems to display the image called no_image.png for each item cycled through.

I realized even though I had selected a nes category for a news item that image was not being displayed.  However if I went into edit the news item and under the summary area if I selected a representative image that would then display instead of the "no_image" image. However that option does not exist under blogs. How can I set a representative image for blog posts (or even a default "blog" image for all blog posts instead of "no_image"?

I was searching through the block_main_news template but I can't make heads or tails of where I would set that somehow?
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 1
#7970
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ok so we are talking here about the main_image_fader_news block, not the main_news block.

You are correct that the cms_blogs module doesn't let you choose an image. However, the cms_news module does, and you can add a blog post from there too.

The cms_blogs module is intended to be simple and cut down, so the solution really is to deny people access to it if it is going to be insufficient.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7973
Avatar
Standard member
Duck is in the usergroup ‘Community saint’
Ok I get it. No biggy I could prob figure out somehow to just even add a default Blog Icon in the template somehow I am sure. Heck with tempcode I am guessing the category is passed so I can use the one with news when its news and a default blog when its blog. Just wanna tweak appearance of the site here and there to make it more appealing to visitors. I may not even use that one as I think there are other options too but not sure yet. Just making sure I wasnt missing something here. Thanks for the reply.
Online now: No Back to the top

Post

Posted
Rating:
#7976
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
If we're talking about the main_news block (which doesn't default to no_image, but something else)…

Each blog has a news category behind it, and that news category can be edited.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7977
Avatar
Standard member
Duck is in the usergroup ‘Community saint’
Ahh I see what u r saying. I see if I edit the blog under cms news I can edit category its just no available when editing from cms blogs. So if I deny access to CMS blog does the remove the profile tab option of posting a blog?

Even if it doesn't they would have to then edit under news to change the category.

Also I noticed when I posted the blog via profile it auto created the category "Admins Blog" so is there a way to set a default icon for blog posts by creating a news category called "blog" and steting the icon to that and would it then pick that up for other blog posters or will they all have auto created news categories "Posters Blog" as a separate news category?

The reason this seems a little important to me is I would like the site "News" system to be used as neutrally as possible and with as little "opinion" as possible and allow users to make "opinion" pieces via blogs rather than news. If that makes sense? I am also a little concerned that if each user gets a personal news category called "users blog" that eventually I'll have way too many news categories to sort thru when posting regular news.  If my site has a thousand users with a blog each and I want to post news to my dozen news categories will I have to scroll through 1012 categories to find my news category? Or is it a per user view thing meaning the person posting the news will have a choice of "news" categories and only their personal Blog category?
Online now: No Back to the top

Post

Posted
Rating:
#7982
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
So if I deny access to CMS blog does the remove the profile tab option of posting a blog?

No. Actually you should go to Structure > Redirects and set up a redirect.

Even if it doesn't they would have to then edit under news to change the category.

If you deny access to add to every other category, it may default to their blog category. I have not tested.

Also I noticed when I posted the blog via profile it auto created the category "Admins Blog" so is there a way to set a default icon for blog posts by creating a news category called "blog" and steting the icon to that and would it then pick that up for other blog posters or will they all have auto created news categories "Posters Blog" as a separate news category?

I checked the code, it is hard-coded how it adds the blog category:

Code

            $map = array(
                'nc_img' => 'newscats/community',
                'notes' => '',
                'nc_owner' => $submitter,
            );
            $map += insert_lang('nc_title', do_lang('MEMBER_CATEGORY', $GLOBALS['FORUM_DRIVER']->get_username($submitter, true)), 2);

Even though this is hard-coded, you can edit the newscats/community theme image to point to your own image and also edit the MEMBER_CATEGORY language string.

that eventually I'll have way too many news categories to sort thru when posting regular news.

If you are having hundreds of users posting blogs, future you probably won't mind so much having this small problem to solve.
It'd be like a 15 minute job to add some kind of URL filter to only show non-blog categories in the list, or to remove other user's blogs from the list.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7985
Avatar
Standard member
Duck is in the usergroup ‘Community saint’
thanks for the concise reply. I can see some solutions and youre definitely right on that last point
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,053 topics, 7,195 posts, 10,839 members
  • Our newest member is PurplewaveIndia
Birthdays:
Back to Top