Announcement

Collapse
No announcement yet.

Editing the forum blocks code?

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

  • [Forum] Editing the forum blocks code?

    I'm wanting to remove the avatars displayed on the forum block "latest threads", but I'm having trouble getting it to work.

    I've been editing the block_threads template under the Block Templates section, but any updates I make (such as removing code) aren't showing upon refresh. And yes, I've been clearing my cache, trying in other browsers etc.

    Am I not editing the right templates?

  • #2
    What is the code that you are changing specifically?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      I've been editing the block_threads template and removing the red code below. But it doesn't seem to make any difference, the avatar images still show upon refresh, hard refresh and even a completely different browser.


      Code:
      <li>
          <div class="block smaller">
              <div class="blocksubhead">
                  <a class="collapse" id="collapse_block_newthreads_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_newthreads_{vb:raw blockinfo.blockid}"/></a>
                  <img src="{vb:stylevar imgdir_cms}/widget-forum.png" alt="" />
                  <span class="blocktitle">{vb:raw blockinfo.title}</span>
              </div>
              <div id="block_newthreads_{vb:raw blockinfo.blockid}" class="blockbody floatcontainer">
                  <ul class="blockrow">
                      <vb:each from="threads" key="threadid" value="thread">
                      <li class="<vb:if condition="!$vboptions['avatarenabled']">no</vb:if>avatarcontent floatcontainer">
                          <vb:if condition="$vboptions['avatarenabled']"><a class="smallavatar">
                              <vb:if condition="$thread['showavatar']">
                              <img width="30" title="" src="{vb:raw thread.avatarurl}" alt=""/>
                              <vb:else />
                              <img width="30" title="" src="{vb:stylevar imgdir_misc}/unknown.gif" alt=""/>
                              </vb:if>
                          </a></vb:if>
                          <div class="smallavatartext">
                              <a href="{vb:raw thread.url}" class="title">{vb:raw thread.title}</a>
                              <br/>
                              <div class="meta">
                                  <vb:if condition="$threadstype == 0">
                                  {vb:rawphrase posted_by} <a href="{vb:link member, {vb:raw thread}}">{vb:var thread.postusername}</a> ({vb:raw thread.replycount} {vb:rawphrase replies})
                                  <br />{vb:raw thread.date} <span class="time">{vb:raw thread.time}</span> {vb:rawphrase in_x, {vb:link forum, {vb:raw thread}, null, 'forumid', 'forumtitle'}, {vb:raw thread.forumtitle}}
                                  <vb:else />
                                  {vb:rawphrase last_post_by} <a href="{vb:link member, {vb:raw thread}, null, 'lastposterid', 'lastposter'}">{vb:var thread.lastposter}</a> ({vb:rawphrase x_replies, {vb:raw thread.replycount}})
                                  <br />
                                  {vb:raw thread.lastpostdate} <span class="time">{vb:raw thread.lastposttime}</span> {vb:rawphrase in_x, {vb:link forum, {vb:raw thread}, null, 'forumid', 'forumtitle'}, {vb:raw thread.forumtitle}}
                                  </vb:if>
                              </div>
                          </div>
                      </li>
                      </vb:each>
                  </ul>
              </div>
          </div>
          <div class="underblock"></div>
      </li>

      Comment


      • #4
        Do you have a link where we can look at the output?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          I'm having this exact same issue.

          I'm aiming to remove the avatars from the 'Latest Posts' block, shown below, but changes to the above code have no effect;



          Please advise.

          Comment


          • #6
            Well there are two blocks and two templates.

            New Forum Threads and the template block_threads

            New Forum Posts and the template block_newposts

            The picture above is New Forum Posts and you would need to edit block_newposts. Editing block_threads will have no effect on that widget.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #7
              Hi Wayne,

              Not sure if this link will work or not: http://terabow.com/forums/forum.php?styleid=1
              I'm editing the base style, not the one that's set to default when you visit the site.

              I've edited the red text highlighted out of both block_threads and block_newposts but no change.

              Comment


              • #8
                I don't see avatars showing up when I just clicked the above, so I take it you got it working?

                Comment


                • #9
                  Nope, I still see avatars. I've cleared my cache, rebooted Firefox, tried in IE, everything. Nothing changes for me.

                  Comment


                  • #10
                    I see the above link showing:

                    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	51.3 KB
ID:	3679353

                    Comment


                    • #11
                      Refreshing my open page, or even clicking on the link above (same one you clicked), this is what I see still:

                      Click image for larger version

Name:	Avatars.jpg
Views:	1
Size:	92.8 KB
ID:	3679354

                      Comment


                      • #12
                        Ok, this is really becoming confusing.

                        I decided to once again close my Firebox browser down completely after clearing it's cache. I reopened and went to the site which is now back to the main site theme (custom one) and THAT theme shows no avatars:

                        Click image for larger version

Name:	Avatars-Custom.png
Views:	1
Size:	65.5 KB
ID:	3679355

                        What is strange with that, is that I've not touched the code for that theme. You can see by the following two images that a) the theme is not a child of the default one, and b) I've not touched the block templates for this theme:

                        Click image for larger version

Name:	Theme-1.jpg
Views:	1
Size:	24.1 KB
ID:	3679357 Click image for larger version

Name:	Block-Template.png
Views:	1
Size:	14.8 KB
ID:	3679356

                        Something really strange is going on here...

                        Comment


                        • #13
                          Put it down to ghosts... but its working, so well done, as you seem to have solved your issue.

                          Comment


                          • #14
                            Originally posted by anthonyparsons View Post
                            but its working, so well done, as you seem to have solved your issue.
                            Well no, not really. Depending on who you ask, they either do or don't show.

                            I asked hubby to check at work, and he sees the avatars. I asked two people on Twitter and one DOES see them, one DOESN'T see them. A third person doesn't see them on the vBulletin default theme (white), but does see them on the site default theme (dark) which just doesn't make sense as I've never edited the site theme with that code.

                            I really don't want my users seeing two different things...

                            Comment


                            • #15
                              On my PC right now, I see no avatars with the site theme (the dark one I've never altered). Clearing my cache doesn't change that.

                              If I go to something like hidemyass.com to view via a proxy, and use the link in this thread above (styleid=1) which IS altered, I see avatars again.

                              If it was my cache that was the issue, wouldn't I still see no avatars regardless of a proxy IP?

                              This just doesn't make any sense at all...

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X