[3.2][RC] Inline attached images

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
Big Monstro
Registered User
Posts: 40
Joined: Tue Nov 15, 2016 5:42 pm

[3.2][RC] Inline attached images

Post by Big Monstro » Fri Aug 17, 2018 8:30 pm

Extension Name: Inline attached images
Author: Big Monstro

Extension Description: Displays attached images as inline elements
Extension Version: 1.0.0-RC1

Features: There are some significant differences between my extension and the previous Anv@r.all's one:
  • Intended for phpBB 3.2. I've tested on a server running PHP 7 and phpBB 3.2.2 but it should work on any phpBB 3.2.x installation.
  • The older extension turned attached images into inline element by CSS. I made a completely approach by using phpBB events.
  • It displays attached images as inline elements everywhere, even in printview pages (unlike the older extension).
  • File comments for attached images are now displayed in tooltip text (title attribute for images).
Extension Download: http://www.mediafire.com/file/q48mj5dbl ... 1.zip/file
Last edited by Big Monstro on Sat Aug 18, 2018 12:18 am, edited 6 times in total.

User avatar
Raul [ThE KuKa]
Jr. Extension Validator
Posts: 4687
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [RC] Inline attached images

Post by Raul [ThE KuKa] » Fri Aug 17, 2018 8:47 pm

Hello,

Please make a correct post about your extension:
https://www.phpbb.com/extensions/rules- ... rmat-rules

And select the Topic Prefix, your prefix is RC but, [3.2][RC] I think is better... ;)
If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
phpBB International Support Team (Spanish - Español) :flag_es: Online Since 2003 - 15th anniversary
🎨phpBB Professional Premium Themes🔥
Author Translations (Spanish - Spain) :two_hearts:

:warning: I don't support those without the copyright Spanish translation. :warning:

User avatar
Big Monstro
Registered User
Posts: 40
Joined: Tue Nov 15, 2016 5:42 pm

Re: [3.2][RC] Inline attached images

Post by Big Monstro » Fri Aug 17, 2018 9:13 pm

Hello,

I edited to comply with the rules.

Thank you for the future feedback!

Be indulgent: it's my first extension.
Last edited by Big Monstro on Fri Aug 17, 2018 9:23 pm, edited 1 time in total.

User avatar
Raul [ThE KuKa]
Jr. Extension Validator
Posts: 4687
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [3.2][RC] Inline attached images

Post by Raul [ThE KuKa] » Fri Aug 17, 2018 9:23 pm

Most feedback... ;)

Your composer.json file.

Line 5: "homepage": "Not valided by phpBB Team", please, you must change this...

Line 20: "phpbb/phpbb": ">=3.2.*@dev"

I think it would be better this way...
"phpbb/phpbb": ">=3.2.0" or "phpbb/phpbb": ">=3.2.0,<3.3@dev"

Thanks and best regards. ;)
If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
phpBB International Support Team (Spanish - Español) :flag_es: Online Since 2003 - 15th anniversary
🎨phpBB Professional Premium Themes🔥
Author Translations (Spanish - Spain) :two_hearts:

:warning: I don't support those without the copyright Spanish translation. :warning:

User avatar
Big Monstro
Registered User
Posts: 40
Joined: Tue Nov 15, 2016 5:42 pm

Re: [3.2][RC] Inline attached images

Post by Big Monstro » Fri Aug 17, 2018 9:32 pm

For the extension homepage, I assumed the best link would be http://www.phpbb.com/customise/db/extension/{extension_name}

I don't have a dedicated website for PHP/phpBB extensions. Unless this extension is finally validated, the homepage field is pointless.

Maybe should I left that field empty, remove it or set that topic URL (http://www.phpbb.com/community/viewtopic.php?t=2482551) ?

User avatar
Raul [ThE KuKa]
Jr. Extension Validator
Posts: 4687
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [3.2][RC] Inline attached images

Post by Raul [ThE KuKa] » Fri Aug 17, 2018 9:36 pm

Or you can delete the "homepage" line until the extension is validated, for example... ;)
If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate with Image
phpBB International Support Team (Spanish - Español) :flag_es: Online Since 2003 - 15th anniversary
🎨phpBB Professional Premium Themes🔥
Author Translations (Spanish - Spain) :two_hearts:

:warning: I don't support those without the copyright Spanish translation. :warning:

User avatar
AbaddonOrmuz
Registered User
Posts: 407
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][RC] Inline attached images

Post by AbaddonOrmuz » Fri Aug 17, 2018 9:59 pm

The homepage can be the link to the public repository too, where the code is available.

https://area51.phpbb.com/docs/dev/3.2.x ... poser-json
A proudly user of Arch Linux :: /r/sddm_themes

zzonde
Registered User
Posts: 2
Joined: Mon Aug 06, 2018 10:59 am

Re: [3.2][RC] Inline attached images

Post by zzonde » Sun Aug 19, 2018 9:26 am

Really great and it works with the Lightroom ext.

Ideas: Any way to add settings for padding, margins etc in ACP? Would be cool if the images could be cropped to the same size.

User avatar
Big Monstro
Registered User
Posts: 40
Joined: Tue Nov 15, 2016 5:42 pm

Re: [3.2][RC] Inline attached images

Post by Big Monstro » Mon Aug 20, 2018 2:51 pm

Thank you for the first feedbacks :)

Any comment about listener.php ?

According to phpbb\textformatter\s9e\factory.php, the attachment BBcode is set by that line:

Code: Select all

$templates['attachment'] = $fragments['inline_attachment_open'] . '<xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment><xsl:value-of select="@filename"/><xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment>' . $fragments['inline_attachment_close'];
These two $fragments actually are <div class="inline-attachment"> and </div> (set in bbcode.html of each board style ; it's a block HTML tag, despite the class name). Therefore, in listener.php, I replaced div by span (to turn block HTML tag into inline HTML tag, without loading CSS rule)

Code: Select all

$event['configurator']->tags['attachment']->template = '<span class="inline-attachment">' . '<xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment><xsl:value-of select="@filename"/><xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment>' . '</span>';
However, it would be better to replace only $fragments['inline_attachment_open'] and $fragments['inline_attachment_close'], so that the extension wouldn't need to be rewritten if a future phpBB version replace the code between these two fragments in factory.php '<xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment><xsl:value-of select="@filename"/><xsl:comment> ia<xsl:value-of select="@index"/> </xsl:comment>'. Moreover, it would be even better if the BBcode replacement code only occurs if the attachment is an image or a thumbnail (flash and other attachments are still block elements anyway).

Any idea?
zzonde wrote:
Sun Aug 19, 2018 9:26 am
Would be cool if the images could be cropped to the same size.
You can generate thumbnails for larger images attachments.

focp
Registered User
Posts: 20
Joined: Mon Feb 15, 2016 10:59 am

Re: [3.2][RC] Inline attached images

Post by focp » Mon Nov 05, 2018 5:17 pm

hi, just tried the extension, and it works fine,
but when used on a board with board3 portal i get the following error message and the portal does not display,

Unable to find template "portal/portal_body.html" (looked into: /var/sites/f/mysite/public_html/styles/prosilver/template, /var/sites/f/mysite/public_html/styles/prosilver/theme, /var/sites/f/fmysite/public_html/styles/all/template, /var/sites/f/mysite/public_html/ext/bigmonstro/inlineimage/styles/all/template).

the file "portal/portal_body.html" does not exist in any of the installed styles (prosilver is the default)
but is in "/public_html/ext/board3/portal/styles/prosilver/template/portal"

any clues on how to fix this please ?

User avatar
</Solidjeuh>
Registered User
Posts: 1068
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][RC] Inline attached images

Post by </Solidjeuh> » Mon Nov 05, 2018 6:03 pm

Yes, portal problem confirmed
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: No registered users and 17 guests