Welcome Guest.   Make a donation to an author on the site October 22, 2014, 08:40:56 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 2012! Download dozens of custom programs!
   
  Forum Home Thread Marks Chat! Downloads Search Login Register  
  Show Posts
      View this member's profile 
      donate to someone Donate to this member 
Pages: [1]
1  DonationCoder.com Software / SMF Forum Mods / Re: Inline attachment mod for SMF2.0b3 on: May 05, 2008, 08:41:45 AM
Okay I've found why!
Because you're using 2.0 Beta 3.1 Public and not 2.0 Beta 3 Public

Please found the version updated here

Bye

SliN
2  DonationCoder.com Software / SMF Forum Mods / Re: Inline attachment mod for SMF2.0b3 on: May 05, 2008, 08:13:13 AM
Any ideas?  Has anyone been able to fix this problem?
Hello,

I've tried the mod on a fresh install of SMF2b3, and no error occurs.
You have probably done modification of display.template.php or post.template.php files  huh

Slin
3  DonationCoder.com Software / SMF Forum Mods / Re: Inline attachment mod for SMF2.0b3 on: May 04, 2008, 09:32:19 AM
Hello guys!

Here it is!

I'm preparing another version quite different but based on the code provided by mouser ;-)

Mouser, tell me if this install satisfies you  smiley

Bye
4  DonationCoder.com Software / SMF Forum Mods / Re: Inline attachment mod for SMF2.0b3 on: April 12, 2008, 06:14:21 AM
Hello mouser !

I've created a clean "InlineAttachementMod" installer ;-)

Can I distribuate this update with your agreement?

Bye

SliN
5  DonationCoder.com Software / SMF Forum Mods / Re: Inline attachment mod for SMF2.0b3 on: April 09, 2008, 03:48:19 PM
Great  Thmbsup

I'm not a specialist of php or things like that I'm just a simple "guy that adapt things using his brain" ...  Wink

So here it is ... you'll need the original modification.xml file because I'll not write all code but jsut adaptations ;-) ... I'l send to mouser the modification_smf2.0b3 file (I've not modified the headers and things like that ... it's not my source code ... I respect the authors as much as I can)

in display.template.php

1. find
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. // Show the post itself, finally!
  2. echo '
  3. </div></td>
  4. </tr></table>
  5. ...

2. Select code until
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. ...
  2. // If we had unapproved attachments clean up.
  3. if ($last_approved_state == 0)
  4. echo '
  5. </fieldset>';
  6.  
  7. echo '
  8. </div>';
  9. }

3. Copy the code from original modification.xml file

4. modify PART 2 by
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. //---------------------------------------------------------------------------
  2. // PART 2 - original code
  3. // Show the post itself, finally!
  4. // ATTN: it's not clear if this mod interferes with the inline modificiation feature new to 1.1RC2 and 1.1RC3 (see last img src line below)
  5. echo '
  6. </div></td>
  7. </tr></table>
  8. <hr width="100%" size="1" class="hrcolor" />';
  9. if ($ignoring)
  10. echo ' <div id="msg_', $message['id'], '_ignored_prompt" style="display: none;">', $txt['ignoring_user'], '  <a href="#msg', $message['id'], '" onclick="return ignoreToggles[', $message['id'], '].toggle()">', $txt['show_ignore_user_post'], '</a></div>';
  11.  
  12. echo '
  13. <div class="post" id="msg_', $message['id'], '"', '>';
  14.  
  15. if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
  16. echo '
  17. <div style="margin: 2ex; padding: 1ex; border: 2px dashed #cc3344; color: black; font-weight: bold;">
  18. ', $txt['post_awaiting_approval'], '
  19. </div>';
  20. echo '
  21. ', $message['body'], '
  22. </div>', $message['can_modify'] ? '
  23. <img src="' . $settings['images_url'] . '/icons/modify_inline.gif" alt="' . $txt['quick_modify'] . '" title="' . $txt['quick_modify'] . '" align="right" id="modify_button_' . $message['id'] . '" style="cursor: ' . ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer') . '; display: none;" onclick="oQuickModify.modifyMsg(\'' . $message['id'] . '\', \'' . $context['session_id'] . '\')" />' : '' , '
  24. </td>
  25. </tr>';
  26.  
  27.  
  28. // Now for the attachments, signature, ip logged, etc...
  29. echo '
  30. <tr id="msg_', $message['id'], '_footer">
  31. <td valign="bottom" class="smalltext" width="85%">
  32. <table width="100%" border="0" style="table-layout: fixed;"><tr>
  33. <td colspan="2" class="smalltext" width="100%">';
  34. //---------------------------------------------------------------------------

4. modify PART 4 by
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. //---------------------------------------------------------------------------
  2. // PART 4 - original code but MODIFIED to skip inlined images
  3. // Assuming there are attachments...
  4. if (!empty($message['attachment']))
  5. {
  6. echo '
  7. <hr width="100%" size="1" class="hrcolor" />
  8. <div style="overflow: auto; width: 100%;">';
  9. $last_approved_state = 1;
  10. foreach ($message['attachment'] as $attachment)
  11. {
  12. // Show a special box for unapproved attachments...
  13. if ($attachment['is_approved'] != $last_approved_state)
  14. {
  15. $last_approved_state = 0;
  16. echo '
  17. <fieldset>
  18. <legend>', $txt['attach_awaiting_approve'], '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';sesc=', $context['session_id'], '">', $txt['approve_all'], '</a>]</legend>';
  19. }
  20.  
  21. //---------------------------------------------------------------------------

5. Modify last part starting by \\back to orginal code with this code
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. //---------------------------------------------------------------------------
  2. // Back to original code
  3. if ($attachment['is_image'])
  4. {
  5. if ($attachment['thumbnail']['has_thumb'])
  6. echo '
  7. <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 />';
  8. else
  9. echo '
  10. <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '" border="0" /><br />';
  11. }
  12. echo '
  13. <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> ';
  14.  
  15. if (!$attachment['is_approved'])
  16. echo '
  17. [<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';sesc=', $context['session_id'], '">', $txt['delete'], '</a>] ';
  18. echo '
  19. (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
  20. }
  21.  
  22. echo '
  23. </div>';
  24. }
  25. //---------------------------------------------------------------------------


In Post.template.php file

7. After code
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. // What about smileys?
  2. if (!empty($context['smileys']['postform']))

insert the suggested code in modification.xml file.

8. Modify sentence
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. <select onchange="surroundText(this.options[this.selectedIndex].value,\'\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">

by

Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. <select onchange="surroundText(this.options[this.selectedIndex].value,\'\', document.getElementById(\''. $context['post_box_name'].'\')); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">

That's all folks ! Your favorite mod is back in your SMF2.0b3 forum  cheesy

Mouser, I'll send you the file tomorrow .. I need to sleep

Bye

SliN
6  DonationCoder.com Software / SMF Forum Mods / Inline attachment mod for SMF2.0b3 on: April 09, 2008, 03:21:19 PM
Hello all  smiley

Fist of all I'd like to thank mouser for this exceptionnal mod.
I've been using for a long time in my SMF1.x forum.

After some problems, I've decided to go to the SMF2.0b3, and I really needed to have this excellent mod to work on this new version of SMF.

So I've done some modification in order to adapt the orignal IA mod. If someone is interested, I can post here the modification to do.
Just ask !

Bye

Slin
Pages: [1]
DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.593s | Server load: 0.09 ]