solved Nova Blog Images not showing

alt=
Luis456
@luis456
9 years ago
48 posts
How can we an image be added a the blogs page?

In the Nova Skin blog section, the blogs only shows the tittle and the truncated text, but no the image. Even if the image is selected in the blog, it still wont show.
I think all the nova sites have the same issue, including the demo.

http://demo.jamroom.net/jrNova/blogs

Can the be implemented?
Thank You

updated by @luis456: 02/26/15 12:03:46AM
paul
@paul
9 years ago
4,331 posts
Nova is using the jrBlog module templates and its those that are not showing blog images by default.
To change those goto your ACP=>Profiles=>Profile BLogs=>Templates and edit them there.
You'll probably want to edit the item_list.tpl and item_detail.tpl templates.
This code will generate the image so insert it where you want the image to show -

{jrCore_module_function function="jrImage_display" module="jrBlog" type="blog_image" item_id=$item._item_id size="xlarge" crop="auto" class="iloutline img_scale" alt=$item.blog_title width=false height=false}

Take a look at the equivalent jrAudio templates, say, to see how they show their image.
hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
Luis456
@luis456
9 years ago
48 posts
Thanks Paul. I tried the your info provided in teh item_detail.tpl and item_list.tpl of the jrBlog and did not work.

This new modules system is so confusing and complicated. I personally like the old skins where you could customized the way you like. Go to this page.tpl modify the code so.. .on and done.
Now with this modules, I don't even know where to look and its too much time consuming.

All I need to achieve is as the image below. Please let me know what code do I need to enter and where.

I'm sorry for this but its is very frustrated to customize something with not a clear information provided.

I'm about to give up.
modules.png
modules.png  •  409KB


updated by @luis456: 01/21/15 10:04:42PM
michael
@michael
9 years ago
7,744 posts
Before you give up, try watching some videos on how it works.

"Start Your own online community"
https://www.udemy.com/start-your-own-online-community

And the documentation:
https://www.jamroom.net/the-jamroom-network/documentation/

Your second post in a new system is "I'm about to give up", it takes a little effort. Keep going! :)

The file you want is item_list.tpl for the Blogs module.

Go to:
ACP -> MODULES -> PROFILE -> BLOG -> TEMPLATES -> item_list.tpl -> MODIFY

Find this code around line 33:
<div class="p20 pt10">               
  {$item.blog_text|jrCore_format_string:$item.profile_quota_id|jrBlog_readmore}
</div>
and put in the code paul gave you above in that same area:
<div class="p20 pt10">
  <div style="float:left; width:100px;margin-right:10px">
    {jrCore_module_function function="jrImage_display" module="jrBlog" type="blog_image" item_id=$item._item_id size="xlarge" crop="auto" class="iloutline img_scale" alt=$item.blog_title width=false height=false}
  </div>                    
  {$item.blog_text|jrCore_format_string:$item.profile_quota_id|jrBlog_readmore}
</div>
paul
@paul
9 years ago
4,331 posts
Also, after the first time you modify a template by this method, go back to the Templates tab and check its box to enable it.
Another tip when developing or changing templates is to put the site into 'Developer Mode' so that caching is disabled and you'll see any changes made immediately on page refresh. This setting is in the free jrDeveloper module. As you have a new site you may not have this module installed. I still have your logins, so let me know if you want help installing that.

Jamroom5 is basically the same as Jamroom4 in that you can do almost anything you want with the template system. Its just that they are in different places.
hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
Luis456
@luis456
9 years ago
48 posts
Thank You Michael for providing the code and guiding the directions of where to add it.
That fix the blog images issue. I also added the same code to the blogs_entry.tpl and blogs_row.tpl.
Paul thanks for offering your help but I think i have it working now.

I Do do see one problem in the Blog section of the Profiles. Somehow the Blogs are not truncating. It shows the whole document.
I could see the same issue in the Demo as well. It is not noticeable in the demo because the blogs are short. But if the blogs is big and had additional images, or videos. The blogs profiles page becomes huge.

Something that may need to be look at it.
http://demo.jamroom.net/jrNova/black-pig-border/blog
paul
@paul
9 years ago
4,331 posts
In the appropriate template(s) find where the blog text is outputted, something like {$item.blog_text} and make it {$item.blog_text|truncate:200}
200 is the number of characters to truncate to.


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
9 years ago
7,744 posts
Luis456:....the Blogs are not truncating.....
There is a button in the editor to let you put the truncate in where you want it for each blog. If its not there, then the whole post shows.

See the screenshot.
updated by @michael: 01/22/15 08:55:22PM
alt=
Luis456
@luis456
9 years ago
48 posts
hello Michael it is working now. The problem was in the jrBlog module item_list.ptl

I change this code
{$item.blog_text|jrCore_format_string:$item.profile_quota_id|jrBlog_readmore}
To this

{$item.blog_text|truncate:300:"...Read More ":true|jrCore_format_string:$item.profile_quota_id|jrBlog_readmore}


I was hopping to add a link to the full blog in the "...Read More" text, gut I think this will do it.

Thank You for your help.
michael
@michael
9 years ago
7,744 posts
Not a good way to do it, the way I showed you is better. If you have any embeded content in the first 300 characters of your text, you risk cutting the output of that off and breaking the layout of your page.

I guess you'll be fine if you dont use the embed module early on though.

Tags