Announcement

Collapse
No announcement yet.

Inline images are not showing up as images just as code, and are included as attachment links

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

  • #16
    I can see you have not reverted the changes from the bug report- if you did I don't have permission to see it.

    Comment


    • #17
      I just did it again.... didnt help

      Comment


      • #18
        The thumbnails for those links in post 24 that are not displaying more than likely do not exist in the filedataresize table. If you remove the type=thumb from the url in the html in firebug, it will display a smaller version of the full size image in the block. I know this doesn't solve the problem, but it will at least explain why the thumbs are not showing up.

        If you edit the post and select all the different sizes, it will throw a contenttype error if that size is not available in the database. Don't remove the thumbs yet. Then save the post and it will display the larger pics in the box as well as the missing thumbs. You will have to click edit again to remove the missing thumbs.


        Comment


        • #19
          Thank you for the advice. This is strange because the working attached images/thumbnails have that ending in their URL and their working fine.... There seems to be some issue with the regeneration. We have tried to regenerate many times with no effect. However, the links to the invisible thumbnails are working... they are there and are linking to the original image (which is great)

          If I remove that part of the URL that you have mentioned then the large version of the photo will appear and that will look terrible on the forum.

          We need some script or solution which is going to resolve this on a large scale.
          Last edited by PiotrGT1; Mon 8th Dec '14, 3:50am.

          Comment


          • #20
            I have hired a programmer who came up with a fix for this... I will upload it here once he has the time to prepare it. It would be great if it gets included in the 5.1.5 (or whatever) update.

            Comment


            • Rabso
              Rabso commented
              Editing a comment
              great, we will be waiting

          • #21
            Okay guys its about time.. can someone from the VB team look into these files and extract the code that was modified?

            Code:
            /var/www/granturismo.pl/forum/core/vb/api
            content.php
            filedata.php
            
            /var/www/granturismo.pl/forum/core/vb/api/content
            attach.php
            photo.php
            
            /var/www/granturismo.pl/forum/core/vb
            image.php
            
            /var/www/granturismo.pl/forum/core/vb/image
            gd.php
            They were modified (according to the last edit info) - but not sure which ones

            I really want to upgrade my VB with the new patches and I want to have these changes also applied.
            Last edited by PiotrGT1; Thu 22nd Jan '15, 12:34am.

            Comment


            • #22

              The original poster shared several files that I had to remove because it is against the license agreement to share whole files.

              However I compared the files myself to the original 5.1.4 files and found there was in fact only 1 real change, the other files were all edits of comments and white space that made no changes to the actual code.

              The original poster wanted to share these changes with the community so below is the only real change that was made- this has not been officially tested and it is use at your own risk.

              This is for VB 5.1.4

              In /core/vb/ edit the image.php file.

              Find this text and comment it out. (Put a /* before it and a */ after it.)

              PHP Code:
                      if (function_exists('exif_read_data') AND function_exists('exif_imagetype'))
                      {
                          
              $filetype = @exif_imagetype($location);
                          if (
              in_array($filetype, array(
                              
              IMAGETYPE_TIFF_II,
                              
              IMAGETYPE_TIFF_MM,
                              
              IMAGETYPE_JPEG
                          
              )))
                          {
                              if (
              $fileinfo = @exif_read_data($location))
                              {
                                  
              $this->invalid false;
                                  
              array_walk_recursive($fileinfo, array($this'checkExif'));
                                  if (
              $this->invalid)
                                  {
                                      return 
              false;
                                  }
                              }
                          }
                      } 
              And that's it- that is the only real change I can see after comparing the uploaded files with original 5.1.4 files.

              Comment


              • #23
                Update- I don't have 5.1.4 setup anymore but that change alone does not make any different in 5.1.5 for me when images are uploaded as attachments- I assume that was what it was trying to fix. Attached images remain links for me.

                Perhaps there were template edits as well...

                Comment


                • PiotrGT1
                  PiotrGT1 commented
                  Editing a comment
                  Joe, I will look into the templates this weekend and let you know - can you tell me where to find this information asI have no programming experience and my knowledge of the VB software is quite low.

                  The purpose of this fix was to get all images that were imported from phpbb3 to show up as thumbnails - before that some of these images were invisible.

                  It would be great if you guys could test this and include it in the 5.1.5 update
                  Last edited by PiotrGT1; Thu 22nd Jan '15, 4:28am.

              • #24
                Templates would be found in the Admin CP -> Styles & Templates -> Style Manager.

                Choose your style and choose "Edit Templates" from the drop down menu.

                Then look for any modified templates under the Attachments group. Modified templates are listed in red.

                Comment


                • PiotrGT1
                  PiotrGT1 commented
                  Editing a comment
                  Nothing was changed except for the footer.
                  Everything else is black.

              • #25
                Did you double click and open the groups? Such as Attachment Templates- The group name will be black, but if you expand it there may be red colored template names inside it.

                Comment


                • #26
                  Yes - only this one: bbcode attahcment list
                  Code:
                  <vb:if condition="!empty($attachments)">
                      <div class="b-post-attachments" style="max-width: 60%;">
                          {vb:rawphrase attached_files}
                          <ul>
                          <vb:each from="attachments" value="attachment">
                              <vb:if condition="!empty($attachment['filename'])">
                                  {vb:set displayName, {vb:raw attachment.filename}}
                              <vb:elseif condition="!empty($attachment['caption'])" />
                                  {vb:set displayName, {vb:raw attachment.caption}}
                              <vb:else />
                                  {vb:set displayName, {vb:raw attachment.nodeid}}
                              </vb:if>
                              <vb:if condition="in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
                                  <li class="b-post-attachments__item"  style="display:inline-flex; padding:3px;">
                                      <a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
                                      <img 
                                      class="thumbnail-photo" 
                                      src="{vb:raw baseurl}/filedata/fetch?id={vb:raw attachment.nodeid}&amp;type=thumb" 
                                      title="" 
                                      alt="" 
                                      />
                                      </a>
                                  </li>
                              </vb:if>
                          </vb:each>
                          <vb:each from="attachments" value="attachment">
                              <vb:if condition="!empty($attachment['filename'])">
                                  {vb:set displayName, {vb:raw attachment.filename}}
                              <vb:elseif condition="!empty($attachment['caption'])" />
                                  {vb:set displayName, {vb:raw attachment.caption}}
                              <vb:else />
                                  {vb:set displayName, {vb:raw attachment.nodeid}}
                              </vb:if>
                              <vb:if condition="!in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
                                  <li class="b-post-attachments__item">
                                      <a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
                                      <span class="b-icon b-icon__doc--gray"></span>
                                      <span class="h-wordwrap">{vb:raw displayName}</span>
                                      <vb:if condition="$attachment['counter'] == 1">
                                          {vb:set phrase, 1_view}
                                      <vb:else />
                                          {vb:set phrase, x_views}
                                      </vb:if>
                                      <span>({vb:raw attachment.filesize}, {vb:phrase {vb:raw phrase}, {vb:raw attachment.counter}}) </span>
                                      </a>
                                  </li>
                              </vb:if>
                          </vb:each>
                          
                          </ul>
                      </div>
                  </vb:if>

                  Comment


                  • #27
                    Can someone please come back to this - it would be nice to finish this up, so that everyone could take advantage of this fix.

                    Comment


                    • #28
                      Originally posted by PiotrGT1 View Post
                      Yes - only this one: bbcode attahcment list
                      Code:
                      <vb:if condition="!empty($attachments)">
                      <div class="b-post-attachments" style="max-width: 60%;">
                      {vb:rawphrase attached_files}
                      <ul>
                      <vb:each from="attachments" value="attachment">
                      <vb:if condition="!empty($attachment['filename'])">
                      {vb:set displayName, {vb:raw attachment.filename}}
                      <vb:elseif condition="!empty($attachment['caption'])" />
                      {vb:set displayName, {vb:raw attachment.caption}}
                      <vb:else />
                      {vb:set displayName, {vb:raw attachment.nodeid}}
                      </vb:if>
                      <vb:if condition="in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
                      <li class="b-post-attachments__item" style="display:inline-flex; padding:3px;">
                      <a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
                      <img
                      class="thumbnail-photo"
                      src="{vb:raw baseurl}/filedata/fetch?id={vb:raw attachment.nodeid}&amp;type=thumb"
                      title=""
                      alt=""
                      />
                      </a>
                      </li>
                      </vb:if>
                      </vb:each>
                      <vb:each from="attachments" value="attachment">
                      <vb:if condition="!empty($attachment['filename'])">
                      {vb:set displayName, {vb:raw attachment.filename}}
                      <vb:elseif condition="!empty($attachment['caption'])" />
                      {vb:set displayName, {vb:raw attachment.caption}}
                      <vb:else />
                      {vb:set displayName, {vb:raw attachment.nodeid}}
                      </vb:if>
                      <vb:if condition="!in_array($attachment[extension], array(jpeg, jpg, png, gif, jpe))">
                      <li class="b-post-attachments__item">
                      <a href="{vb:raw attachurl}{vb:raw attachment.nodeid}">
                      <span class="b-icon b-icon__doc--gray"></span>
                      <span class="h-wordwrap">{vb:raw displayName}</span>
                      <vb:if condition="$attachment['counter'] == 1">
                      {vb:set phrase, 1_view}
                      <vb:else />
                      {vb:set phrase, x_views}
                      </vb:if>
                      <span>({vb:raw attachment.filesize}, {vb:phrase {vb:raw phrase}, {vb:raw attachment.counter}}) </span>
                      </a>
                      </li>
                      </vb:if>
                      </vb:each>
                      
                      </ul>
                      </div>
                      </vb:if>
                      In VB 5.1.5 this is the only change I need to make to see thumbnail images in posts where images were uploaded as attachments. Just replace the entire bbcode_attachment_list template with the contents provided above.

                      No file edits were needed.

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X