SimplePortal

Support => English Support => Topic started by: radu81 on March 18, 2014, 05:42:58 AM

Title: Resize ILA images (Inline Attachments) on board news
Post by: radu81 on March 18, 2014, 05:42:58 AM
Hello,

I am using the ILA mod (https://github.com/Spuds/SMF-ILA) to place the attachments in posts. I would like to know if there is a way to resize an attachment with this mod on board news. The images are shown in full size.

Also I would like to know if there is a way to change some bbcode to be displayed in board news. My first row for a news topic is always starting with
Code: [Select]
[attachimg=1]On board news I would like to transform that row in something like
Code: [Select]
[attachimg=1 align=left width=250] In this way on my topic I'll see the full image, and on board news I'll see the image resized to 250px and alligned to left.

Thank you in advance
Title: Re: Resize ILA images (Inline Attachments) on board news
Post by: radu81 on March 25, 2014, 08:24:25 AM
nobody?  :'(
Title: Re: Resize ILA images (Inline Attachments) on board news
Post by: AngelinaBelle on March 26, 2014, 05:15:08 PM
radu,

For more information about the features of the ILA mod, you should talk to the author, Spuds. He is a good guy and a former SMF team member.

As for portal resizing, SimplePortal does this in a very special way, and I know Spuds was not thinking of SimplePortal when he wrote it.  And,, of course, [SiNaN] was not thinking of Spuds' mod when he wrote SimplePortal.

But that does not mean you cannot bridge the gap.

SimplePortal uses some javascript to find all images that contain (if you are using SMF 2.X) "bbc_img sp_article" in the list of classes.  How does it get this way?  In PortalArticles.php, it looks for 'class="bbc_img"' and replaces it with 'class="bbc_img sp_articles"'.

To figure out what to do next, please have a look at the HTML code produced by your custom tag.
If it produces 'class="bbc_img"' , you are set.  But I am guessing that if it did, you would not be asking this question.  Perhaps it produces something slightly different, like 'class="bbc_img spud_special_class"'.  Please take a look at what the current version of PortalArticles.php is looking for and what your tag is producing to find a solution.

Somehow, I feel I have seen this question asked before.  And I am pretty sure the answer is pretty easy.  Depending on what we find, you may want to make a small change to PortalArticles.php or else to parse_bbc in subs.php.

Please have a look and report back here what you find.
SimplePortal 2.3.8 © 2008-2024, SimplePortal