Announcement

Collapse
No announcement yet.

Removing Avatars from vbcms_widget_recentarticle_page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] Removing Avatars from vbcms_widget_recentarticle_page

    I don't want the avatars to be shown in my widgets.

    The code is:

    Code:
    <div class="cms_widget">
    <div class="block">
        <div class="cms_widget_header">
      <h3><img alt="" src="{vb:stylevar imgdir_cms}/widget-forum.png" /> {vb:raw widget_title}</h3>
        </div>
        <div class="cms_widget_content widget_content">
      <vb:each from="articles" key="contentid" value="article">
       <div class="cms_widget_post_bit widget_post_bit">
        <div class="cms_widget_post_userinfo widget_post_userinfo">
         <div class="cms_widget_post_useravatar widget_post_useravatar">
          <vb:if condition="$article['showuser'] OR $article['settingsforboth'] == 2">
           <vb:if condition="$article['avatar']">
            <a class="comments_member_avatar_link" href="{vb:link member, {vb:raw article}}"><img alt="{vb:raw article.username}" src="{vb:raw vboptions.bburl}/{vb:raw article.avatar.0}" {vb:raw article.avatar.1} /></a>
           <vb:else />
            <img alt="{vb:raw article.username}" src="{vb:stylevar imgdir_misc}/unknown.gif" />
           </vb:if>
          <vb:else />
           <img alt="" src="{vb:stylevar imgdir_misc}/unknown.gif" />
          </vb:if>
         </div>
        </div>
        <div class="cms_widget_post_comment widget_post_comment">
                    <h4 class="cms_widget_post_header widget_post_header"><a href="{vb:raw article.page_url}">{vb:raw article.title}</a></h4>
                    <vb:if condition="$article['tags']"></vb:if>
                    </div>
    
                </div>
            </vb:each>
        </div>
    </div>
    </div>
    If i remove it so it looks like this:

    Code:
    <div class="cms_widget">
    <div class="block">
        <div class="cms_widget_header">
      <h3><img alt="" src="{vb:stylevar imgdir_cms}/widget-forum.png" /> {vb:raw widget_title}</h3>
        </div>
        <div class="cms_widget_content widget_content">
      <vb:each from="articles" key="contentid" value="article">
       <div class="cms_widget_post_bit widget_post_bit">
         <div class="cms_widget_post_comment widget_post_comment">
                    <h4 class="cms_widget_post_header widget_post_header"><a href="{vb:raw article.page_url}">{vb:raw article.title}</a></h4>
                    <vb:if condition="$article['tags']"></vb:if>
                  </div>
    
              </div>
            </vb:each>
        </div>
    </div>
    </div>
    The avatars vanish but the space is still there. How would i shift the text over to the left?

    Examples:

    Before:

    Click image for larger version

Name:	before.jpg
Views:	1
Size:	54.2 KB
ID:	3720503

    After:

    Click image for larger version

Name:	after.jpg
Views:	1
Size:	51.5 KB
ID:	3720504

    Any ideas?

    Thanks,

    Andy
    http://www.eteknix.com/images/misc/vbulletin4_logo.png
    eTeknix.com - http://www.eteknix.com
    eTeknix Forums - http://forums.eteknix.com

  • #2
    done it, don't worry
    http://www.eteknix.com/images/misc/vbulletin4_logo.png
    eTeknix.com - http://www.eteknix.com
    eTeknix Forums - http://forums.eteknix.com

    Comment


    • #3
      Could you share the solution with us. Frustrating for people who have the same question but don't have the solution

      Comment


      • #4
        I'm looking for a solution to this as well.

        Since I have avatars disabled from my site altogether, I should really need not customizing at all, it should display properly like the forum pages do.
        Vote for these issues:

        Comment


        • #5
          Customizations like this are best discussed on vBulletin.org. If you don't get a response there please PM or post back here with a link and I'll try to help on my off hours. It shouldn't be a big deal.

          Comment


          • #6
            Originally posted by BirdOPrey5 View Post
            Customizations like this are best discussed on vBulletin.org. If you don't get a response there please PM or post back here with a link and I'll try to help on my off hours. It shouldn't be a big deal.
            With all due respect, I would not think not showing avatars when they are disabled is really customisation. If the forum does not show avatars when they are disabled, why does the CMS? The amount of effort and time and energy that basic things like this take is insane. It's a good thing firearms are not easily available here, otherwise I would have blown my head off with vb4 this week.
            Vote for these issues:

            Comment


            • #7
              Are avatars being displayed for you? Can I get a link to your site where this is happening?

              Comment


              • #8
                Yes, avatars are shown on CMS in the Recent Articles widget. (see capture)Click image for larger version

Name:	avatars-cms.jpg
Views:	1
Size:	27.6 KB
ID:	3686100
                Vote for these issues:

                Comment


                • #9
                  Originally posted by BirdOPrey5 View Post
                  Are avatars being displayed for you? Can I get a link to your site where this is happening?
                  Hope you have recovered by now. Any ideas on how to fix this problem?
                  Vote for these issues:

                  Comment


                  • #10
                    Originally posted by malmazan View Post
                    Hope you have recovered by now. Any ideas on how to fix this problem?
                    No still have personal issues... However those aren't avatars, they are place holders. I would suggest asking on vbulletin.org since you want to change the default behavior of the software, it is working as designed.

                    I thought actual avatars were being displayed.

                    Comment


                    • #11
                      Originally posted by BirdOPrey5 View Post
                      However those aren't avatars, they are place holders
                      Are you kidding me? If they are place holders, they are place holders JUST for avatars, and avatars are disabled in my site.

                      What is the template conditional
                      Code:
                      <vb:if condition="$article['avatar']">
                      supposed to do?
                      Vote for these issues:

                      Comment


                      • #12
                        I'm not kidding, I did just PM you though.

                        Modifing the code is something that vbulletin.org handles- not saying it's impossible just it isn't default code.

                        It's hard to say what the conditional does out of context but if that is the conditional in your widget template I'd suggest changing it to:

                        Code:
                        <vb:if condition="$article['avatar'] AND 0">
                        and see if your place-holders go away. That statement will never be true.

                        Comment


                        • #13
                          Originally posted by BirdOPrey5 View Post
                          Modifing the code is something that vbulletin.org handles- not saying it's impossible just it isn't default code.

                          It's hard to say what the conditional does out of context but if that is the conditional in your widget template I'd suggest changing it to:
                          I'm trying to avoid doing yet another template edit that will make updating even more difficult for a behaviour that should be standard.

                          There must be a reason for that conditional. What's happening could well simply be a bug, otherwise it makes no sense that a default avatar is shown. ┬┐Are you sure there is not a master CMS avatar setting or something?
                          Vote for these issues:

                          Comment


                          • #14
                            It's not a CMS setting.

                            It's possible code was added to the template for expected future use, but there is no built in way to turn off those place holders as of yet. You will have to make some sort of edit to the template or code if you want them gone.

                            Comment


                            • #15
                              Originally posted by BirdOPrey5 View Post
                              It's hard to say what the conditional does out of context but if that is the conditional in your widget template I'd suggest changing it to:

                              Code:
                              <vb:if condition="$article['avatar'] AND 0">
                              and see if your place-holders go away. That statement will never be true.
                              That does not work, because that is not the main conditional, just one that controls whether or not the unknown image is show.

                              The conditional is:
                              Code:
                                                      <vb:if condition="$article['showuser'] OR $article['settingsforboth'] == 2">
                              which would point towards this being a bug, since articles have a setting for showing the user.


                              Can you suggest a template edit (ideally one that is easy to do when updating) that removes the place holder altogether? I've tried commenting out different sections but the solution does not seem very straight forward. Blade-uk's soution is for a much older version of the template and does not produce correct results for the current vB.
                              Last edited by malmazan; Sun 1 Jan '12, 3:04am.
                              Vote for these issues:

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X