Advertisement:

Author Topic: Post and PM Inline Attachments  (Read 153194 times)

Offline @rjen

  • Jr. Member
  • **
  • Posts: 171
  • Gender: Male
    • FJR-club Nederland
Re: Post and PM Inline Attachments
« Reply #680 on: October 20, 2017, 03:05:25 PM »
Updated, looking forward to next version...  ;)
Running SMF 2.0 with Tinyportal 1.3R at www.fjr-club.nl
Testing SMF 2.1 beta 3 with Tinyportal 2.0 at http://test2.fjr-club.nl/

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 11
Re: Post and PM Inline Attachments
« Reply #681 on: November 03, 2017, 06:24:09 AM »
Great mod!

I've read through most of the thread but couldn't find anything related to the 2 bugs(?) I encountered:

1. Clicking (more attachments) to add another attachment, but leaving the browse box empty (ie, not adding another file) then clicking post gives a blank screen.


2. Feature or bug, I'm not sure - When editing a post to add more inline pics it will attach the next picture on the bottom as an attachment again. You have to the edit again a second time then go "insert attachment" then only does it go inline?

Installed mods:

1.    Avatars on Board/MessageIndex    
2.    Show JDALLAUI in Post and PM    
3.    Post and PM Inline Attachments    
4.    Resize Attached Images    2.4.1

Thanks!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #682 on: November 13, 2017, 11:25:40 AM »
@jakes_t: I will look into bug #1, as nobody else has reported that one.  Bug #2 is known and no solution has been found yet.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #683 on: November 14, 2017, 04:12:50 AM »
Bug #2 is known and no solution has been found yet.
I found a solution for this just now when I discovered that copying ./Sources/Subs-InlineAttachments.php from v5.6 fixed the problem.

I then discovered that making the following change in ./Sources/Subs-InlineAttachments.php from v5.11 also fixed the problem:
Find:
Code: [Select]
// Fetch attachments for use in "parse_bbc" function...
if (!isset($attachments[$msg_id]))
{
Replace With:
Code: [Select]
// Fetch attachments for use in "parse_bbc" function...
Find:
Code: [Select]
}

// Load the attachment context even if there are no attachments:
Replace With:
Code: [Select]

// Load the attachment context even if there are no attachments:

This change effectively reinstates the same code that was used in this section in v5.6 (although "unset($attachments[$msg_id])" was used in v5.6 and "$attachments[$msg_id] = array();" is used in v5.11) but obviously you will need to determine if this solution is appropriate or if it breaks something else ... :)

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #684 on: November 14, 2017, 06:18:39 AM »
I think I've found another bug ...

I have an SMF 2.0.14 forum with no other mods installed except forv5.11 of this mod (without any code changes made) and whenever I select a 'Download link and counter setting' of either 'Filename only', 'Filename and Size' or 'Filename, Size and Dimensions' (ie, either the second, third or fourth option from the drop-down list) all of the image details are displayed (ie, Filename, Size, Dimensions and Count) below the image.

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #685 on: November 14, 2017, 07:52:21 AM »
I think I've found another bug ...

I have an SMF 2.0.14 forum with no other mods installed except forv5.11 of this mod (without any code changes made) and whenever I select a 'Download link and counter setting' of either 'Filename only', 'Filename and Size' or 'Filename, Size and Dimensions' (ie, either the second, third or fourth option from the drop-down list) all of the image details are displayed (ie, Filename, Size, Dimensions and Count) below the image.

I've think I've worked out the fix for this bug too ... :)

In ./Sources/Subs-InlineAttachments.php
Find:
Code: [Select]
($download_count ? ($download_count >= 5 ? '<br/>' : ' ') . '(' . $attachment['size'] . ($attachment['is_image'] && !empty($dimensions['width']) ? ' - ' . $dimensions['width'] . 'x' . $dimensions['height'] . ($download_count == 6 ? ')<br/>(' : ' - ') . $viewed : ' - ' . $downloaded) . ')' : '').Replace With:
Code: [Select]
($download_count ? (($download_count >= 5 ? '<br/>' : ' ') . ($download_count >= 2 ? '(' . $attachment['size'] : '') . ($download_count >= 3 && $attachment['is_image'] && !empty($dimensions['width']) ? ', ' . $dimensions['width'] . 'x' . $dimensions['height'] : '') . ($download_count >= 4 ? (($download_count == 6 ? ')<br/>(' : ' - ') . ($attachment['is_image'] ? $viewed : ' - ' . $downloaded)) : '') . ($download_count >= 2 ? ')' : '')) : '') .

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #686 on: November 14, 2017, 11:02:36 AM »
Uploaded v5.12 - November 14th, 2017
o Modified code to enclose ILA tag with "display: inline-block" CSS style, based on @rjen's code snipet..
o Fixed attachment not inline after editing post, per GL700Wing's instructions.
o Fixed download link/counter code for display, per GL700Wing's instructions.



@rjen and GL700Wing:  Thank you for finding and correcting the code fragments that were the source of the bugs that you found.  I apologize for not being around lately.  Life has been kicking me lately, but I'm fighting back (like normal)....

This change effectively reinstates the same code that was used in this section in v5.6 (although "unset($attachments[$msg_id])" was used in v5.6 and "$attachments[$msg_id] = array();" is used in v5.11) but obviously you will need to determine if this solution is appropriate or if it breaks something else ... :)
I was trying to prevent an unnecessary database call with that if...then statement.  It looks like it really was a necessary call to make...

1. Clicking (more attachments) to add another attachment, but leaving the browse box empty (ie, not adding another file) then clicking post gives a blank screen.
I'm still trying to find the time to look into this bug report.  I apologize for any inconvenience....
« Last Edit: November 14, 2017, 11:29:36 AM by dougiefresh »
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #687 on: November 14, 2017, 08:01:40 PM »
@rjen and GL700Wing:  Thank you for finding and correcting the code fragments that were the source of the bugs that you found.  I apologize for not being around lately.  Life has been kicking me lately, but I'm fighting back (like normal)....
You're welcome - happy to help when I can.

Offline pellet_newb

  • Semi-Newbie
  • *
  • Posts: 18
Re: Post and PM Inline Attachments
« Reply #688 on: November 18, 2017, 10:43:04 AM »
Any luck with Tapatalk support?  Thanks

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #689 on: November 28, 2017, 12:11:08 PM »
Uploaded v5.13 - November 26th, 2017
o Added support for the Tapatalk mod.
o Fixed undefined variable error when HS4SMF mod is installed and enabled.



@pellet_newb:  Sorry about the wait.  It's been frustrating trying to figure out why Tapatalk doesn't seem to respond to my changes, but I discovered that Tapatalk uses a modified set of source files instead of the core source files.  I am able to modify those so that Tapatalk support works (I think...).  Let me know if more needs to be done.  Thanks!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #690 on: November 29, 2017, 11:51:49 PM »
After installing this mod trying to insert a PM attachment inline doesn't work - clicking on 'Insert Attachment X' does nothing.

In order for inline PM attachments to work the installation of the 'Post and PM Inline Attachments' mod needs to replace of the some code in PersonalMessage.template.php that was added by the 'PM Attachments' mod.  However, and even though the operation fails for two blocks of code the installation for PersonalMessage.template.php shows as 'Test successful' because the two failed operations are set to 'Ignore Errors' (you don't see these messages if all other tests pass and you don't expand the twistie for PersonalMessage.template.php).

The first of the failing 'Replace' operations in ./Themes/default/PersonalMessage.template.php should be as follows (the search was not looking for href="javascript:void(0);" but I don't know if it should still be there after the replace):
Find:
Code: [Select]
function addAttachment()
{
if (allowed_attachments <= 0)
return alert("', $txt['more_attachments_error'], '");

setOuterHTML(document.getElementById("moreAttachments"), \'<dd class="smalltext"><input type="file" size="38" name="attachment

[]" class="input_file" /><\' + \'/dd><dd class="smalltext" id="moreAttachments"><a href="javascript:void(0);" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')<\' + \'/a><\' + \'/dd>\');

allowed_attachments = allowed_attachments - 1;

return true;
}
Replace:
Code: [Select]
var current_attachment = ', (isset($context['current_attachments']) ? count($context['current_attachments']) : 0) + !empty($modSettings['ila_one_based_numbering']), ';

function addAttachment()
{
current_attachment = current_attachment + 1;
if (allowed_attachments <= 0)
return alert("', $txt['more_attachments_error'], '");

var temp = "', $txt['ila_insert'], '";
temp = temp.replace("\%d", current_attachment);
setOuterHTML(document.getElementById("moreAttachments"), \'<dd class="smalltext"><input type="file" size="60" name="attachment

[]" id="attachment\' + current_attachment + \'" class="input_file" /> (<a onclick="insertAttachment(\' + current_attachment + \'); return false;">\' + temp + \'</a>) (<a onclick="cleanFileInput(\\\'attachment\' +

current_attachment + \'\\\');">', $txt['clean_attach'], '</a>)\' + \'</dd><dd class="smalltext" id="moreAttachments"><a onclick="addAttachment(); return false;">(' . $txt['more_attachments'] . ')<\' + \'/a><\' +

\'/dd>\');

allowed_attachments = allowed_attachments - 1;

return true;
}

The second of the failing 'Replace' operations in ./Themes/default/PersonalMessage.template.php should be as follows (it was failing because of the number of tab characters it was searching for and it also added the comment on the last line twice):
Find:
Code: [Select]
echo '
<dd class="smalltext">';

// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.

Replace:
Code: [Select]
$ila_tag = (isset($modSettings['ila_insert_tag']) ? $modSettings['ila_insert_tag'] : 'attachment');
$ila_tag .= (empty($modSettings['ila_insert_format']) ? '=' : ' id=') . '\' + id + \'';
$ila_tag .= (!empty($modSettings['ila_insert_format']) && $modSettings['ila_insert_format'] == 2 ? ' msg=' . (isset($_REQUEST['msg']) ? $_REQUEST['msg'] : 'new') : '');
echo '
<dd class="smalltext">
<script type="text/javascript"><!-- // --><![CDATA[
function insertAttachment(id)
{', (file_exists($sourcedir . '/Subs-SCEditor.php') ? '
$(smfmod_editor).data(\'sceditor\').insertText(\'[' . $ila_tag . ']\');' : '
replaceText(\'[' . $ila_tag . ']\', document.forms.postmodify.' . $context['post_box_name'] . ');'), '
}
// ]]></script>';

// Show some useful information such as allowed extensions, maximum size and amount of attachments allowed.


Also, the operation that always fails in ./Sources/ManageAttachments.php when PM attachments has already been installed could be avoided by changing it from a 'Before' action to an 'After' action as follows:
Find:
Code: [Select]
'removeall' => 'RemoveAllAttachments'Add After:
Code: [Select]
,
'ila' => 'ILA_Admin_Settings'


After I'd made the changes above I had inline PM attachments working but I then discovered images are always displayed as unapproved attachments (eg, with opacity set to 40%) and they are still shown below the message as an attachment even if the option 'Remove attachment image under post after in-post use?' is checked/ticked for posts.  Also, if only the standard SMF viewer is available (ie, neither HS4SMF, Highslide Image Viewer or jQLightbox are installed) clicking on the image does nothing.  To fix all these issues I made the following changes to ./Sources/Subs-InlineAttachments.php

The following code change enables PM attachments to be displayed inline without any opacity.
Find:
Code: [Select]
$style = (empty($attachment['is_approved']) ? 'opacity: ' . ($style / 100) . '; filter: alpha(opacity=' . $style . ');' : '');Replace:
Code: [Select]
$style = (empty($attachment['is_approved']) && !$context['ila']['pm_attach'] ? 'opacity: ' . ($style / 100) . '; filter: alpha(opacity=' . $style . ');' : '');

The following code change stops inline attachments also being displayed below the PM text if the option 'Remove attachment image under post after in-post use?' is checked/ticked for posts.
Find:
Code: [Select]
// Return to our lord and saviour, our caller! :p
return $html;
Add Before
Code: [Select]
if (!empty($modSettings['ila_duplicate']) && $context['ila']['pm_attach'])
$context['ila']['dont_show'][$attachment['id']] = true;



The following code change allows inline images in a PM attachment to be downloaded when the image is clicked.
Find:
Code: [Select]
return '<img src="' . $full . ';image" ' . ' alt="' . $name . '"' . ' class="bbc_img resized' . (!empty($class) ? ' ' . $class : '') . '"' . $style .' />';Replace:
Code: [Select]
return '<a href="' . $full . '"><img src="' . $full . ';image" ' . ' alt="' . $name . '"' . ' class="bbc_img resized' . (!empty($class) ? ' ' . $class : '') . '"' . $style .' />';


Finally, I cam across a bit of code that may be redundant in  ./Sources/Subs-InlineAttachments.php.
On line 955 'has_thumb' is set to false when the function is defined:
Code: [Select]
function ILA_subfunction($id, $full, $thumb, $name, $style = '', $has_thumb = false, $expand = true)
However, further down in same function (line 991) there is a test for 'has_thumb' that may be redundant  because it's doesn't get changed once the function has been called ...
Code: [Select]
if ($has_thumb)

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #691 on: November 30, 2017, 03:06:13 AM »
I discovered another minor bug with this mod - there is no option to clear/remove the first attachment when composing a new message (the option to clear an attachment is only displayed for the second and subsequent attachments).

In the mod installer file for ./Themes/default/PersonalMessage.template.php:

Find:
Code: [Select]
<search position="replace"><![CDATA[<input type="file" size="38" name="attachment[]" class="input_file" />';]]></search>
<add><![CDATA[<input type="file" size="60" name="attachment[]" id="attachment1" class="input_file" /> (<a onclick="insertAttachment(', ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + !empty($modSettings['ila_one_based_numbering'])), '); return false;">', sprintf($txt['ila_insert'], ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + !empty($modSettings['ila_one_based_numbering']))),'</a>)';]]></add>

Replace:
Code: [Select]
<search position="replace"><![CDATA[<input type="file" size="60" name="attachment[]" id="attachment1" class="input_file" /> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)';]]></search>
<add><![CDATA[<input type="file" size="60" name="attachment[]" id="attachment1" class="input_file" /> (<a onclick="insertAttachment(', ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + !empty($modSettings['ila_one_based_numbering'])), '); return false;">', sprintf($txt['ila_insert'], ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + !empty($modSettings['ila_one_based_numbering']))),'</a>) (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>)';]]></add>

Note:  This fix assumes the issue of not being to clear any attachments in the 'PM Attachments' mod has also been fixed.
« Last Edit: November 30, 2017, 03:16:52 AM by GL700Wing »

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #692 on: November 30, 2017, 05:26:56 AM »
Finally, I came across a bit of code that may be redundant in  ./Sources/Subs-InlineAttachments.php.
...
Ignore this comment - I figured out what it is for and how it works :)

Last find for today ...

I couldn't get 'attachthumb' to display a non-expandable thumbnail - all it would display was the name of the image and clicking on it just caused a spinning pointer.  I got it working by making the following changes in ./Sources/Subs-InlineAttachments.php:
Find:
Code: [Select]
// AttachThumb => Show thumbnail ONLY, not expandable
function ILA_tag_attachthumb(&$info, &$dim, $has_thumb, $style)
{
$data = &$info;
if (!empty($info['thumbnail']['has_thumb']))
$dim = array('width' => $info['width'], 'height' => $info['height'], 'img' => $info['href']);
else
$dim = array('width' => $info['real_width'], 'height' => $info['real_height']);
return ILA_subfunction($info['id'], $dim['href'], $dim['href'], $info['name'], $style, $has_thumb);
}

Replace:
Code: [Select]
// AttachThumb => Show thumbnail ONLY, not expandable
function ILA_tag_attachthumb(&$info, &$dim, $has_thumb, $style)
{
$data = &$info;
$image = ($expand = !empty($info['thumbnail']['has_thumb'])) ? $info['thumbnail']['href'] : $info['href'];
if (!empty($info['thumbnail']['has_thumb']))
$dim = array('width' => $info['width'], 'height' => $info['height'], 'img' => $info['href']);
else
$dim = array('width' => $info['real_width'], 'height' => $info['real_height']);
$expand = false;
return ILA_subfunction($info['id'], $info['href'], $image, $info['name'], $style, $has_thumb, $expand);
}
« Last Edit: November 30, 2017, 05:43:12 AM by GL700Wing »

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #693 on: December 04, 2017, 05:56:26 AM »
Uploaded v5.13 - November 26th, 2017
o Added support for the Tapatalk mod.
o Fixed undefined variable error when HS4SMF mod is installed and enabled.



@pellet_newb:  Sorry about the wait.  It's been frustrating trying to figure out why Tapatalk doesn't seem to respond to my changes, but I discovered that Tapatalk uses a modified set of source files instead of the core source files.  I am able to modify those so that Tapatalk support works (I think...).  Let me know if more needs to be done.  Thanks!
The version of ./Sources/Subs-InlineAttachmentsAdmin.php included with v5.13 still wont allow the option "Allow quoted attachment images from another post?" to be selected if Tapatalk - the option is greyed out which means the checkbox cannot be selected.

The following changes need to be made in ./Sources/Subs-InlineAttachmentsAdmin.php:
Delete the following (lines 67 & 68 in v5.13):
Code: [Select]
if ($tapatalk = file_exists($sourcedir . '/Subs-Tapatalk.php'))
$modSettings['ila_allow_quoted_images'] = 0;

Find:
Code: [Select]
array('check', 'ila_allow_quoted_images', ($tapatalk ? 'disabled' : 99) => true),Replace:
Code: [Select]
array('check', 'ila_allow_quoted_images'),

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #694 on: December 05, 2017, 04:17:04 AM »
Another couple of changes required in ./Sources/Subs-InlineAttachmentsAdmin.php to enable inline quoted images to be displayed when Tapatalk is displayed:
Find:
Quote
if (empty($modSettings['ila_allow_quoted_images']) || empty($msg) || file_exists($sourcedir . '/Subs-Tapatalk.php'))
Replace:
Quote
if (empty($modSettings['ila_allow_quoted_images']) || empty($msg))

Find:
Quote
$allowed = (isset($modSettings['ila_allow_quoted_images']) && !empty($modSettings['ila_allow_quoted_images']) && !file_exists($sourcedir . '/Subs-Tapatalk.php'));
Replace:
Quote
$allowed = (isset($modSettings['ila_allow_quoted_images']) && !empty($modSettings['ila_allow_quoted_images']));

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #695 on: December 05, 2017, 09:41:37 AM »
Good Lord, man!  You've been quite the busy beaver, finding and fixing things....  I'm having trouble keeping up!  O:)  I'll incorporate these changes as soon as I can....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #696 on: December 05, 2017, 11:56:32 PM »
Good Lord, man!  You've been quite the busy beaver, finding and fixing things....  I'm having trouble keeping up!  O:)  I'll incorporate these changes as soon as I can....
I wasn't quite done with this mod but I wasn't sure I could solve the last issue I'd found as it involved another mod (Custom View of Attachments) which is no longer available from this site (although it can still be downloaded from the developer's website).   ;)

The issue was that if only *some* image attachments were inserted inline they were *all* shown as thumbnails in the attachment area at the bottom of the message.

Fortunately the fix is fairly simple to implement and requires two changes to ./Sources/Subs-CustomView.php:
Find:
Code: [Select]
loadLanguage('CustomView');

if (!empty($modSettings['custom_view_attachments']))

Replace:
Code: [Select]
loadLanguage('CustomView');

$msg_id = $message['id'];
if (!empty($modSettings['custom_view_attachments']))


Find:
Code: [Select]
if (!isset($context['ila_dont_show_attach_below']) || !array_key_exists($attachment['id'], $context['ila_dont_show_attach_below']))
{

Replace:
Code: [Select]
if (empty($context['ila']['dont_show'][$attachment['id']]) && ((!isset($context['ila_dont_show_attach_below']) || !array_key_exists($attachment['id'], $context['ila_dont_show_attach_below']))))
{
// Skip over already displayed inline attachments:
if (!empty($context['ila']['dont_show'][$msg_id][$attachment['id']]))
continue;


Think I'm done now ...  :D
Note:  The Post and PM Inline Attachments mod already makes part of the second change - the bit about skipping over already displayed inline attachments needs to be added.


PS:  I also did a bit of work on PM Attachments

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #697 on: December 08, 2017, 07:57:37 PM »
Uploaded v6.0 - December 8th, 2017
o Per GL700Wing: Fixed issue where inserting a PM attachment inline doesn't work.
o Per GL700Wing: Fixed issue where inline PM attachments were being displayed as unapproved.
o Per GL700Wing: Fixed install issue with PM Attachments mod regarding ManageAttachments.php.
o Per GL700Wing: Fixed issue where inline PM attachments are shown again under PM text.
o Per GL700Wing: Fixed issue where inline PM attachments can't be downloaded.
o Per GL700Wing: Fixed issue where no option to clear/remove the first attachment when composing a new message.
o Per GL700Wing: Fixed issue where [attachthumb] is an expandable thumbnail.
o Per GL700Wing: Fixed issue so that inline attachments can be quoted in Tapatalk.
o Per GL700Wing: Fixed another issue code so that inline attachments can be quoted in Tapatalk.
o Per GL700Wing: Fixed issue with Custom Attachment View mod where all attachments are shown.
o Copied mime detection code from my Play Media Attachments mod.



@GL700Wing:  Thank you for all the bug reports and fixes!  They have been included in this version!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline @rjen

  • Jr. Member
  • **
  • Posts: 171
  • Gender: Male
    • FJR-club Nederland
Re: Post and PM Inline Attachments
« Reply #698 on: Today at 03:02:34 PM »
Just uninstalled version 5.12 and installed 6.0. Now when I go to the admin section for Inline attachments this error shows..

syntax error, unexpected ''removeall'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'

The error log is quickly filling with errors:

https://test.fjr-club.nl/index.php?action=admin;area=manageattachments;sa=ila;acf1bfd273=7876e56ab0d4bec7eefaf281b85d2dc9
8: Undefined index: description
Bestand: /home/deb77453/domains/fjr-club.nl/public_html/test/Themes/default/GenericMenu.template.php
Regel: 303

 
Running SMF 2.0 with Tinyportal 1.3R at www.fjr-club.nl
Testing SMF 2.1 beta 3 with Tinyportal 2.0 at http://test2.fjr-club.nl/

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 269
  • Gender: Female
Re: Post and PM Inline Attachments
« Reply #699 on: Today at 03:49:51 PM »
I think that's my fault - I've just realised that in a suggestion I made in an earlier post I got the 'before' and 'after' positions around the wrong way.

It should have been:
Also, the operation that always fails in ./Sources/ManageAttachments.php when PM attachments has already been installed could be avoided by changing it from a 'after' action to an 'before' action as follows:
Find:
Code: [Select]
'removeall' => 'RemoveAllAttachments'Add After:
Code: [Select]
,
'ila' => 'ILA_Admin_Settings'