Welcome Guest.   Make a donation to an author on the site August 20, 2014, 01:30:52 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2011! Download 30+ custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 2 [3] 4 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: new forum feature coded - ability to inline link attachments!  (Read 65428 times)
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #50 on: June 12, 2007, 11:15:27 AM »

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.
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #51 on: June 12, 2007, 12:55:07 PM »

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

View Profile WWW Give some DonationCredits to this forum member
« Reply #52 on: June 12, 2007, 04:31:08 PM »

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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #53 on: June 12, 2007, 04:37:46 PM »

can you tell me which other mods modified that area, then maybe i can make the inline attachments mod work around them?
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #54 on: June 12, 2007, 05:16:32 PM »

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" />[/url]
';
               else
                  echo '
                           <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" />
';
            }
            echo '
                              <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '[/url] (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
';
         }

         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']))
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #55 on: June 12, 2007, 05:41:31 PM »

it's "ignore user" im almost positive, this has come up before.
gri who is hard to understand posted a fix for this on his forum.  you could probably use that installer.

try it: http://gri.sunshinehost.net/index.php?topic=267.0
direct download: http://gri.sunshinehost.n...ch;topic=267.0;attach=113

note that i like gri but he is a very strange bird.
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #56 on: June 12, 2007, 05:47:02 PM »

Mouser,
Thanks for the help.  So, looking at the code, does it seem that the Ignore User modification is the only issue here?
By the way, I like strange people.  The world would be a terribly boring place without them (or should I say "us").
Thanks again!
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #57 on: June 13, 2007, 06:33:25 AM »

Last night, I downloaded and installed the modified version and it runs great on my forum!

This is a terrific modification.

But when I use the "inline noimage attachment" option, I get this error:
"[ ERROR: SPECIFIED ATTACHMENT MISSING ]."
When I attach the same URL using the "Insert Image" button, it works fine.

I have a couple of responses that I think would help make this modification closer to perfect!  This just my opinion, but some of the pulldown menu options have confusing wording.  May I make some suggestions?
        > "inline display attachment" - fine the way it is
        > "inline fullsize attachment" - fine the way it is
        > "inline thumb attachment" - fine the way it is
        > "inline noimage attachment" - should instead be "inline attachment from URL"
        > "inline noimage attachment (no details)" - should instead be "inline link to attached file"

The problem is, the two "noimage" options actually serve quite different functions, but their names imply they are similar.

I'd love to get rid of the "Insert Image" button and use the "inline attachment" modification for all image attachments.  I think this would be possible, if the "inline noimage attachment" option worked well.

Again, this is a terrific modification!

Looking forward to your response.

Thanks!
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #58 on: June 14, 2007, 09:43:32 AM »

Hello,
I made some changes to the menu items.  Here's a screen shot of what the menu now looks like in my test forum:


I think this is a terrific modification.

I would really like to replace the "Insert Image" button with a line in the Inline Attachment Modification pull-down menu. In other words, I'd like the inline attachment modification to serve as the place for managing all image attachments.

Can someone explain how to get a command in the Inline Attachment pull-down menu for [i m g] [/i m g] tags?

Thanks!
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #59 on: June 14, 2007, 10:41:23 AM »

Hello,
OK, I'm kind of answering my own question here, but it might be helpful for others to see what I've done.

I've added the "Insert Image" functionality into the "Inline Image Attachments" modification.

So now the menu looks like this in my forum:


Now that I have the "Insert Image" functionality, can someone tell me how to drop the standard "Insert Image" button?

Thanks?
Logged
Timo Trallala
Participant
*
Posts: 4


View Profile Give some DonationCredits to this forum member
« Reply #60 on: June 21, 2007, 04:49:03 AM »

Hi Mouser,

once again: Is there a way to set a max width for fullsizeInlineImages so they will not crash my layout.

The following function should solve my problem, but I really don't know how to edit my files

[copy or print]

   function resizeImage($width, $height, $maxWidth, $maxHeight)
        {
        $srcRatio=$width / $height;  // width/height ratio
        $destRatio=$maxWidth / $maxHeight;

        if ($destRatio > $srcRatio)
            {
            $destSize[1]=$maxHeight;
            $destSize[0]=ceil($maxHeight * $srcRatio);
            }
        else
            {
            $destSize[0]=$maxWidth;
            $destSize[1]=ceil($maxWidth / $srcRatio);
            }

        return $destSize;
        }

Thanks for some instructions
Greetz from Germany
Timo
« Last Edit: June 21, 2007, 10:27:42 AM by Timo Trallala » Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #61 on: June 21, 2007, 06:47:29 AM »

Hi Timo,

This is a nice idea actually.. Let me add it to the code and test, and then paste instructions on where to do it.

-mouser
Logged
digit2
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #62 on: July 16, 2007, 04:32:48 AM »

Is there any chance we can get this mod to work with Recent.template.php?

In my recent results I see
[copy or print]
[attach=x]

Thanks!
« Last Edit: July 16, 2007, 06:38:41 AM by digit2 » Logged
Nod5
Supporting Member
**
Posts: 732



View Profile Give some DonationCredits to this forum member
« Reply #63 on: November 21, 2007, 01:55:18 PM »

Hi, I can't get Insert Flash to work  Sad
I have attached a .swf flash animation, inserted the flash tags: [ flash=607,431][ /flash], then tried in various ways to insert a link to the attached file but it doesn't work. Any suggestions on how to do this? Or is the flash option only meant for externally hosted flash animations?
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #64 on: November 21, 2007, 04:09:24 PM »

yeah there is no way currently to inline link flash images in a post.
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #65 on: November 21, 2007, 04:11:40 PM »

wow i didn't notice digit2's request till now -- sorry Sad
i didn't even think about adding it to recent.template.php..
but it would probably mean duplicating the post template code which i'm not to keen to do.. maybe there is a better way to do it.
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #66 on: December 17, 2007, 08:42:42 AM »

Hello,
I just updated my forum, and was very upset to see that the Inline Attachment Modification is no longer on the SMF site.  I understand your problems with SMF, but I just think this is a terrific modification.  Actually, my forum absolutely needs this modification, and my members rely on it!!

Is the modification gone now?  If it's still available, where can I get it?

Thanks!
« Last Edit: December 17, 2007, 08:45:41 AM by MatthewSchenker » Logged
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #67 on: December 17, 2007, 08:53:54 AM »

Hello,
I just updated my forum, and was very upset to see that the Inline Attachment Modification is no longer on the SMF site.  I understand your problems with SMF, but I just think this is a terrific modification.  Actually, my forum absolutely needs this modification, and my members rely on it!!

Is the modification gone now?  If it's still available, where can I get it?

Thanks!

i have now uploaded a new beta version of the inline attachment mod, with package installer here:
http://www.donationcoder....omDonationCoderDotCom.zip

please UNINSTALL the previous verison before installing this one.

[copy or print]
        //---------------------------------------------------------------------------
        // "Inline Attachments" Mod for the Simple Machines Forum (SMF)
        //  by mouser, from http://www.donationcoder.com - funded by user donations
        //  version 1.04.02, 10/18/06
        //---------------------------------------------------------------------------
        //
        //---------------------------------------------------------------------------
        // Updated 07/08/06 - better use builtin thumbnails
        // Updated 10/18/06 - smarter text for unavailable attachments
        // Updated 10/18/06 -  [i]([url=http://www.donationcoder.com/forum/index.php?topic=1996.msg41100#msg41100]see attachment in previous post[/url])[/i] now uses forum default format
        // Updated 10/18/06 - you can now skip the =# part and it will increment through attachments
        // Updated 10/18/06 - you can now use  [i]([url=http://www.donationcoder.com/forum/index.php?topic=1996.msg41100#msg41100]see attachment in previous post[/url])[/i] to show url w/o download count and size
        // Updated 10/19/06 - Added mod of Post.template.php to include attachment inline dropdown menu
        //---------------------------------------------------------------------------




Will that help?
Logged

MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #68 on: December 17, 2007, 11:01:34 AM »

scancode,
Thanks for the link!  I don't know why I couldn't find this before.
This is a great modification -- one of the essential ones in my opinion.
Matt
Logged
ACE844
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #69 on: January 22, 2008, 01:57:49 PM »

Hello Everyone,

  I am new to both this community and to coding in general. I just started to admin and learn about this stuff recently. I saw this mod, and it was exactly what we were looking for in our forum. I downloaded the app, and uploaded the .zip to my server via the SMF 1.1.4 admin panel, that went fine, but when I clikced on the automated install option I got the following error
Quote
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


Thanks,
ACE844
« Last Edit: January 22, 2008, 04:15:04 PM by ACE844 » Logged
ACE844
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #70 on: January 22, 2008, 04:16:36 PM »

So I decided to try the manual install of the code and it is in and working fine. I just have one additional issue. Below every post it says:

Quote
« Last Edit: December 31, 1969, 05:00:00 PM by  »

Does anyone know what I did wrong or what I could do to fix this and stop it from happening??

Thanks,
 ace844
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #71 on: January 22, 2008, 05:36:45 PM »

that's strange.. it looks like you must have done something slightly wrong when adding the code manually.
if you want to send me your modified files and originals i can try to pinpoint what went wrong (mouser@donationcoder.com).
Logged
ACE844
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #72 on: January 22, 2008, 05:53:51 PM »

E-mail sent, thank you sir for your help.
Logged
MatthewSchenker
Participant
*
Posts: 24

View Profile WWW Give some DonationCredits to this forum member
« Reply #73 on: May 04, 2008, 08:18:54 AM »

Hi Everyone,
This modification has become essential in my forum!  Now, I'm upgrading to 2.0.
Does it work in 2.0 beta 3.1?
Thanks,
Matthew
Logged
mouser
First Author
Administrator
*****
Posts: 33,242



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #74 on: May 04, 2008, 08:24:12 AM »

Mathew,

A very nice person named slinouille has modified it to work with smf version 2.
See this thread: http://www.donationcoder....m/index.php?topic=13011.0

Let us know how it goes.
Logged
Pages: Prev 1 2 [3] 4 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.08s | Server load: 0.15 ]