Firefox PHP

[REQ:] imageshack code modifier

Posted by teake 
[REQ:] imageshack code modifier
July 25, 2008 02:09PM
I use an iframe
http://imageshack.us/iframe.php?txtcolor=111111&type=blank&size=30
with imageshack in the phorum's post.php. That way my users can pretty easily add pictures to their posts. But... as you know imageshack has some pop-up ads lately. What I always do is change the code so that the link goes straight to the image, instead of the html file which opens the image AND the ads.

[*URL=http://img150.imageshack.us/my.php?image=dsc04928ui5.jpg][*IMG]http://img150.imageshack.us/img150/5511/dsc04928ui5.th.jpg[*/IMG][*/URL] 
(off course without the *'s)

Then becomes:
[*URL=http://img150.imageshack.us/img150/5511/dsc04928ui5.jpg][*IMG]http://img150.imageshack.us/img150/5511/dsc04928ui5.th.jpg[*/IMG][*/URL]

So the URL for the PAGE gets replaced with the URL for the THUMB, but without the ".th" in the URL.

Can a module be made which does this automatically? ps: Phorum 5.0.16 (I know, not the latest one)



Edited 1 time(s). Last edit at 07/25/2008 02:11PM by teake.
Re: [REQ:] imageshack code modifier
July 25, 2008 02:25PM
Yes, about anything can be built in a module. But I don't think anybody will do this for you. Most people might be using the embed images module to show images inside postings and not some imageshack iframe trick (but that might be my ignorance on the coolness of that solution ;-) I never have seen nor used it, but it looks like some uploading tool that probably will park the images at imageshack.

If you can store the images locally, then enabling uploads and using the embed images module (phorum 5.2 and up required) will get you the same kind of functionality. If I had to write a mod like this, then I would probably be looking into using the standard Phorum attachment upload system, but overriding the file storage system to upload the images to imageshack in the backend. But that does require a well equiped PHP setup and some serious programming skills.

And yes you are right, you really should be working on an upgrade.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: [REQ:] imageshack code modifier
July 25, 2008 02:55PM
Ok, thanks for the info, I'll see what is the best option.
The imageshack module indeed is uploading to a remote host, to lower the data on my own server.

Upgrading to 5.2 or higher is not that easy anymore because of the hacks i've integrated in the course of time. I don't fancy doing that again, as I'm a lot shorter on time now. 5.0.16 is still good enough for my users. I does what it should.

But... is there an easy-update available, with keeping posts and members? That would save a lot of time.
Meanwhile I'll check for the features of the new versions.
Re: [REQ:] imageshack code modifier
July 25, 2008 03:10PM
Quote
teake
Ok, thanks for the info, I'll see what is the best option.
The imageshack module indeed is uploading to a remote host, to lower the data on my own server.

It's a genuine module? That has never been posted on the boards here, has it?

Quote

Upgrading to 5.2 or higher is not that easy anymore because of the hacks i've integrated in the course of time. I don't fancy doing that again, as I'm a lot shorter on time now. 5.0.16 is still good enough for my users. I does what it should.

It's not only features that you should upgrade for. There are also security issues that have been addressed over time. Not many, but there sure have been some that have not been implemented nor backported to 5.0.16.

Quote

But... is there an easy-update available, with keeping posts and members? That would save a lot of time.
Meanwhile I'll check for the features of the new versions.

When upgrading, memebers and posts are all preserved. The main thing you'd need to do is create a new template, based on the 5.2 templates, because there are new features and variable name changes that make upgrading the template mandatory. Upgrading the old templates by changing the code to work for 5.2 is a no-go area, since a lot has changed and it's easy to forget important bits and pieces.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: [REQ:] imageshack code modifier
July 25, 2008 03:14PM
Quote
Maurice Makaay
Quote
teake
Ok, thanks for the info, I'll see what is the best option.
The imageshack module indeed is uploading to a remote host, to lower the data on my own server.

It's a genuine module? That has never been posted on the boards here, has it?

No, it's not a genuine module. It's an iframe added in the PHP code for post.php. See screenshot-pic below:



I also added some other changes: the PHPBB style smilies, and some other style-sheet things. Besides that various things: all-user module, notification on PM, etc. a lot of those have been added as standard in the 5.2 family.



Edited 1 time(s). Last edit at 07/25/2008 03:33PM by teake.
Sorry, only registered users may post in this forum.

Click here to login