image resizing

Started by actionman, December 30, 2012, 10:48:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ndbj

Thanks.
This thread helped me.

DarkMaster

No worries... glad to help lol

Please Place All Support Questions In The Right Section

actionman

works a treat thanks - all those hours countlessly searching and within 10 mins i get what i need on here

Thanks darkmaster i owe ya one!!

DarkMaster

#2
its something like this you need..

off to work shortly... but if you wait till later i will post the lot for you..

this will replace your image part in the function format_comment section of your  bbcode_functions.php

// [img]http://www/image.gif[/img]
  $s = preg_replace("/\[img\](http:\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i", "<a target=_blank href=\"\\1\" rel=\"lightbox\"><img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\"  width=\"200\"></a>", $s);
  // [img=http://www/image.gif]
  $s = preg_replace("/\[img=(http:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))\]/i", "<a target=_blank href=\"\\1\" rel=\"lightbox\"><img border=\"0\" src=\"\\1\" alt=\"\"  onload=\"NcodeImageResizer.createOn(this);\"  width=\"200\"></a>", $s);


this goes inside the <head>

<script type="text/javascript" src="js/lightbox.js"></script>

and this just below

<script type="text/javascript" src="js/ncode_imageresizer.js"></script>
  <script type="text/javascript">
  <!--
  NcodeImageResizer.MAXWIDTH = 400;
  NcodeImageResizer.MAXHEIGHT = 0;
  NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
  NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
  NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
  NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
  -->
  </script>


and this too attatchments places in a folder called js

i think thats it...

[attachment deleted by admin]
Please Place All Support Questions In The Right Section

actionman

Hi all

does anyone know of a code that i get where it shows above a resized image click here to resize - ive tried googling but that didnt produce anything to what i want

im guessing this is javascript but i cannot find it - can anyone help

Cheers

Actionman