remove "attached files" + border from attachments?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ralphuk100
    Senior Member
    • Jul 2004
    • 188

    remove "attached files" + border from attachments?

    How do I remove the text that says "attached files" and the border around an attachment? Thanks.
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    You can do this by modifying the postbit template, here is how:

    Open the template: postbit and find this code:
    HTML Code:
      <if condition="$show['attachments']">
      <!-- attachments -->
       <div style="padding:$stylevar[cellpadding]px">
       
       <if condition="$show['thumbnailattachment']">
    	<fieldset class="fieldset">
    	 <legend>$vbphrase[attached_thumbnails]</legend>
    	 <div style="padding:$stylevar[formspacer]px">
    	 $post[thumbnailattachments]
    	 </div>
    	</fieldset>
       </if>
      
       <if condition="$show['imageattachment']">
    	<fieldset class="fieldset">
    	 <legend>$vbphrase[attached_images]</legend>
    	 <div style="padding:$stylevar[formspacer]px">
    	 $post[imageattachments]
    	 </div>
    	</fieldset>
       </if>
       
       <if condition="$show['imageattachmentlink']">
    	<fieldset class="fieldset">
    	 <legend>$vbphrase[attached_images]</legend>
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[imageattachmentlinks]
    	 </table>
    	 </fieldset>
       </if>
       
       <if condition="$show['otherattachment']">
    	<fieldset class="fieldset">
    	 <legend>$vbphrase[attached_files]</legend>
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[otherattachments]
    	 </table>
    	</fieldset>
       </if>
       
       <if condition="$show['moderatedattachment']">
    	<fieldset class="fieldset">
    	 <legend>$vbphrase[attachments_pending_approval]</legend>
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[moderatedattachments]
    	 </table>
    	</fieldset>  
       </if>
       
       </div>
      <!-- / attachments -->
      </if>
    and replace it with this code:
    HTML Code:
      <if condition="$show['attachments']">
      <!-- attachments -->
       <div style="padding:$stylevar[cellpadding]px">
       
       <if condition="$show['thumbnailattachment']">
       
    	 <div style="padding:$stylevar[formspacer]px">
    	 $post[thumbnailattachments]
    	 </div>
       </if>
      
       <if condition="$show['imageattachment']">
    	 <div style="padding:$stylevar[formspacer]px">
    	 $post[imageattachments]
    	 </div>
       </if>
       
       <if condition="$show['imageattachmentlink']">
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[imageattachmentlinks]
    	 </table>
       </if>
       
       <if condition="$show['otherattachment']">
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[otherattachments]
    	 </table>
       </if>
       
       <if condition="$show['moderatedattachment']">
    	 <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
    	 $post[moderatedattachments]
    	 </table>
       </if>
       
       </div>
      <!-- / attachments -->
      </if>
    and save the template
    done!

    Comment

    • ralphuk100
      Senior Member
      • Jul 2004
      • 188

      #3
      Could you tell me which one? I cant find it. Thanks.

      EDIT: Think you were adding the info as I replied. Thanks.

      I know this is off topic but its driving me mad....I am trying to use code below in postbit to use a different layout for replies than the first post. However, it seems that $threadinfo['firstpostid'] is not defined as everything says "normal postbit" even the first post... any ideas?

      <if condition="$post['postid'] == $threadinfo['firstpostid']">
      first post bit in here
      <else />
      normal postbit here
      </if>

      Comment

      • Floris
        Senior Member
        • Dec 2001
        • 37767

        #4
        try

        <if condition="$post['postcount'] == '1'">

        Comment

        • ralphuk100
          Senior Member
          • Jul 2004
          • 188

          #5
          Also - the code you provided for removing image attachments border does not do anything

          Comment

          • ralphuk100
            Senior Member
            • Jul 2004
            • 188

            #6
            Originally posted by Floris
            try

            <if condition="$post['postcount'] == '1'">
            I heard this can sometimes not be accurate from vbulletin.org - any truth in that rumour?

            Comment

            • Floris
              Senior Member
              • Dec 2001
              • 37767

              #7
              Originally posted by ralphuk100
              Also - the code you provided for removing image attachments border does not do anything
              Do you have the userinfo details on the top? (postbit)
              Do you have the userinfo details on the left? (postbit_legacy)


              And no, I don't know anything about rumours. What are their arguments why that isn't accurate?

              Comment

              • ralphuk100
                Senior Member
                • Jul 2004
                • 188

                #8
                There was no argument for the postid thing. They just said it was not always accurate. Can find the thread ID and post it here if you want to comment on it?

                What would userinfo details display? when joined and stuff like that? If so then no, I have removed it from this particular forum. Is there a way round it?

                Comment

                • ralphuk100
                  Senior Member
                  • Jul 2004
                  • 188

                  #9
                  Floris: Totally my fault on the lack of change with attachments. I managed to paste in the old code lol. Sorry. Thanks for the help.

                  Comment

                  • Floris
                    Senior Member
                    • Dec 2001
                    • 37767

                    #10
                    You almost had me confused there I am glad things worked out and if you have any more questions just ask

                    Comment

                    • ralphuk100
                      Senior Member
                      • Jul 2004
                      • 188

                      #11
                      Well actually I do have another question Is there a way to stop multiple attachments showing up as links. I would like all attachments to display inline to thread when multiple like a single image does rather than convert to links. If it helps, we only allow gif/jpg/png uploads so we don't need the links ever (as you would if they were pdf files or any other extension not available to open in web browser. Thanks.

                      Comment

                      • Floris
                        Senior Member
                        • Dec 2001
                        • 37767

                        #12
                        All attachments show as links, unless it is an image, and your GD library is turned on and you have the option set to show images inline.

                        Comment

                        • ralphuk100
                          Senior Member
                          • Jul 2004
                          • 188

                          #13
                          Yeah - if I upload a single image it displays the image in the thread. However if I upload 2 images as attachments it shows them as links. I want it so that those 2, or 3,4,5 etc images would display inline like a single image does.

                          Comment

                          • Floris
                            Senior Member
                            • Dec 2001
                            • 37767

                            #14
                            hm, I don't experience that. I'll ask one of the staff, maybe someone else knows

                            Comment

                            • Floris
                              Senior Member
                              • Dec 2001
                              • 37767

                              #15
                              Could you send in a support ticket through the 'contact us' form in the members area? Include the URL to your forum, and an admin account - so I could check up on a few things and do some testing?

                              Comment

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