php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#282861 - 01/04/05 08:05 AM Beta-[6.4-6.5] Restrict Images 2.0
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria

   Beta-[6.4-6.5] Restrict Images 2.0 to Del.icio.us Add to del.icio.us
  Digg Beta-[6.4-6.5] Restrict Images 2.0 Digg it
***~~~ Version 1.0 ~~~*** Download <br /> <br />***~~~ Version 2.0 ~~~*** Download <br /> <br />In version 2.0, if an image is to large you are redirected back to the post preview page and a red border arround the image that is too large is displayed. <br /> <br />Mod Name / Version: Restrict Images 2.0 <br /> <br />Description: The mod checks the images contained within the image tags in a post for width, height, filesize and image count. <br /> <br />The admin can specify the maximum amount of images per post, the maximum image width, height and size. <br /> <br />If one of the criteria is not within the limits, an error message is displayed, example: <br />[]http://img148.exs.cx/img148/4148/clipboard017ys.gif[/] <br /> <br />Working Under: UBB.Threads 6.4-6.5 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: none <br /> <br />Author(s): Anno <br /> <br />Date: 01/04/05 <br /> <br />Credits: <br /> <br />Files Altered: <br />addpost.php <br />modifypost.php <br /> <br />New Files: <br />checkimages.php <br /> <br />Datebase Altered: no <br /> <br />Info/Instructions: Instructions within the checkimages.php file. <br /> <br />In order for the getimagesizes() function to work on remote files, the PHP version has to be > 4.0.5 . <br /> <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
124272-checkimages1.0.zip (41 downloads)



Edited by Anno (01/06/05 03:40 AM)

Top
#282862 - 01/04/05 09:16 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Thx! This one was also on my list.<br />A suggestion that might be more comfortable for the users:<br />If an image is to large, redirect to the post preview page and display a red border arround the image that is too large.<br />This way they don't have to go back and they can see which one is too large.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#282863 - 01/04/05 10:31 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: -Fusion-]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
>If an image is to large, redirect to the post preview page and display a red <br />>border arround the image that is too large.<br /><br />This is a good suggestion, I will look into this.

Top
#282864 - 01/04/05 07:40 PM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Version 2.0 in the attachment.


Attachments
124297-RestrictImages2.0.zip (64 downloads)


Top
#282865 - 01/04/05 10:39 PM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
[]Anno said:<br />Version 2.0 in the attachment. [/]<br /><br />And what's in version 2.0?
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#282866 - 01/05/05 03:24 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: luan]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
>If an image is to large, redirect to the post preview page and display a red<br />>border arround the image that is too large.

Top
#282867 - 01/10/05 01:12 PM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
I have a question, Anno. I am having my site redone, and I am going to use this mod so that the new layout, which includes graphics on the right side of the page, doesn't get stretched. The maximum allowable width would be about 740 pixels.<br /><br />My question is, what if I have a user puts two, let's say 500 pixel-wide, images in a post without using a linebreak in between. Will this mod split them up, putting them on different lines, so that they don't break up the layout?
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#282868 - 01/10/05 05:05 PM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: luan]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
The images are put in the next line automatically by the browser.<br />The following images are all placed in one line.<br /><br /><br />[]http://artists.iuma.com/IUMA/Bands/Government_Chicken_Boy/images/lg-30850.jpg[/][]http://artists.iuma.com/IUMA/Bands/Government_Chicken_Boy/images/lg-30850.jpg[/][]http://artists.iuma.com/IUMA/Bands/Government_Chicken_Boy/images/lg-30850.jpg[/]

Top
#282869 - 01/11/05 12:20 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
[]Anno said:<br />The images are put in the next line automatically by the browser.<br />The following images are all placed in one line.<br />[/]<br /><br />Is that a function of this mod, or the browser? Because the last thing I want is images stetching and breaking my new layout? However it is the case, this mod will be a nice addition for my board when 6.5.1 goes final <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#282870 - 01/11/05 01:21 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: luan]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Browser.

Top
#282871 - 02/04/05 12:18 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
Would it be possible to make it so this also checks the sizes of images used in private messages?
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#282872 - 02/04/05 03:57 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: luan]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
You would apply the includes accordingly to sendmessage.php and mess_reply.php .<br />Try it, and if you fail I'll take a closer look.

Top
#282873 - 02/05/05 07:25 PM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
I'm sure it's not hard to figure out. Thanks!
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#282874 - 03/01/05 11:38 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: luan]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
Just a side note here.<br />I'm running threads 6.5b6.<br /><br />I can install version 1.0 ok, but not 2.0<br />In addpost.php I dont have that first line;<br /><br />in addpost.php<br /> search for:<br /> $PrintBody = str_replace("\n","<br />",$PrintBody);<br /><br /> insert underneath:<br /> $part2 = 1;<br /> include("remotefilesize.php");<br /> include("checkimages.php");<br /><br /><br />Thought i'd raise it FYI. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#282875 - 03/02/05 03:04 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: Luka_dup1]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Search for a line that is similar to this, something along<br /><br />$PrintBody = str_replace("....something....",$PrintBody);

Top
#282876 - 03/15/05 12:48 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: domain123]
Elkaholic Offline
Newbie

Registered: 03/14/05
Posts: 11
I am helping a forum resolve an issue with your mod, maybe you can help. This is the error recieved when the image is to large<br /><br />Warning: getimagesize(http://test.haastylcalls.com/images/test.jpg) [function.getimagesize]: failed to open stream: HTTP request failed! [tW1 in /home/.sites/28/site1/web/ubbthreads/checkimages.php on line 88<br /><br /><br />It also take a very long time for the post to appear, if at all when the image is under or at the required size. It seems to just hang. I think they are using 2.0 but not 100% sure.<br /><br />Thanks

Top
#282877 - 03/15/05 01:05 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: jgohring]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
What version of PHP is the server running?
_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#282878 - 03/15/05 01:11 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: eslmix]
Elkaholic Offline
Newbie

Registered: 03/14/05
Posts: 11
They are not sure, I gave them a utility php file that will tell them, and or they will contact the host if they are unable to execute the file. <br /> <br />I figured it would have somthing to do with the version due to the code being unable to compile on line 88. <br />I looked at the code and it stalls on this line of code $imagehw = getimagesize($imageUrl); So I would bet that the php version does not support getimagesize. <br /> <br />Of course I could be wrong <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />


Edited by Elkaholic (03/15/05 01:13 AM)

Top
#282879 - 03/15/05 01:18 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: jgohring]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
JPEG 2000 support was added in 4.3.2, so if they have earlier than that, this MAY be the problem. I'm just making a stab in the dark, though. <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /><br /><br />An easy way to get information on a PHP install is to make a PHP file that consists of:<br />
Code:
<br />&lt;?<br />phpinfo();<br />?&gt;<br />
<br /><br />Call the file from your browser and it'll give you all kinds of goodies about the server's PHP install. <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />
_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#282880 - 03/15/05 01:23 AM Re: Beta-[6.4-6.5] Restrict Images 1.0 [Re: eslmix]
Elkaholic Offline
Newbie

Registered: 03/14/05
Posts: 11
Ya I know, but from what I understand they do not have access to the server in a manner at wich they can upload stuff and not sure they trust me yet, <br />this is the first thing I have helped them with and don't blame them, <br />but we will get there. That's exactly what I sent them <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> <br /> <br />BTW Thanks for your time


Edited by Elkaholic (03/15/05 01:31 AM)

Top
Page 1 of 2 1 2 >


Moderator:  Ian_W 
Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
tackaberry 1
Who's Online
0 Registered (), 21 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Yesterday at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks