Blog Author Avatar Div

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
8/14/2013 12:17:37 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Blog Author Avatar Div

Hey Joe,

I just noticed that in the blog, even if you disable all of the checkboxes on a post for "show author avatar", and "show author biography", the div that wraps those items when they are visible still shows up.

The div has the classes "avatarwrap" and "authorinfo". This normally wouldn't be a problem, but because of the way that I styled it (putting a border or height on it), it is visible even when the content inside of it isn't rendered.

Could you make the div disappear when the content inside of it does? Alternatively, could you add another div inside of it that wraps the content so we can use that for the style we need instead, and then make that div disappear with the content?

Thanks,
-Isaac

8/15/2013 12:04:52 PM
Gravatar
Total Posts 18439

Re: Blog Author Avatar Div

Hi Isaac,

Thanks for the bug report. You are right the container div should have the same visible logic as the avatar control. I just fixed this in my copy so it will be fixed in the next release. You can also easily fix it immediately in your own copy by editing the file:

/Blog/Controls/PostList.ascx

​line #63 looks like this:

<asp:Panel ID="pnlAvatar" runat="server" EnableViewState="false" Visible='<%# !disableAvatars  %>' CssClass="avatarwrap authorinfo">

its needs to be changed like this:

<asp:Panel ID="pnlAvatar" runat="server" EnableViewState="false" Visible='<%# !disableAvatars && !displaySettings.HideAvatarInPostList && Convert.ToBoolean(Eval("ShowAuthorAvatar")) %>' CssClass="avatarwrap authorinfo">

Thanks,

Joe

8/15/2013 1:44:37 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Blog Author Avatar Div

Thanks!

8/15/2013 2:34:39 PM
Gravatar
Total Posts 159

Re: Blog Author Avatar Div

instead the opposite happens to me. I updated the file as suggested by joe. but even if inspired show avatar or author name shows nothing is shown.

joe can help us?

8/16/2013 2:02:46 AM
Gravatar
Total Posts 159

Re: Blog Author Avatar Div

I upgraded to the latest version but I noticed that the previous posts on the blog to update correctly show avatar and name of the author if checked while the posts that are made in this latest version even if you do not show  name and avatar of the author also if checked. I corrected the code of /Blog/Controls/PostList.ascx as suggested by joe but nothing has changed.

can you help me ?

8/16/2013 12:20:39 PM
Gravatar
Total Posts 18439

Re: Blog Author Avatar Div

Thanks, you are correct, the panel also contains the author bio so it must be shown also if ShowAuthorBio is true, so it needs to be updated like this:

<asp:Panel ID="pnlAvatar" runat="server" EnableViewState="false" Visible='<%# !disableAvatars && !displaySettings.HideAvatarInPostList && ( (Convert.ToBoolean(Eval("ShowAuthorAvatar"))) || ((Convert.ToBoolean(Eval("ShowAuthorBio")))) ) %>' CssClass="avatarwrap authorinfo">

 

8/17/2013 2:14:07 AM
Gravatar
Total Posts 159

Re: Blog Author Avatar Div

Thanks Joe, work fine now

You must sign in to post in the forums. This thread is closed to new posts.