Firefox PHP

In-body attachment links/images (for Phorum 5.1 or later)

Posted by Maurice Makaay 
Re: In-body attachment links/images (for Phorum 5.1 or later)
November 03, 2007 09:35AM
Maurice I just managed to hard code this myself

in the in_body_attachements.php I changed line 259-262
$scale_url = phorum_get_url( 
                   PHORUM_INDEX_URL,
                   "in_body_scaled_image=" . urlencode($m[1][$match_id])
               );

to

 $scale_url = "[www.hummer-zone.com]; . urlencode($m[1][$match_id]);

This might not be the best solution and I'd like to hear your thoughts on it while I'm still waiting on the drupal community to answer my request. Seems to be a bug in the drupal mod_rewrite. I'm sure there might be a more elegant way to do this.

Also I still have one more problem. All images in bbcode img tags are resized except the ones that have been uploaded through the forum. Many user used to upload them and add the url via bbcode img tags to display them. now all these images are not displayed anymore via your resize module. any idea why?

Had the problem before I made the changes so I doubt it has to do with them.

i.e
[www.hummer-zone.com]

won't work while

[www.hummer-zone.com]

works without problems

is this supposed to not display uploaded image (since they are already display anyway - the resized version at the bottom of each post is fine) or is this another rewrite bug?

Tino
Tino
Re: In-body attachment links/images (for Phorum 5.1 or later)
November 03, 2007 09:54AM
Well images from other Phorums in the same format won't be recognized either

[www.hummer-zone.com]

turning url rewrite off won't help either and when open it in a broswer I'm being redirected to the index list of the particular phorum

Used your test forum for uploading a pic sorry if I'm not allowed to.

Tino

Discover the Divine Truth | [www.discoverthedivinetruth.com]
Re: In-body attachment links/images (for Phorum 5.1 or later)
November 03, 2007 04:29PM
The solution is just fine. I don't see a different way to do this better. Since you are running embedded, the cleanest way could be to override the get_url() method of the connector (or maybe your connector already has that method implemented) and implement the different URL scheme at that spot if you recognize it in the call (so if page=index and if there is a parameter named "in_body_scaled_image"). That all seems pretty cumbersome, especially if this might be fixed at a different level.

Quote

Also I still have one more problem. All images in bbcode img tags are resized except the ones that have been uploaded through the forum. Many user used to upload them and add the url via bbcode img tags to display them. now all these images are not displayed anymore via your resize module. any idea why?

This is because the
Re: In-body attachment links/images (for Phorum 5.1 or later)
November 03, 2007 06:44PM
Maurice thanks that explains a lot.

I think I'm fine now, the uploaded images are displayed by default at the bottom of the message which is absolutley fine. bbcode is no longer necessary on these images

Thanks for all the support and your fast replies.

Tino
Re: In-body attachment links/images (for Phorum 5.1 or later)
June 16, 2010 11:38PM
Does anybody have the 5.2 version of this?

Paul
Sorry, only registered users may post in this forum.

Click here to login