ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Special User Sections > Site/Forum Features

new forum feature coded - ability to inline link attachments!

<< < (11/20) > >>

mouser:
It's probably just that the installer is not upgraded to the most recent version of the file its trying to update, either because you've made other changes to it, or because ive not updated it to latest smf version.
however, if you are feeling adventuresome, you can see the instructions in the mod for making the changes to the files manually.

MatthewSchenker:
Thanks for the reply.  I am kind of adventuresome, and have dabbled into the code at times.
What do I have to lose?
Thanks!

MatthewSchenker:
I just looked at the files, and it's a bit too confusing.  I have a couple of other modifications inserted in the same areas where I need to replace code for the inline attachment modification.  I tried to make the changes carefully, but it broke my forum, so I had to switch back to the old Display.template.php file. 

Perhaps I'll play with it again later, but right now my head hurts trying to figure it out!  Too bad, I really do want to use this modification.

mouser:
can you tell me which other mods modified that area, then maybe i can make the inline attachments mod work around them?

MatthewSchenker:
Mouser,
Thanks for the generous offer.  I see that an "Ignore User" modification is in there, and possibly another one, but I'm not sure.  Perhaps it would be easier if I posted the relevant code here and let you highlight the sections to leave alone?  I'm thinking this might also be helpful to other people as well.

Below is the section of code we're discussing:

      // Show the post itself, finally!
      echo '
                        </td>
                     </tr></table>
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="post"', $message['can_modify'] ? ' id="msg_' . $message['id'] . '"' : '', '>', $message['body'], '</div>', $message['can_modify'] ? '
                     <img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="" align="right" id="modify_button_' . $message['id'] . '" style="cursor: pointer; display: none;" onclick="modify_msg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
                  </td>
               </tr>';

      // Now for the attachments, signature, ip logged, etc...
      //-Ignore MOD- Start
      if ($message['is_ignored'] && $message['can_be_ignored'])
      echo '
               <tr>
                  <td valign="bottom" class="smalltext" width="85%" style="display: none;" id="ignfooter', $message['counter']+1 , '" >
                     <table width="100%" border="0" style="table-layout: fixed;"><tr>
                        <td colspan="2" class="smalltext" width="100%">';
      else
      //-Ignore MOD- End

      echo '
               <tr>
                  <td valign="bottom" class="smalltext" width="85%">
                     <table width="100%" border="0" style="table-layout: fixed;"><tr>
                        <td colspan="2" class="smalltext" width="100%">';

      // Assuming there are attachments...
      if (!empty($message['attachment']))
      {
         echo '
                           <hr width="100%" size="1" class="hrcolor" />
                           <div style="overflow: auto; width: 100%;">';
         foreach ($message['attachment'] as $attachment)
         {
            if ($attachment['is_image'])
            {
               if ($attachment['thumbnail']['has_thumb'])
                  echo '
                           <a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
               else
                  echo '
                           <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
            }
            echo '
                              <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
         }

         echo '
                           </div>';
      }

      echo '
                        </td>
                     </tr><tr>
                        <td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';

      // Show "« Last Edit: Time by Person »" if this post was edited.
      if ($settings['show_modify'] && !empty($message['modified']['name']))

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version