I'm trying to combine Side Content and Inline module to show images (previously uploaded with the node) in the Side Content block, but it seems that inline tags (inline:xx...) do not get filtered when in the block so I'm forced to use raw HTML instead.

I have previously submitted this issue here:
http://drupal.org/node/28643

But it seems to be more related to Inline module than it is to Side Content.

Many thanks,

Comments

Richard Archer’s picture

Assigned: Unassigned » Richard Archer

I see what the problem is.
I'll fix it and post a patch in a little while.

Richard Archer’s picture

Version: 4.6.x-1.x-dev »
Status: Active » Needs review
StatusFileSize
new3.73 KB

Some pretty major changes were required, but this problem has been addressed. None of the functionality or usage syntax of inline.module has been altered... it just processes all content elements now instead of just the body and teaser.

inline.module used to do all its work from hook_nodeapi. It would process the $node->teaser and $node->body, replacing its tags in those elements. But it wouldn't see $node->sidecontent or any other element added to $node.

I have changed the way inline works so that it now does all its processing from hook_filter. Which makes a lot of sense, since after all, inline is a filter! Because hook_filter is called for each content element of a node, inline.module now processes all the content in a node including teaser, body, sidecontent and any others that may be added.

Because inline.module no longer had access to the files array in $node this required the addition of a database query to obtain a list of files attached to this node. This has the added benefit of giving inline.module access to the new description field introduced in 4.7.0. I think this description should be automatically used as a title if none is supplied. But that's for another patch! It also allows inline.module to easily look for files attached by other modules (like attachment), but that's another patch too.

Antanins’s picture

Thank you, Richard. I am currently using a modified version of Inline module 4.6.0 and have unsuccessfully tried to apply your patch to it, but now at least I know where the problem resides.

Richard Archer’s picture

If you like, post your modified version here and I'll look at merging the changes.

Antanins’s picture

StatusFileSize
new6.54 KB

Thanks a lot, Richard. I know it is somehow chaotic, but here is my version. Strange as it may sound it works fine.

Antanins’s picture

StatusFileSize
new6.54 KB

Excuse me, Richard. It seems the previous attachment could not be downloaded.

Richard Archer’s picture

Hi Antanins,

That's a seruously hacked version of inline you have there. I couldn't easily back-port my changes into your code.

The ability to include a style tag which is included in the "new code" patch http://drupal.org/node/32838.

The ability to link to a Flash movie is a good one and something inline should probably support. I guess the problem is that it should also then support placing .mpg, .wmv, .mov etc and since they all have different details in their object tag that would bloat inline a fair bit.

Antanins’s picture

Hi, Richard. I finally could back-port your changes into my code. Now attached images show ok on node body and sidecontent (great!), but not in teasers, where I get this red "NOT FOUND:...".

Could this be related to the database query?

Many thanks again,

Richard Archer’s picture

Status: Needs review » Needs work

It's because the node number isn't in arg(1) when you're viewing a teaser. This is also a problem when you're viewing /node and that page contains an inline image.

I'm not sure how to fix this... I have been trying to find time to browse through the source of some other filters to see how they do it.

At the moment I'm also contemplating changing the way Inline works so that you can place any image at all on the page if you refer to it by name. This would eliminate this problem because the node ID wouldn't be required any more.

sun’s picture

Status: Needs work » Closed (duplicate)

This is indeed not possible with current inline module. Inline needs a complete rework, which currently evolves in http://drupal.org/node/80170.

Marking this as dupe of http://drupal.org/node/73204.