Jump to content

ofi

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by ofi

  1. ofi

    include

    Hi I follow this tutorial http://www.phpbb.com/kb/article/add-a-new-custom-page-to-phpbb/ everything works fine. just stuck on the include :-\
  2. ofi

    include

    Hi I have post this on the phpbb forum, i have made custom page from the forum and i am trying to include cutenews into the custom page, i just cant find out to get this in.
  3. ofi

    include

    Hya How can i add this include <?php include("file.php"); ?> inside this code <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './phpbb3_demo/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); page_header('Um mig'); $template->set_filenames(array( 'body' => 'aboutus_body.html', )); page_footer(); ?>
  4. Hya all i am trying to add pagination code to page, i have try to include it, put the code on the page, but no luck, can some help with this, i am totally stuck in this. here is the pagination i am trying to put in http://www.mis-algoritmos.com/digg-style-pagination-class and here is the page i am trying to add the pagination code to. http://almennt.com/ny_sida/testing.php
  5. ofi

    Two mysql

    Hi I am using phpbbforum and phpmelody,i have integrate it together, my question is, is there a way to have it like that, when you register at phpmelody, you will auto register to phpbb, hope you understand me, the site is here http://www.almennt.com and the forum is located here http://www.almennt.com/phpBB3/
  6. Hi I am working on this gallery http://www.klaedskeri.com/test2/ImageGallery/gallery.php and i cant find out, how to fix the links Myndir 2 | Myndir 4 | Myndir 3 | | Slide show as you can see on the script, it will not comes right out, below is the full code, can someone see what wrong, why does it not show Myndir 1 | Myndir 2 | Myndir 3 |Myndir 4 | Slide show what am i doing wrong Sorry my English :wink: <?php $width = 600; $thumbnails_per_row = 5; $thumbnail_indexing = TRUE; $thumbnails_per_page = 20; $thumbnail_filetype = "png"; // png or jpg $slideshow_filetype = "png"; // png or jpg $multipleGalleries = TRUE; $galleries = array( "Myndir 1" => "./gallery01", "Myndir 2" => "./gallery02", "Myndir 3" => "./gallery03", "Myndir 4" => "./gallery04"); $link_original_image = TRUE; // delete all generated images after modifying anything below !!! // slideshowsettings $image_margin = 10; $image_border = TRUE; $image_dropShadow = TRUE; $image_offset_x = 1; $image_offset_y = 1; $image_dropShadow_scale = 0.99; $image_dropShadow_offset = 12; $image_dropShadow_blurRadius = 10; // not greater then 46 (because of pixel gaps) and not greater then $dropShadow_offset // thumbnailsettings $thumbnail_border = TRUE; $thumbnail_dropShadow = TRUE; $thumbnail_offset_x = 0; $thumbnail_offset_y = 1; $thumbnail_dropShadow_scale = 0.99; $thumbnail_dropShadow_offset = 6; $thumbnail_dropShadow_blurRadius= 6; // not greater then 46 (because of pixel gaps) and not greater then $dropShadow_offset $background_color = array(255, 255, 255); $border_color = array(0, 0, 0); $dropShadow_color = array(100, 100, 100); // has to be darker then the background color!!! //################################################################################ //### #### //### CONFIGURATION - ends here #### //### #### //### !!! don't edit anything above, except you know what you are doing !!! #### //### #### //################################################################################ $html_background_color = "#".sprintf("%02s", dechex($background_color[0])).sprintf("%02s", dechex($background_color[1])).sprintf("%02s", dechex($background_color[2])); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Myndir</title> <style type="text/css"> body { font-family: arial, sans-serif; text-align: center; // dirty hack for centered page-container in IE5 color: #707070; background-color: <?php echo "$html_background_color"; ?>; padding-top: 4%; } #page { width: <?php echo "$width"; ?>px; margin: 0px auto; padding: 10px; text-align: left; border: solid #c0c0c0 1px; } #navigation { border-bottom: solid #c0c0c0 1px; padding: 10px; } #statusbar { border-bottom: solid #c0c0c0 1px; padding: 10px; } #img_area { text-align: center; margin-top: 15px; } #footer { border-top: solid #c0c0c0 1px; padding: 10px; text-align: center; } #footer p { font-size: 10px; color: #555555; font-weight: bold; } img { border: 0px; } p { font-size: 12px; color: #777777; font-weight: normal; } a { font-weight: bold; color: #999999; text-decoration: none; } </style> </head> <body> <div id="page"> <?php // initialization------------------------------------------------------------------------------------------------------------------------------------------------------------------------ $SCRIPT_NAME = getenv("SCRIPT_NAME"); if (isset($_GET["gallery"])) { $gallery = $_GET["gallery"]; } else { $gallery = $galleries[key($galleries)]; } if (isset($_GET["view"])) { $view = $_GET["view"]; } else { $view = "thumbnails"; } if (isset($_GET["thumbnail_index"])) { $thumbnail_index = $_GET["thumbnail_index"]; } else { $thumbnail_index = 0; } if (isset($_GET["slideshow_index"])) { $slideshow_index = $_GET["slideshow_index"]; } else { $slideshow_index = 0; } if (!is_dir($gallery)) { die("<br/><br/>ERROR: invalid directory: $gallery"); } if (!is_dir($gallery."/.thumbs")) if (!mkdir($gallery."/.thumbs")) { die("<br/><br/>ERROR: can't create thumbnail directory in $gallery"); } if (!is_dir($gallery."/.modified")) if (!mkdir($gallery."/.modified")) { die("<br/><br/>ERROR: can't create directory for modified images in $gallery"); } $thumbnail_size = intval($width/$thumbnails_per_row); // functions------------------------------------------------------------------------------------------------------------------------------------------------------------------------ function scale_image($img, $factor) { $temp = imagecreatetruecolor(imagesx($img)*$factor, imagesy($img)*$factor); imagecopyresized($temp, $img, 0, 0, 0, 0, imagesx($img)*$factor, imagesy($img)*$factor, imagesx($img), imagesy($img)); return $temp; imagedestroy($temp); } function draw_image_border($img) { imagerectangle($img, 0, 0, imagesx($img)-1, imagesy($img)-1, imagecolorresolve($img, $GLOBALS["border_color"][0], $GLOBALS["border_color"][1], $GLOBALS["border_color"][2])); return $img; } function draw_dropShadow($img, $dropShadow_scale, $dropShadow_offset, $dropShadow_blurRadius, $background_color, $dropShadow_color, $image_offset_x, $image_offset_y) { $dropShadow_width = intval(imagesx($img)*$dropShadow_scale); $dropShadow_height = intval(imagesy($img)*$dropShadow_scale); $img_dropShadow = imagecreatetruecolor($dropShadow_width+$dropShadow_offset+$dropShadow_blurRadius, $dropShadow_height+$dropShadow_offset+$dropShadow_blurRadius); // determine drop shadow color gradient $gradient_steps = array(); // RGB array with the gradient steps $temp_color = array(); // temporary RGB array $dropShadowGradientColors = array(); // integer array with all gradient colors from dark to bright for ($i=0; $i<=2; $i++) { $gradient_steps[$i] = ($background_color[$i]-$dropShadow_color[$i])/$dropShadow_blurRadius; } $temp_color[0] = $dropShadow_color[0]+$gradient_steps[0]/2; $temp_color[1] = $dropShadow_color[1]+$gradient_steps[1]/2; $temp_color[2] = $dropShadow_color[2]+$gradient_steps[2]/2; $dropShadowGradientColors[0] = imagecolorresolve($img_dropShadow, $temp_color[0], $temp_color[1], $temp_color[2]); for ($i=1; $i<$dropShadow_blurRadius; $i++) { $temp_color[0] = $temp_color[0]+$gradient_steps[0]; $temp_color[1] = $temp_color[1]+$gradient_steps[1]; $temp_color[2] = $temp_color[2]+$gradient_steps[2]; $dropShadowGradientColors[$i] = imagecolorresolve($img_dropShadow, $temp_color[0], $temp_color[1], $temp_color[2]); } // draw drop shadow imagefill($img_dropShadow, 0, 0, imagecolorresolve($img_dropShadow, $background_color[0], $background_color[1], $background_color[2])); imagefilledrectangle($img_dropShadow, $dropShadow_offset+1, $dropShadow_offset+1, $dropShadow_offset+$dropShadow_width-1, $dropShadow_offset+$dropShadow_height-1, imagecolorresolve($img, $dropShadow_color[0], $dropShadow_color[1], $dropShadow_color[2])); for ($i=0; $i<$dropShadow_blurRadius; $i++) { // borders: top / left / right / bottom imageline($img_dropShadow, $dropShadow_offset, $dropShadow_offset-$i, $dropShadow_offset+$dropShadow_width, $dropShadow_offset-$i, $dropShadowGradientColors[$i]); imageline($img_dropShadow, $dropShadow_offset-$i, $dropShadow_offset, $dropShadow_offset-$i, $dropShadow_offset+$dropShadow_height, $dropShadowGradientColors[$i]); imageline($img_dropShadow, $dropShadow_offset+$dropShadow_width+$i, $dropShadow_offset, $dropShadow_offset+$dropShadow_width+$i, $dropShadow_offset+$dropShadow_height, $dropShadowGradientColors[$i]); imageline($img_dropShadow, $dropShadow_offset, $dropShadow_offset+$dropShadow_height+$i, $dropShadow_offset+$dropShadow_width, $dropShadow_offset+$dropShadow_height+$i, $dropShadowGradientColors[$i]); // corners: left top / right top / left bottom / right bottom imagearc($img_dropShadow, $dropShadow_offset+$dropShadow_blurRadius-$i, $dropShadow_offset+$dropShadow_blurRadius-$i, 2*$dropShadow_blurRadius, 2*$dropShadow_blurRadius, 180, 270, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_width, $dropShadow_offset+$dropShadow_blurRadius-$i, 2*$dropShadow_blurRadius, 2*$dropShadow_blurRadius, 270, 0, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset+$dropShadow_blurRadius-$i, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_height, 2*$dropShadow_blurRadius, 2*$dropShadow_blurRadius, 90,180, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_width, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_height, 2*$dropShadow_blurRadius, 2*$dropShadow_blurRadius, 0, 90, $dropShadowGradientColors[$i]); // redraw all corners enlarged by 1 px to prevent pixel gaps imagearc($img_dropShadow, $dropShadow_offset+$dropShadow_blurRadius-$i, $dropShadow_offset+$dropShadow_blurRadius-$i, 2*$dropShadow_blurRadius+1, 2*$dropShadow_blurRadius+1, 180, 270, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_width, $dropShadow_offset+$dropShadow_blurRadius-$i, 2*$dropShadow_blurRadius+1, 2*$dropShadow_blurRadius+1, 270, 0, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset+$dropShadow_blurRadius-$i, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_height, 2*$dropShadow_blurRadius+1, 2*$dropShadow_blurRadius+1, 90,180, $dropShadowGradientColors[$i]); imagearc($img_dropShadow, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_width, $dropShadow_offset-$dropShadow_blurRadius+$i+$dropShadow_height, 2*$dropShadow_blurRadius+1, 2*$dropShadow_blurRadius+1, 0, 90, $dropShadowGradientColors[$i]); } imagecopy($img_dropShadow, $img, $image_offset_x, $image_offset_y, 0, 0, imagesx($img), imagesy($img)); return $img_dropShadow; imagedestroy($img_dropShadow); } function create_thumbnail($image) { $thumbnail_size=$GLOBALS["thumbnail_size"]; $image_properties=getimagesize($image); switch ($image_properties[2]) { case 1: $thumb = imagecreatefromgif($image);break; case 2: $thumb = imagecreatefromjpeg($image);break; case 3: $thumb = imagecreatefrompng($image);break; default: die("<br/><br/>unknown file type: $image"); } $temp = imagecreatetruecolor($thumbnail_size, $thumbnail_size); imagefill($temp, 0, 0, imagecolorresolve($temp, $GLOBALS["background_color"][0], $GLOBALS["background_color"][1], $GLOBALS["background_color"][2])); if ($image_properties[0]>$image_properties[1]) { $thumb = scale_image($thumb, (1/($image_properties[0]/$thumbnail_size)*0.93)); // *0.93 is an ugly hack to make image in the thumb smaller (reason: $thumbnail_size was first the size of the thumb-image, but now it is the size of the hole thumb, including dropshadow) if ($GLOBALS["thumbnail_border"]) { $thumb = draw_image_border($thumb); } if ($GLOBALS["thumbnail_dropShadow"]) { $thumb = draw_dropShadow($thumb, $GLOBALS["thumbnail_dropShadow_scale"], $GLOBALS["thumbnail_dropShadow_offset"], $GLOBALS["thumbnail_dropShadow_blurRadius"], $GLOBALS["background_color"], $GLOBALS["dropShadow_color"], $GLOBALS["thumbnail_offset_x"], $GLOBALS["thumbnail_offset_y"]); } imagecopy($temp, $thumb, 1, $thumbnail_size/2-imagesy($thumb)/2, 0, 0, imagesx($thumb), imagesy($thumb)); } else { $thumb = scale_image($thumb, (1/($image_properties[1]/$thumbnail_size)*0.93)); // *0.93 is an ugly hack to make image in the thumb smaller (reason: $thumbnail_size was first the size of the thumb-image, but now it is the size of the hole thumb, including dropshadow) if ($GLOBALS["thumbnail_border"]) { $thumb = draw_image_border($thumb); } if ($GLOBALS["thumbnail_dropShadow"]) { $thumb = draw_dropShadow($thumb, $GLOBALS["thumbnail_dropShadow_scale"], $GLOBALS["thumbnail_dropShadow_offset"], $GLOBALS["thumbnail_dropShadow_blurRadius"], $GLOBALS["background_color"], $GLOBALS["dropShadow_color"], $GLOBALS["thumbnail_offset_x"], $GLOBALS["thumbnail_offset_y"]); } imagecopy($temp, $thumb, $thumbnail_size/2-imagesx($thumb)/2, 1, 0, 0, imagesx($thumb), imagesy($thumb)); } switch ($GLOBALS["thumbnail_filetype"]) { case "png": { imagepng($temp, "./.thumbs/$thumbnail_size"."_thumb_".$image.".".$GLOBALS["thumbnail_filetype"]); } break; case "jpg": { imagejpeg($temp, "./.thumbs/$thumbnail_size"."_thumb_".$image.".".$GLOBALS["thumbnail_filetype"]); } break; default: { die("<br/><br/>ERROR: unsupported target filetype for thumbnails: ".$GLOBALS["thumbnail_filetype"]); } } imagedestroy($thumb); imagedestroy($temp); return TRUE; } function create_slideshow_item($image) { $image_properties=getimagesize($image); switch ($image_properties[2]) { case 1: $img = imagecreatefromgif($image);break; case 2: $img = imagecreatefromjpeg($image);break; case 3: $img = imagecreatefrompng($image);break; default: die("<br/><br/>unknown file type: $image"); } if ($image_properties[0]>=($GLOBALS["width"]-2*$GLOBALS["image_margin"])) { $img = scale_image($img, ($GLOBALS["width"]-2*$GLOBALS["image_margin"])/$image_properties[0]); if ($GLOBALS["image_border"]) { $img = draw_image_border($img); } if ($GLOBALS["image_dropShadow"]) { $img = draw_dropShadow($img, $GLOBALS["image_dropShadow_scale"], $GLOBALS["image_dropShadow_offset"], $GLOBALS["image_dropShadow_blurRadius"], $GLOBALS["background_color"], $GLOBALS["dropShadow_color"], $GLOBALS["image_offset_x"], $GLOBALS["image_offset_y"]); } } else { if ($GLOBALS["image_border"]) { $img = draw_image_border($img); } if ($GLOBALS["image_dropShadow"]) { $img = draw_dropShadow($img, $GLOBALS["image_dropShadow_scale"], $GLOBALS["image_dropShadow_offset"], $GLOBALS["image_dropShadow_blurRadius"], $GLOBALS["background_color"], $GLOBALS["dropShadow_color"], $GLOBALS["image_offset_x"], $GLOBALS["image_offset_y"]); } } switch ($GLOBALS["slideshow_filetype"]) { case "png": { imagepng($img, "./.modified/".$GLOBALS["width"]."_mod_".$image.".".$GLOBALS["slideshow_filetype"]); } break; case "jpg": { imagejpeg($img, "./.modified/".$GLOBALS["width"]."_mod_".$image.".".$GLOBALS["slideshow_filetype"]); } break; default: { die("<br/><br/>ERROR: unsupported target filetype for thumbnails: ".$GLOBALS["slideshow_filetype"]); } } imagedestroy($img); return TRUE; } // main------------------------------------------------------------------------------------------------------------------------------------------------------------------------ $gallery_name = key($galleries); // navigation------------------------------------------------------------------------------------------------ echo "<div id=\"navigation\">"; if ($multipleGalleries) { foreach ($galleries as $entry) { echo "<a href=\"$SCRIPT_NAME?gallery=$entry\" title=\"show gallery ".key($galleries)."\">".key($galleries)."</a> | "; if ($gallery==$entry) { $gallery_name = key($galleries); } next($galleries); } } if ($view=="thumbnails") { echo " <a href=\"$SCRIPT_NAME?view=slideshow&gallery=$gallery\" title=\"show gallery as slide show\">Slide Show</a>"; } else { echo " <a href=\"$SCRIPT_NAME?view=thumbnails&gallery=$gallery\" title=\"show gallery overview\">Overview</a>"; } echo "</div>"; // generate images array------------------------------------------------------------------------------------------------ chdir($gallery); $directory = dir("./"); $images_array = array(); while ($file = $directory->read()) { if (is_file($file) and in_array(strtolower(substr($file, -4)), array(".png", ".jpg", ".gif"))) { $images_array[] = $file; } } $directory->close(); reset($images_array); $images_count = count($images_array); sort($images_array); // generate all for this gallery----------------------------------------------------------------------------------------------- if ($_GET["action"]=="generate_all") { $count1=0; $count2=0; echo "<p>"; foreach ($images_array as $image) { if (!is_file("./.thumbs/$thumbnail_size"."_thumb_".$image.".".$thumbnail_filetype)) { create_thumbnail($image); echo "generated thumbnail for <i>$image</i><br/>"; $count1++; } if (!is_file("./.modified/$width"."_mod_".$image.".".$slideshow_filetype)) { create_slideshow_item($image); echo "generated slideshow picture for <i>$image</i><br/>"; $count2++; } } echo "<br/><br/>generated <b>$count1</b> thumbnails and <b>$count2</b> slideshow pictures for gallery <i>$gallery_name</i></p>"; } // generate gallery------------------------------------------------------------------------------------------------ switch ($view) { case "thumbnails": { echo "<div id=\"statusbar\">"; echo "<p>$images_count myndir í <b>$gallery_name</b></p>"; if ($thumbnail_indexing) { $images_array = array_chunk($images_array, $thumbnails_per_page); $images_array = $images_array[$thumbnail_index]; if ($images_count>$thumbnails_per_page) { echo "<p>"; if ($thumbnail_index>0) { echo "<a href=\"$SCRIPT_NAME?view=thumbnails&gallery=$gallery&thumbnail_index=".($thumbnail_index-1)."\" title=\"previous\"><< prev </a>"; } echo ($thumbnail_index+1)."/".ceil($images_count/$thumbnails_per_page)." "; if ($thumbnail_index<(ceil($images_count/$thumbnails_per_page)-1)) { echo "<a href=\"$SCRIPT_NAME?view=thumbnails&gallery=$gallery&thumbnail_index=".($thumbnail_index+1)."\" title=\"next\">next >></a>"; } echo "</p>"; } } echo "</div>"; echo "<div id=\"img_area\">"; $i = 1; $row = 0; foreach ($images_array as $image) { if (!is_file("./.thumbs/$thumbnail_size"."_thumb_".$image.".".$thumbnail_filetype)) { create_thumbnail($image); } echo "<a href=\"$SCRIPT_NAME?view=slideshow&gallery=$gallery&slideshow_index=".($i-1+$row*$thumbnails_per_row+$thumbnail_index*$thumbnails_per_page)."\"><img src=\"$gallery/.thumbs/$thumbnail_size"."_thumb_".$image.".".$thumbnail_filetype."\" title=\"$image\" alt=\"thumbnail\" /></a>"; if ($i==$thumbnails_per_row) { $i = 1; echo "<br/>"; $row++; } else { $i++; } next($images_array); } } break; case "slideshow": { echo "<div id=\"statusbar\"><p>"; if ($slideshow_index>0) { echo "<a href=\"$SCRIPT_NAME?view=slideshow&gallery=$gallery&slideshow_index=".($slideshow_index-1)."\" title=\"previous\"><< Fyrri </a>"; } echo ($slideshow_index+1)."/$images_count "; if ($slideshow_index<($images_count-1)) { echo "<a href=\"$SCRIPT_NAME?view=slideshow&gallery=$gallery&slideshow_index=".($slideshow_index+1)."\" title=\"next\">Næsta >></a>"; } echo "</p></div>"; echo "<div id=\"img_area\">"; if (!is_file("./.modified/$width"."_mod_".$images_array[$slideshow_index].".".$slideshow_filetype)) { create_slideshow_item($images_array[$slideshow_index]); } if ($link_original_image) { echo "<a href=\"$gallery/".$images_array[$slideshow_index]."\"><img src=\"$gallery/.modified/$width"."_mod_".$images_array[$slideshow_index].".".$slideshow_filetype."\" title=\"".$images_array[$slideshow_index]."\" alt=\"".$images_array[$slideshow_index]."\" /></a>"; } else { echo "<img src=\"$gallery/.modified/$width"."_mod_".$images_array[$slideshow_index].".".$slideshow_filetype."\" title=\"".$images_array[$slideshow_index]."\" alt=\"".$images_array[$slideshow_index]."\" />"; } } break; } echo "</div>"; ?>
  7. Hi i am using this http://www.koddinn.com/csphonebook102/ how can i add in password when i want to add in new entry, and same when i want to delete or edit entry.
  8. Hi i am trying to add in standalone guestbook to page http://www.koddinn.com/test/fri/page2.php but when i have sign in, it wont take me back to guestbook, can anyone see whats wrong with this, same as admin login here is book code http://www.koddinn.com/test/fri/guestbook.phps
  9. ok, i am trying to fix this. i am using wordpress with gallery plugin, and i have to get get fim_photos.php (from galley) to match index.php (site theme) here are both files index.php http://www.koddinn.com/files/index.phps fim_photos.php http://www.koddinn.com/files/fim_photos.phps can someone help me with this.
  10. Hi I have never done this before, i need to add in new table into SQL query from in phpmyadmin. how do i do that, i got 3 mysql Databasees, i am running wordpress on my site, so i pick wordpress mysql, and there to phpmyadmin, and then what do i do ??? need to add this in -- -- Table structure for table `wp_fim_cat` -- DROP TABLE IF EXISTS `wp_fim_cat`; CREATE TABLE IF NOT EXISTS `wp_fim_cat` ( `catname` varchar(255) NOT NULL default '', `id` int(11) NOT NULL auto_increment, `date` datetime default NULL, `description` text NOT NULL, `folder` varchar(255) NOT NULL default '', `cover` varchar(50) default '', `status` varchar(20) NOT NULL default 'public', `password` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wp_fim_comments` -- DROP TABLE IF EXISTS `wp_fim_comments`; CREATE TABLE IF NOT EXISTS `wp_fim_comments` ( `id` int(11) NOT NULL auto_increment, `image_id` int(11) NOT NULL default '0', `date` datetime NOT NULL default '0000-00-00 00:00:00', `author_comment` text NOT NULL, `author_name` varchar(255) NOT NULL default '', `author_email` varchar(255) NOT NULL default '', `author_url` varchar(255) NOT NULL default '', `author_ip` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wp_fim_images` -- DROP TABLE IF EXISTS `wp_fim_images`; CREATE TABLE IF NOT EXISTS `wp_fim_images` ( `id` smallint(11) NOT NULL auto_increment, `image` varchar(255) default NULL, `date` datetime default NULL, `title` varchar(255) default NULL, `description` text, `cat` varchar(10) NOT NULL default '', `status` varchar(50) default 'include', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;
  11. hi this is my site http://www.koddinn.com when i enter photo gallery, i get this http://www.koddinn.com/myndir/ those are the errors i get http://validator.w3.org/check?uri=http%3A%2F%2Fwww.koddinn.com%2Fmyndir%2F how do i fix those errors ???
  12. ok, almost there, only thing not working is, when i enter last page with "Prev" link, when i click that, it wont take me back. last page http://www.koddinn.com/myndir/album/born/?offset=40&count=20 <?php //get total images for the gallery $mytotal = fim_query_numrows($_GET['album']); $fim .= "<p>"; if( $o < 0 ) $o = 0; /*if there are previous images, show previous*/ if(($o-$c)>=0){$fim .= "<a href=\"?offset=".$o."&count=".$c."\">< Fyrri síða</a> "; } /*if there are images still remaining, show next*/ if(($mytotal-($o+$c))>0){$fim .="<a href=\"?offset=".($o+$c)."&count=".$c."\">Næsta síða ></a>"; } $fim .="</p>"; $fim .= "</div>"; return $fim; ?>
  13. hi what i am trying to do is, when i enter gallery, i want to have only "Next" link on first page at botton, when i click that link i get to next page, and at botton should be "Next - Prev" etc etc, and when i enter last page it should only show "Prev" link only. the pagination works fine, just wanna add this in, just not sure, here is the pagination code i am using now. $fim .= "<p>"; if( $o < 0 ) $o = 0; $fim .= "<a href=\"?offset=".$o."&count=".$c."\">< Fyrri síða</a> "; $fim .="<a href=\"?offset=".($o+$c)."&count=".$c."\">Næsta síða ></a>"; $fim .="</p>"; $fim .= "<p><a href='".get_url("")."'>".__(' ', 'fgallery')."</a></p>"; $fim .= "</div>"; return $fim; gallery http://www.koddinn.com/myndir/album/born/
  14. Hi What am i doing wrong //get total images for the gallery $mytotal = fim_query_numrows($_GET['album']); $fim .= "<p>"; if( $o < 0 ) $o = 0; $fim .= “<a href="?offset=".($o-$c)."&count=".$c.">Previous</a>“; } /*if there are images still remaining, show next*/ if(($mytotal-($o+$c))>0){ $fim .=”<a href="?offset=".($o+$c)."&count=".$c.">Next</a>“; } $fim .=”< /p >“; $fim .= “</div >“; return $fim;
  15. ofi

    Pagination

    hi this tutorial http://www.phpfreaks.com/tutorials/43/0.php if i am not gonna use mysql to grab images, how do i do that with that code
  16. dont understand, never used Dreamweaver, just got it now, how do i do this
  17. hi why does the letter [b]Þ[/b] not show, i only get simpols it says [code]�etta gallery inniheldur 2 myndir.[/code] should be [code]Þetta gallery inniheldur 2 myndir.[/code] see here, http://www.koddinn.com/myndir/ i am using wscite editor
  18. ofi

    Pagination

    ok, gonna try this, where does this go, on index or plugins, not sure i made test file and get this Table 'koddncom_wordpress.tablename' doesn't exist
  19. ofi

    Pagination

    Hi I am not sure what pagination i can use with this, http://www.koddinn.com/myndir/album/born/ see the gallery, i want add in pagination code so it will show 20 images per page, i am using wordpress and this photo album is plugin with wordpress, do i have to connect to mysql of wordpress to get this to work ?
  20. ofi

    Need help with space

    found it, replaced &raquo; to &nbsp; thx
  21. Hi how can i remove the marker without loosing the space above, see image [img]http://www.simnet.is/hafdis/1.jpg[/img] here is the code [code]// Make navigation function fim_build_navigation($album = "", $image = "", $cat = "") { $baseurl = get_url(""); $albumurl = get_url("album/$cat"); $t = fim_query_one_image(fim_get_image_id($image)); $imagetitle = ($t->title == "")?$image:$t->title; $string = "<h4 class='fim-nav'><a href='$baseurl'>".__('', 'fgallery')."</a>"; if($album && $image) $string .= " &raquo; <a href ='$albumurl'>$album</a>"; else $string .= " &raquo; $album"; if($image) $string .= " &raquo; $imagetitle"; $string .= "</h4>"; return $string;[/code] i did remove [code]&raquo;[/code] and i got this [img]http://www.simnet.is/hafdis/2.jpg[/img] so, how can i remove the the marker without loosing the space. thx
  22. HI see this image [img]http://www.koddinn.com/test/image.jpg[/img] the text should be [b]Leita á síðunni[/b] all text in posts and comments shows up right, but not if i edit php file and reupload it, is it something about UTF-8 ? i am using Editpadpro to edit those files, how can i change this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.