Image Resizer For Wap Buddy Script...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Image Resizer For Wap Buddy Script...

    How can I preview the resized images of uploaded pictures in wap buddy script.Any body have a image resizer script for that? Help please Gumslone......Subzero...........Lamar........

    #2
    Code:
    echo "
    <img src=\"$file_name\" height=\"80\" width=\"80\" alt=\"$file_name\"/>
    
    <a href=\"$file_name\">$file_name</a>
    
    ";
    its faster easyer also add a download link as will
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      but that is not reducing the image size it iz downloading the whole image and browser is shrinking it to fit at that high and widh. Im thinking ti give away my gallery script made from Wap Buddy and image resizer You can see it at my site and then gallery. sorry if i removed any of your names of your scripts :| just tell me and i will put it back.

      Comment


        #4
        but that is not reducing the image size it iz downloading the whole image and browser is shrinking it to fit at that high and widh. Im thinking ti give away my gallery script made from Wap Buddy and image resizer You can see it at my site and then gallery. sorry if i removed any of your names of your scripts :| just tell me and i will put it back.[/b]
        Ye bro..You are quite correct...Pls upload it with your post..Thankz.

        Comment


          #5
          I have these scripts image.php and wap buddy script.I wanna know how to combine these two to display resized image preview for downloadable pics.

          Subzero ,how can I combine these two.Please edit below scripts to workin.




          image.php
          ---------------------
          This example will resample an image to half its original size.
          -----------------
          <?php
          // The file
          $filename = &#39;test.jpg&#39;;
          $percent = 0.5;

          // Content type
          header(&#39;Content-type: image/jpeg&#39;);

          // Get new dimensions
          list($width, $height) = getimagesize($filename);
          $new_width = $width * $percent;
          $new_height = $height * $percent;

          // Resample
          $image_p = imagecreatetruecolor($new_width, $new_height);
          $image = imagecreatefromjpeg($filename);
          imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

          // Output
          imagejpeg($image_p, null, 100);
          ?>

          -----------------------------------------------------------------------
          index.php of wap buddy script
          ------------------------------------------------------------------------
          <?

          header("Content-type: text/vnd.wap.wml");
          echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
          $conf["items_per_page"] = 2;
          if (!isset($page)) {$page = 0;}
          $total = 0;

          if(!($dp = opendir("./"))) die ("Cannot open ./");
          $file_array = array();
          while ($file = readdir ($dp))
          {
          if(substr($file,0,1) != &#39;.&#39; and $file != "index.php" and $file != "search.php")
          {
          $file_array[] = $file;
          }
          }
          $file_count = count ($file_array);
          sort ($file_array);
          ?>
          <wml>
          <card id="card1" title="animations">
          <p align="center">

          <?

          echo "";
          echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
          ";
          echo "Free Animations
          ";
          echo "<img src=\"/images/line.gif\" alt=\"*\"/>
          ";
          echo "
          ";
          if ($file_count > 0)
          {
          $first_record = $page * $conf["items_per_page"];
          $last_record = $first_record + $conf["items_per_page"];

          while (list($fileIndexValue, $file_name) = each ($file_array))
          {

          if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
          {
          echo "<img src=\"image.php\" alt=\"---\"/>
          ";

          echo "(". round(filesize($file_name)/1024,1) . "kb)
          ";
          echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
          ";
          $total = $total + filesize($file_name);
          }
          }

          if (($file_count > 0) AND ($page != 0))
          {
          // previous button
          $prev_page = $page -1;
          echo "
          <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
          ";
          }


          if (($file_count > 0) AND ($last_record < $file_count))
          {
          // next button
          $next_page = $page + 1;
          echo "
          <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
          ";
          }
          echo "<img src=\"/images/line.gif\" alt=\"*\"/>
          ";
          echo "
          Total Files:
          $file_count ";
          if ($file_count == 1)
          {echo "file";}
          else
          {echo "files";}

          echo " (" . round($total/1024,1) . "kb)";
          }
          closedir($dp);
          echo "
          ";
          ?>

          HOME
          </p>
          </card>
          </wml>

          Comment


            #6
            that yours script is for resizeing only jpg images, mine (its not mine ) is resizeing jpg, gif and png images. OK, i will upload it somewhere on saturday, when i get home. or i will build my own one till then.

            Comment


              #7
              that yours script is for resizeing only jpg images, mine (its not mine ) is resizeing jpg, gif and png images. OK, i will upload it somewhere on saturday, when i get home. or i will build my own one till then. [/b]
              Ye Thanks Bro.........masterklan you rock!!! I can&#39;t wait till saturday...lol

              Comment


                #8
                here it is, i build it today. just please dont remove author.gif , and you can edit only max image hight. which is more than enought. just type max hight size, and if image has larger hight than set, it will resize it to fit set and it can work with jpg, gif and png. http://wapx.biz/imageresize.zip i will upload it here on saturday. there is explanation in read me.txt
                Attached Files

                Comment


                  #9
                  I have these scripts image.php and wap buddy script.I wanna know how to combine these two to display resized image preview for downloadable pics.

                  Subzero ,how can I combine these two.Please edit below scripts to workin.
                  image.php
                  ---------------------
                  This example will resample an image to half its original size.
                  -----------------
                  <?php
                  // The file
                  $filename = &#39;test.jpg&#39;;
                  $percent = 0.5;

                  // Content type
                  header(&#39;Content-type: image/jpeg&#39;);

                  // Get new dimensions
                  list($width, $height) = getimagesize($filename);
                  $new_width = $width * $percent;
                  $new_height = $height * $percent;

                  // Resample
                  $image_p = imagecreatetruecolor($new_width, $new_height);
                  $image = imagecreatefromjpeg($filename);
                  imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

                  // Output
                  imagejpeg($image_p, null, 100);
                  ?>

                  -----------------------------------------------------------------------
                  index.php of wap buddy script
                  ------------------------------------------------------------------------
                  <?

                  header("Content-type: text/vnd.wap.wml");
                  echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
                  $conf["items_per_page"] = 2;
                  if (!isset($page)) {$page = 0;}
                  $total = 0;

                  if(!($dp = opendir("./"))) die ("Cannot open ./");
                  $file_array = array();
                  while ($file = readdir ($dp))
                  {
                  if(substr($file,0,1) != &#39;.&#39; and $file != "index.php" and $file != "search.php")
                  {
                  $file_array[] = $file;
                  }
                  }
                  $file_count = count ($file_array);
                  sort ($file_array);
                  ?>
                  <wml>
                  <card id="card1" title="animations">
                  <p align="center">

                  <?

                  echo "";
                  echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
                  ";
                  echo "Free Animations
                  ";
                  echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                  ";
                  echo "
                  ";
                  if ($file_count > 0)
                  {
                  $first_record = $page * $conf["items_per_page"];
                  $last_record = $first_record + $conf["items_per_page"];

                  while (list($fileIndexValue, $file_name) = each ($file_array))
                  {

                  if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                  {
                  echo "<img src=\"image.php\" alt=\"---\"/>
                  ";

                  echo "(". round(filesize($file_name)/1024,1) . "kb)
                  ";
                  echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
                  ";
                  $total = $total + filesize($file_name);
                  }
                  }

                  if (($file_count > 0) AND ($page != 0))
                  {
                  // previous button
                  $prev_page = $page -1;
                  echo "
                  <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
                  ";
                  }
                  if (($file_count > 0) AND ($last_record < $file_count))
                  {
                  // next button
                  $next_page = $page + 1;
                  echo "
                  <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
                  ";
                  }
                  echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                  ";
                  echo "
                  Total Files:
                  $file_count ";
                  if ($file_count == 1)
                  {echo "file";}
                  else
                  {echo "files";}

                  echo " (" . round($total/1024,1) . "kb)";
                  }
                  closedir($dp);
                  echo "
                  ";
                  ?>

                  HOME
                  </p>
                  </card>
                  </wml>[/b]

                  Subzero.Lamar......Any one....How can I link to the image file to resize in image.php?

                  Comment


                    #10
                    with script

                    Code:
                    <?php
                    // The file
                    $filename = &#39;test.jpg&#39;; <!--- here is you place ya images
                    $percent = 0.5;
                    
                    // Content type
                    header(&#39;Content-type: image/jpeg&#39;);
                    
                    // Get new dimensions
                    list($width, $height) = getimagesize($filename);
                    $new_width = $width * $percent;
                    $new_height = $height * $percent;
                    
                    // Resample
                    $image_p = imagecreatetruecolor($new_width, $new_height);
                    $image = imagecreatefromjpeg($filename);
                    imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
                    
                    // Output
                    imagejpeg($image_p, null, 100);
                    ?>
                    Code:
                    <?
                    
                    echo "[size="1"]";
                    echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
                    ";
                    echo "[b][u]Free Animations[/u][/b]
                    ";
                    echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                    ";
                    echo "[b][/b]
                    ";
                    if ($file_count > 0)
                    {
                    $first_record = $page * $conf["items_per_page"];
                    $last_record = $first_record + $conf["items_per_page"];
                    
                    while (list($fileIndexValue, $file_name) = each ($file_array))
                    {
                    
                    if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                    {
                    echo "<img src=\"image.php\" alt=\"---\"/>
                    "; <!-- you change size names 
                    echo "(". round(filesize($file_name)/1024,1) . "kb)
                    ";
                    echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
                    ";
                    $total = $total + filesize($file_name);
                    }
                    }
                    
                    if (($file_count > 0) AND ($page != 0))
                    {
                    // previous button
                    $prev_page = $page -1;
                    echo "
                    <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
                    ";
                    }
                    if (($file_count > 0) AND ($last_record < $file_count))
                    {
                    // next button
                    $next_page = $page + 1;
                    echo "
                    <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
                    ";
                    }
                    echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                    ";
                    echo "
                    Total Files:
                    $file_count ";
                    if ($file_count == 1)
                    {echo "file";}
                    else
                    {echo "files";}
                    
                    echo " (" . round($total/1024,1) . "kb)";
                    }
                    closedir($dp);
                    echo "[/size]";
                    ?>
                    
                    [size="1"][url="/wap/home.php"]HOME[/url][/size]
                    </p>
                    </card> 
                    </wml>
                    ech images you upload change image to file name that you put in test
                    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                    Visit: WapMasterz Coming Back Soon!
                    _______
                    SCRIPTS FOR SALE BY SUBZERO
                    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                    _______
                    Info & Tips
                    php.net
                    w3schools.com

                    Comment


                      #11
                      with script

                      Code:
                      <?php
                      // The file
                      $filename = &#39;test.jpg&#39;; <!--- here is you place ya images
                      $percent = 0.5;
                      
                      // Content type
                      header(&#39;Content-type: image/jpeg&#39;);
                      
                      // Get new dimensions
                      list($width, $height) = getimagesize($filename);
                      $new_width = $width * $percent;
                      $new_height = $height * $percent;
                      
                      // Resample
                      $image_p = imagecreatetruecolor($new_width, $new_height);
                      $image = imagecreatefromjpeg($filename);
                      imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
                      
                      // Output
                      imagejpeg($image_p, null, 100);
                      ?>
                      Code:
                      <?
                      
                      echo "[size="1"]";
                      echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
                      ";
                      echo "[b][u]Free Animations[/u][/b]
                      ";
                      echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                      ";
                      echo "[b][/b]
                      ";
                      if ($file_count > 0)
                      {
                      $first_record = $page * $conf["items_per_page"];
                      $last_record = $first_record + $conf["items_per_page"];
                      
                      while (list($fileIndexValue, $file_name) = each ($file_array))
                      {
                      
                      if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                      {
                      echo "<img src=\"image.php\" alt=\"---\"/>
                      "; <!-- you change size names 
                      echo "(". round(filesize($file_name)/1024,1) . "kb)
                      ";
                      echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
                      ";
                      $total = $total + filesize($file_name);
                      }
                      }
                      
                      if (($file_count > 0) AND ($page != 0))
                      {
                      // previous button
                      $prev_page = $page -1;
                      echo "
                      <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
                      ";
                      }
                      if (($file_count > 0) AND ($last_record < $file_count))
                      {
                      // next button
                      $next_page = $page + 1;
                      echo "
                      <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
                      ";
                      }
                      echo "<img src=\"/images/line.gif\" alt=\"*\"/>
                      ";
                      echo "
                      Total Files:
                      $file_count ";
                      if ($file_count == 1)
                      {echo "file";}
                      else
                      {echo "files";}
                      
                      echo " (" . round($total/1024,1) . "kb)";
                      }
                      closedir($dp);
                      echo "[/size]";
                      ?>
                      
                      [size="1"][url="/wap/home.php"]HOME[/url][/size]
                      </p>
                      </card> 
                      </wml>
                      ech images you upload change image to file name that you put in test[/b]

                      Do you say I have to put each image&#39;s file name on &#39;test.jpg&#39;? I want to display the 5 resized images for 1 page in wap budy script .

                      Comment


                        #12
                        <---- is where you look at

                        ok thats how that image sizer works
                        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                        Visit: WapMasterz Coming Back Soon!
                        _______
                        SCRIPTS FOR SALE BY SUBZERO
                        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                        _______
                        Info & Tips
                        php.net
                        w3schools.com

                        Comment

                        Working...
                        X