Post and PM Inline Attachments

Started by dougiefresh, July 26, 2014, 09:14:08 PM

Previous topic - Next topic

stucki

Hi,

after installing the mod i can´t open "read PM & write PM". After unstalling is all good:)

Failure if open action /index.php?action=pm;sa=send or /index.php?action=pm:

Template Parse Error!

There was a problem loading the /Themes/default/PersonalMessage.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected 't' (T_STRING), expecting ',' or ';' in .../Themes/default/PersonalMessage.template.php on line 1184
1175: {
1176: echo '
1177: <dl id="postAttachment2">
1178: <dt>
1179: ', $txt['attach'], ':
1180: </dt>
1181: <dd class="smalltext">
1182: <input type="file" size="60" name="attachment[]" id="attachment1" class="input_file" /> (<a href="javascript:void(0);" onclick="insertAttachment(', ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + $modSettings['ila_one_based_numbering']), '); return false;">', $txt['ila_insert'] ,' ', ((empty($context['current_attachments']) ? 0 : count($context['current_attachments'])) + $modSettings['ila_one_based_numbering']),'</a>)
1183:
1184: // Show more boxes only if they aren't approaching their limit.
1185: if ($context['num_allowed_attachments'] > 1)
1186: echo '
1187: <script language="JavaScript" type="text/javascript"><!-- // --><![', 'CDATA', '[
1188: var allowed_attachments = ', $context['num_allowed_attachments'], ' - 1;


SMF installation 2.0.9, see below installed mods:

1. Post and PM Inline Attachments 3.6 [ Uninstall ]
2. SMF 1.1.20 / 2.0.9 Update 1.0 [ Uninstall ]
3. SMF 2.0.8 Update 1.0 [ Uninstall ]
4. To Buddies 1.01 [ Uninstall ]
5. Curve_centered_menu 1.4 [ Uninstall ]
6. SMF 2.0.7 Update 1.0 [ Uninstall ]
7. SMF 1.1.19 / 2.0.6 Update 1.0 [ Uninstall ]
8. SMF 2.0.5 Update 1.0 [ Uninstall ]
9. Last Post On MemberList 1.3 [ Uninstall ]
10. Search Box Permissions 1.0 [ Uninstall ]
11. Add Favicon.ico Support 1.101 [ Uninstall ]
12. Custom_Top_menu 1.4 [ Uninstall ]
13. Menu Buttons 1.1 [ Uninstall ]
14. Dougiefresh's Reorganized Admin Area 1.3 [ Uninstall ]
15. FARM - Font Awesome Responsive Menu 1.0.2 [ Uninstall ]
16. No Log Certain User Errors 1.0 [ Uninstall ]
17. Last Active On MemberList 1.4 [ Uninstall ]
18. Global Headers Footers 2.0.1 [ Uninstall ]
19. Highlighting on Theme Edit 0.7 [ Uninstall ]
20. SMF Notify Group 2.2 [ Uninstall ]
21. Add Table, Td, Tr Button 1.0 [ Uninstall ]
22. Voter Visibility 2.0 [ Uninstall ]
23. Allow Deny Boards 1.1 [ Uninstall ]
24. Better Profile Menu 1.8 [ Uninstall ]
25. Arantor CAPTCHA 1.0.8 [ Uninstall ]
26. Avatar on Member List 2.0 [ Uninstall ]
27. Copy Topics 1.6 [ Uninstall ]
28. Footer Menu 1.1.2 [ Uninstall ]
29. PM Informer 4.0.1 [ Uninstall ]
30. Forum Name in Browser Title 2.0.1 [ Uninstall ]
31. Activity in Profile 1.1 [ Uninstall ]
32. Add Avatar To Who Is Online Version 1.1 1.0 [ Uninstall ]
33. Misc Anti Spam 1.0 [ Uninstall ]
34. Add Join Date to Post 1.0 [ Uninstall ]
35. jQLightbox 0.6 [ Uninstall ]
36. Highslide 4 SMF 0.8.1 [ Uninstall ]
37. Event Reminder Mod for SMF2 2.31 [ Uninstall ]
38. Event Registration Mod 0.177 BETA [ Uninstall ]
39. Attachment Extension 2.0 [ Uninstall ]
40. SMF4Mobile Mod 1.0 [ Uninstall ]
41. PM Attachments 1.6 [ Uninstall ]
42. Aeva Media 2.10 [ Uninstall ]
43. Deutsche Kalender Tage! 1.00 [ Uninstall ]



Hope you can help me ;)

stucki

Another problem:)

If put a image inline of a post here is no Highslide effects...

Checkbox at admin panel "Enable Highslide effects for inline attachment?" is aktivated.

In the picture in the appendix you can see how the image is displayed.

Thanks for help:)

Rayvon

Quote from: dougiefresh on June 05, 2015, 09:11:50 AM
Uploaded v3.6 - June 5th, 2015
o Fixed language loading issue within Sources/Post.php.

I uninstalled 3.5 and deleted it, then downloaded and installed 3.6

I'm now getting a more frequent error

8: Undefined index: msg
File: /home/newsi908/public_html/forums/Sources/Subs-InlineAttachments.php
Line: 84


Line 84:
$id = ($msg_id == '' ? $context['ila']['msg'] : $msg_id);

dougiefresh

Uploaded v3.7 - June 6th, 2015
o Fixed syntax error in PersonalMessage.template.php.
o Fixed undefined index error within Subs-InlineAttachments.php.

stucki

Works thanks!


Quote from: stucki on June 06, 2015, 05:02:27 AM
Another problem:)

If put a image inline of a post here is no Highslide effects...

Checkbox at admin panel "Enable Highslide effects for inline attachment?" is aktivated.

In the picture in the appendix you can see how the image is displayed.

Thanks for help:)

But my second problem still exists. An inline attachment appears too large. In the preview, I only have the ability to scroll the image in a small window. Sorry, no highslide effects as with a normal attachment exist. What could be wrong?

How should the inline attachment displayed if everything is working correctly? Just like a normal attachment?


greeting

dougiefresh

Quote from: stucki on June 07, 2015, 03:58:33 AM
But my second problem still exists. An inline attachment appears too large. In the preview, I only have the ability to scroll the image in a small window. Sorry, no highslide effects as with a normal attachment exist. What could be wrong?
First: Have you set the maximum width for images yet?  If not, go to Admin => Features and Options => Layout and set your maximum width (Max width of posted pictures (0 = disable)).  The mod respects this value... 

Second: Have you specified a size for the inline attachment?  Something along the line of [attachment id=1 width=600 height=400] (width and height are optional)  should work to limit the viewed area to 600x400 within the post and when you click on it, it should balloon to full size (or full screen, whichever is smaller)...  Other parameters are available.  Look at the first post for a full list...

Quote from: stucki on June 07, 2015, 03:58:33 AM
How should the inline attachment displayed if everything is working correctly? Just like a normal attachment?
This simple answer is it depends on the bbcode you use.  attach starts out as your average expandable thumbnail, whereas attachment displays the full thing.  attachthumb ONLY shows a non-expandable thumbnail....

Hope this helps you.

Rayvon

Quote from: dougiefresh on June 06, 2015, 03:35:38 PM
Uploaded v3.7 - June 6th, 2015
o Fixed syntax error in PersonalMessage.template.php.
o Fixed undefined index error within Subs-InlineAttachments.php.

Installed shortly after you posted this fix, so far running without error in the log. Thank you for the fixes.

dougiefresh

Thank you for the bug reports, as well as the feedback!

RSI

Doug,

Your latest v3.7 seems to be working, but it is generating one error in the log when you view a page with the inline attachments.

My test page has one [attach=n] and one [attachment=n]. It's also on my test board via a clean v2.0.10 install.

Error: 2: preg_match_all(): Unknown modifier '/'
File: /home/me/public_html/~/Sources/Subs.php
Line: 4477

njtweb

Hi trying this out today.

after install these are the settings I selected.
Remove attachment image under post after in-post use? --->Checked
Show download link and counter under inline attachment? --->UnChecked
Turns "nosniff" option off? --->UnChecked
Should first attachment should be numbered "1"? --->UnChecked
"attach" bbcode same as "attachment"? --->Checked
Allow quoted attachment images from another post? --->Checked

I added the bbcode [attachment id=0][/attachment] to the top of my story. here http://minorleaguelegends.com/board/player-related-news-stories/report-former-nhl-player-burnett-in-coma/msg102/#msg102

However, it doesn't show up at the beginning of the story as it should. And it's still showing up at the bottom of the story with a download link.

Any help is greatly appreciated. Thank you in advance.

njtweb

Any help would be greatly appreciated.

RSI

Quote from: njtweb on June 28, 2015, 10:59:46 AM
Any help would be greatly appreciated.

Change [attachment id=0][/attachment] to only [attachment=0] with nothing after it.

njtweb

Nope doesn't work. When I add the bbcode, it disappears like I never added it, either way.

I click on modify, add the bbcode, re-save it and nothing is there. I go back to modify and the bbcode I just added is gone. The link "Insert attachment" doesn't do anything either. I click on it and nothing happens.

dougiefresh

Right now, I'm working 7 days a week mandatory at my workplace, so it may be next week (my vacation) that I can figure out what is going on with it....

Quote from: RSI on June 28, 2015, 12:46:14 PM
Change [attachment id=0][/attachment] to only [attachment=0] with nothing after it.
Doing so only changes it in the post.  The code adds the closing tag before processing the message, so that shouldn't work to resolve anything....  (Just saying)

njtweb

Ok, thanks for replying.

Yeh, I installed the mod, it all shows up in ACP as working but it doesn't work on the front end on my site. Hopefully you can figure it out because I really need to use this mod. I'll be happy to donate if you accept donations as well.

Thanks

CrescentEclipse

#255
Quote from: njtweb on June 28, 2015, 01:17:00 PM
Nope doesn't work. When I add the bbcode, it disappears like I never added it, either way.

I click on modify, add the bbcode, re-save it and nothing is there. I go back to modify and the bbcode I just added is gone. The link "Insert attachment" doesn't do anything either. I click on it and nothing happens.

I have the same issue. The insert attachment link doesn't work when the WYSIWYG editor is enabled and further more this editor deletes the attachment links on post edit. When I use the normal editor while editing and want to insert an ttachment afterwards I get the error "attachment does not exist". In preview mode I get the error "you are not allowed to view attachments". I also have problems to get this mod working properly. It seems to behave unstable.

My settings:

       
  • Remove attachment image under post after in-post use? Yes
  • Show download link and counter under inline attachment? Yes
  • Turns "nosniff" option off? No
  • Should first attachment should be numbered "1"? Yes
  • "attach" bbcode same as "attachment"? No
  • Allow quoted attachment images from another post? Yes
No max width / height and thumbnails, because my theme is responsive.
Perfect would be to display inline attachments only in posts as images with download link and attachments which are not used in posts should only be shown as link under the message. But it seems to be impossible right now.

LG Cres

njtweb

Hmm....seems like this mod has some issues. I don't get errors, instead everything the mod is supposed to do is ignored like it's not even installed.

Steve

Confirmed. It shows nothing for me on a test setup. Possible setting wrong? Or should the options show by default?
DO NOT pm me for support!

dan4ever

#258

Hi


I have 2 creations, but i will post the other in next post 


Is it possible to have a movie (.mpg4) as a attachment and to show up like a picture?
Now it show like a downloadlink.


/Dan
/Dan Olsson, Webmaster at https://www.guldforum.se

dan4ever


Hi again...


Is it possible to use a other name for [attach1]


In swedish it will be [bilaga1]


And some text to the user, so they understand how to use it  (next to the button/area)


/Dan
/Dan Olsson, Webmaster at https://www.guldforum.se

Advertisement: