Photo Gallery

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

    #16
    but I upload the image and not work...not view images correct...only nopic.jpg appars...[/b]
    goto phpmyadmin.then put this SQL query
    Code:
    DROP TABLE IF EXISTS `ibwf_gallery`;
    CREATE TABLE `ibwf_gallery` (
      `id` int(100) NOT NULL auto_increment,
      `uid` int(100) NOT NULL,
      `sex` varchar(255) NOT NULL,
      `itemurl` varchar(255) NOT NULL,
      `file` varchar(250) NOT NULL,
      PRIMARY KEY  (`id`),
      UNIQUE KEY `name` (`itemurl`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3;
    INSERT INTO `ibwf_gallery` VALUES (1, '1', 'M', '[url]http://coolbd.wen.ru/anim/1.jpg','a'[/url]);
    INSERT INTO `ibwf_gallery` VALUES (2, '1', 'M', '[url]http://coolbd.wen.ru/anim/2.jpg','b'[/url]);

    Comment


      #17
      it doesnt work bcoz of my bad coding
      anyways thanks 4the correct SQL

      after using above SQL file pic is showing

      that means u need to add file > a

      there seems to be problem with this code

      Code:
      echo "<form action=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";  
      echo "Image URL: <input name=\"itemurl\" type=\"file\" value=\"\"/>
      ";
      echo "
      <input type=\"submit\" value=\"Add Photo\"/>";
      echo "</form>";
      by using itemurl
      user can only add http image links
      so i added file option


      just checked my SQL it was correct
      the problem is with the above code

      Comment


        #18
        goto phpmyadmin.then put this SQL query
        Code:
        DROP TABLE IF EXISTS `ibwf_gallery`;
        CREATE TABLE `ibwf_gallery` (
          `id` int(100) NOT NULL auto_increment,
          `uid` int(100) NOT NULL,
          `sex` varchar(255) NOT NULL,
          `itemurl` varchar(255) NOT NULL,
          `file` varchar(250) NOT NULL,
          PRIMARY KEY  (`id`),
          UNIQUE KEY `name` (`itemurl`)
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3;
        INSERT INTO `ibwf_gallery` VALUES (1, &#39;1&#39;, &#39;M&#39;, &#39;[url]http://coolbd.wen.ru/anim/1.jpg&#39;,&#39;a&#39;[/url]);
        INSERT INTO `ibwf_gallery` VALUES (2, &#39;1&#39;, &#39;M&#39;, &#39;[url]http://coolbd.wen.ru/anim/2.jpg&#39;,&#39;b&#39;[/url]);
        [/b]
        but if upload this code works upload gallery or not???
        if like my post click:

        http://coding-talk.com/images/totall...ost_thanks.gif

        Comment


          #19
          but I upload the image and not work...not view images correct...only nopic.jpg appars...[/b]
          shouldn&#39;t u chmod 777 the directory where u upload the gallery images?

          Comment


            #20
            it doesnt work bcoz of my bad coding
            anyways thanks 4the correct SQL

            after using above SQL file pic is showing

            that means u need to add file > a

            there seems to be problem with this code

            Code:
            echo "<form action=\"genproc.php?action=addgal&amp;sid=$sid\" method=\"post\">";  
            echo "Image URL: <input name=\"itemurl\" type=\"file\" value=\"\"/>
            ";
            echo "
            <input type=\"submit\" value=\"Add Photo\"/>";
            echo "</form>";
            by using itemurl
            user can only add http image links
            so i added file option
            just checked my SQL it was correct
            the problem is with the above code[/b]
            If you use file as input type you have to use file uploader
            but if you use previous script you need to put photo URLs using the admin.php then everything is ok for the previous script.while you are adding urls with admin.php,the admproc.php INSERTs itemurl in ibwf_gallery sql table for the code in admproc.php
            Code:
            mysql_query("INSERT INTO ibwf_gallery SET uid=&#39;".$uid."&#39;, itemurl=&#39;".$itemurl."&#39;, sex=&#39;".$usex."&#39;");

            Comment


              #21
              thanks a lot (smiles)
              sum tyms i talk just like i no nothing (lol)

              Comment


                #22
                shouldn&#39;t u chmod 777 the directory where u upload the gallery images?[/b]
                I can crate 1 directory???how I name ? gallery directory is create...but not upload images in this...
                if like my post click:

                http://coding-talk.com/images/totall...ost_thanks.gif

                Comment


                  #23
                  khan u can update gallery script ???
                  if like my post click:

                  http://coding-talk.com/images/totall...ost_thanks.gif

                  Comment


                    #24
                    I can crate 1 directory???how I name ? gallery directory is create...but not upload images in this...[/b]
                    Don&#39;t mind me. I don&#39;t know much lol. i started learning just a couple weeks back

                    Comment


                      #25
                      khan u can update gallery script ???[/b]

                      i will update the script soon.......
                      but please use proper english
                      users and myself finding it difficult to understand your language

                      Comment


                        #26
                        eheh I&#39;m italian lol
                        if like my post click:

                        http://coding-talk.com/images/totall...ost_thanks.gif

                        Comment


                          #27
                          eheh I&#39;m italian lol[/b]

                          btw i am indian
                          its ok (smiles)


                          File Updated

                          because i had done wrong html coding
                          the script was not working
                          also
                          the biggest problem was max file was not creating image

                          the above max file also doesnt work for this gallery script
                          anyways thanks for helping us (smiles)

                          max file from http://www.2wap.org/forums/index.php?showtopic=2390
                          this topic works

                          Comment


                            #28
                            btw i am indian
                            its ok (smiles)
                            File Updated

                            because i had done wrong html coding
                            the script was not working
                            also
                            the biggest problem was max file was not creating image

                            the above max file also doesnt work for this gallery script
                            anyways thanks for helping us (smiles)

                            max file from http://www.2wap.org/forums/index.php?showtopic=2390
                            this topic works[/b]
                            change the max.php
                            Code:
                            <?php
                            include("config.php");
                            include("core.php");
                            connectdb();
                            $pic = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_gallery WHERE id =&#39;".$id."&#39;"));
                            if($pic[3]!=&#39;&#39;)
                            {
                            $filename = "$pic[3]";
                            }
                            else 
                            {
                            $filename = "../images/nopic.jpg";
                            }
                            $height= 100;
                            $width= 100;
                            // Content type
                            header(&#39;Content-type: image/jpeg&#39;);
                            // Get new dimensions
                            list($width_orig, $height_orig) = getimagesize($filename);
                            
                            if ($width && ($width_orig < $height_orig)) {
                               $width = ($height / $height_orig) * $width_orig;
                            } else {
                               $height = ($width / $width_orig) * $height_orig;
                            }
                            
                            // Resample
                            $image_p = imagecreatetruecolor($width, $height);
                            $image = imagecreatefromjpeg($filename);
                            imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
                            
                            // Output
                            imagejpeg($image_p, null, 100);
                            ImageDestroy ($image_p);
                            ?>
                            [/b]
                            You wanna say this max.php doesnot give thumbnail view of an image?

                            Comment


                              #29
                              yeah that max script doesnt works on this script

                              this 1 does

                              Code:
                              <?php
                              $height= 100;
                              $width= 100;
                              // Content type
                              header(&#39;Content-type: image/jpeg&#39;);
                              if(!$filename)
                              $filename="./images/nopic.jpg";
                              // Get new dimensions
                              list($width_orig, $height_orig) = getimagesize($filename);
                              
                              if ($width && ($width_orig < $height_orig)) {
                                 $width = ($height / $height_orig) * $width_orig;
                              } else {
                                 $height = ($width / $width_orig) * $height_orig;
                              }
                              
                              // Resample
                              $image_p = imagecreatetruecolor($width, $height);
                              $image = imagecreatefromjpeg($filename);
                              imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
                              
                              // Output
                              imagejpeg($image_p, null, 100);
                              ImageDestroy ($image_p);
                              ?>

                              Comment


                                #30
                                yeah that max script doesnt works on this script

                                this 1 does

                                Code:
                                <?php
                                $height= 100;
                                $width= 100;
                                // Content type
                                header(&#39;Content-type: image/jpeg&#39;);
                                if(!$filename)
                                $filename="./images/nopic.jpg";
                                // Get new dimensions
                                list($width_orig, $height_orig) = getimagesize($filename);
                                
                                if ($width && ($width_orig < $height_orig)) {
                                   $width = ($height / $height_orig) * $width_orig;
                                } else {
                                   $height = ($width / $width_orig) * $height_orig;
                                }
                                
                                // Resample
                                $image_p = imagecreatetruecolor($width, $height);
                                $image = imagecreatefromjpeg($filename);
                                imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
                                
                                // Output
                                imagejpeg($image_p, null, 100);
                                ImageDestroy ($image_p);
                                ?>
                                [/b]
                                i dont think so

                                Comment

                                Working...
                                X