Jump to content

cerberus478

Members
  • Posts

    95
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

cerberus478's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi I'm trying to create a page where there is a grid of images and if you click on one of those images it will expand. Once the image has expanded and you click on the i icon that is below it, the i icon will display the information about that image. This isn't like a popup or anything like that, because when you click on the image and it expands, it expands in the same spot and it doesn't popup. Here is the html $str.='<div class="portfolio-banner-wrapper'.$langClass.'" style="position: relative;">'; $str.= '<a class="portfolio-arrow-left'.$langClass.' portfolio-navigate'.$langClass.'" href="javascript:void(0);"><img src="images/left-arrow.png" onmouseover="this.src=\'images/blue-left-arrow.png\'" onmouseout="this.src=\'images/left-arrow.png\'" /></a>'; $str.= '<a class="portfolio-arrow-right'.$langClass.' portfolio-navigate'.$langClass.'" href="javascript:void(0);"><img src="images/right-arrow.png" onmouseover="this.src=\'images/blue-right-arrow.png\'" onmouseout="this.src=\'images/right-arrow.png\'"/></a>'; $str.= '<div class="portfolio-banner-inner">'; $str.= $this->getPortfolioTest(); $str.= '</div>'; $str.='</div>'; $str.='<div class="overlay-bg'.$langClass.'">'; $str.= '<div class="additional-navigation-wrapper'.$langClass.'">'; $str.= '<div class="info'.$langClass.'" style="display: none;">'; $str.= '<a class="border-bottom-white padding-level-one inactive additional-nav-info1" href="javascript:void(0);">'; $str.= '<img class="icon" src="images/i_icon.png" />'; $str.= '<img class="nav-arrow no-action floatright" src="images/nav-arrow-white.png" />'; $str.= '<span class="clearboth"></span>'; $str.= '</a>'; $str.= '<div class="additional-nav-info-wrapper1">'; $str.= $this->i_icon(); $str.= '</div>'; $str.= '</div>'; $str.= '</div>'; Here is the php function getPortfolioTest(){ global $_PRODUCTS_TABLE, $_HTTP_ADDRESS, $_PRODUCTS_IMAGES_DIR; $i=0; $cpt = 1; $str = ''; $whichCount = 1; $jobSearch=''; $query = mysql_query("SELECT * FROM $_PRODUCTS_TABLE WHERE `active`='1' AND `image` LIKE '%.%'".$jobSearch." ORDER BY `client` ASC"); $combineArr = mysql_num_rows($query); while( $result = mysql_fetch_object($query) ){ $product = new Product($result->id); $product->setFromDatabase(); $linkOut = getSEOLink($product->id); $target = ""; if(trim($product->linkout) != ""){ $linkOut = $product->linkout; $target = ' target="_blank"'; } if($whichCount == 1){ $portfolioClass="portfolio-active"; $style = "position: absolute; left:0%; top:0; width:100%;"; }else{ $portfolioClass="portfolio-inactive"; $style = "position: absolute; left:-100%; top:0; width:100%;"; } if($whichCount == 1){ $str.='<div id="portfolio-slide'.$i.'" class="portfolio-slide '.$portfolioClass.'" style="'.$style.'">'; $str.= '<div class="portfolio-slide-inner">'; $str.= '<div class="portfolio-banner-content portfolio-banner-left">'; $str.= '<div class="portfolio-banner-header">'; $str.= '</div>'; $str.= '<div class="portfolio-banner-copy">'; $str.= '<ul id="gallery">'; } $str.= '<li>'; $str.= '<a'.$target.' href="javascript:void(0);">'; $str.= '<img src="'.$_HTTP_ADDRESS.'products_images/'.$result->image.'">'; echo "this is getPortfolioTest"; $str.= '</a>'; $str.= '<span>'; $str.= '<h3>'.$result->name.'</h3>'; $str.= $result->description; $str.= '</span>'; $str.= '</li>'; if($whichCount % 9 == 0 && $whichCount < $combineArr){ $i++; $str.= '<div class="clearboth"></div>'; $str.= '</ul>'; $str.= '</div>'; $str.= '</div>'; $str.= '</div>'; $str.='</div>'; $str.='<div id="portfolio-slide'.$i.'" class="portfolio-slide '.$portfolioClass.'" style="'.$style.'">'; $str.= '<div class="portfolio-slide-inner">'; $str.= '<div class="portfolio-banner-content portfolio-banner-left">'; $str.= '<div class="portfolio-banner-header">'; $str.= '</div>'; $str.= '<div class="portfolio-banner-copy">'; $str.= '<ul id="gallery">'; } if($whichCount == $combineArr){ $str.= '<div class="clearboth"></div>'; $str.= '</ul>'; $str.= '</div>'; $str.= '</div>'; $str.= '</div>'; $str.='</div>'; } $whichCount++; $cpt++; } return $str; } function i_icon(){ global $_PRODUCTS_TABLE, $_HTTP_ADDRESS, $_PRODUCTS_IMAGES_DIR; $str = ''; $i = 0; $query = mysql_query("SELECT * FROM $_PRODUCTS_TABLE WHERE `active`='1'"); while($result = mysql_fetch_object($query)){ $str.= '<div class="additional-nav-info-inner'.$i.' overlay-bg" style="display:none;">'; $str.= '<ul>'; $str.= '<h3>'.$result->name.'</h3>'; $str.= '<p>'; $str.= $result->overview; $str.= '</p>'; $str.= '</ul>'; $str.= '</div>'; $i++; } return $str; } Here is the Jquery function galleryInit(){ $('#gallery li').hover( function(){$('span',this).slideToggle('fast');}, function(){$('span',this).slideToggle('fast'); }); $(".portfolio-banner-inner li").click(function(e){ if($(".activeExpand").length > 0){ $(".portfolio-active").css({"left":"0%"}); $(".portfolio-active").prevAll().css({"left":"-100%"}); $(".portfolio-active").nextAll().css({"left":"100%"}); $(".portfolio-banner-inner li").removeClass("inactiveExpand").removeClass("activeExpand").removeAttr("style").find("img").removeAttr("style"); $(".portfolio-arrow-left-scroll").addClass("portfolio-arrow-left").removeClass("portfolio-arrow-left-scroll"); $(".portfolio-arrow-right-scroll").addClass("portfolio-arrow-right").removeClass("portfolio-arrow-right-scroll"); return false; } $this = $(this); $(".portfolio-banner-inner li").addClass("inactiveExpand") $this.removeClass("inactiveExpand").addClass("activeExpand"); $(".portfolio-slide").css({"left":"0"}) $this.parents(".portfolio-slide:first").prevAll().find(".portfolio-slide-inner li").css({"position":"absolute","width":"100%","height":"100%","top":"0","left":"-100%"}).find("img").css({"width":"952px","height":"502px"}); $this.parents(".portfolio-slide:first").nextAll().find(".portfolio-slide-inner li").css({"position":"absolute","width":"100%","height":"100%","top":"0","left":"100%"}).find("img").css({"width":"952px","height":"502px"}); $this.siblings().prevAll().css({"position":"absolute","width":"100%","height":"100%","top":"0","left":"-100%"}).find("img").css({"width":"952px","height":"502px"}); $this.siblings().nextAll().css({"position":"absolute","width":"100%","height":"100%","top":"0","left":"100%"}).find("img").css({"width":"952px","height":"502px"}); $this.css({"position":"absolute","width":"100%","height":"100%","top":"0","left":"0"}); $this.find("img").animate({ width: '952px',//what the width of the image to be expanded is height: '502px'//what the width of the image to be expanded is }, 200); $(".portfolio-arrow-left").addClass("portfolio-arrow-left-scroll").removeClass("portfolio-arrow-left"); $(".portfolio-arrow-right").addClass("portfolio-arrow-right-scroll").removeClass("portfolio-arrow-right"); }); } function imageSlider(direction){ $activeExpandWhere = $(".activeExpand"); if($(".activeExpand").css("left") != "0px") return false; if(direction == "right"){ $(".inactiveExpand").css({"left":"100%"}); $(".activeExpand").animate({"left":-100+"%"},500,"easeInCubic",function(){ $(this).removeClass("activeExpand").addClass("inactiveExpand"); }); if($(".activeExpand").next("li").length == 0){ if($activeExpandWhere.parents(".portfolio-slide:first").next().length == 0){ $(".portfolio-slide").removeClass("portfolio-active").addClass("portfolio-inactive"); $(".portfolio-slide:first").removeClass("portfolio-inactive").addClass("portfolio-active"); $(".portfolio-slide:first").find(".portfolio-slide-inner li").eq(0).animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); return false; } $(".portfolio-slide").removeClass("portfolio-active").addClass("portfolio-inactive"); $activeExpandWhere.parents(".portfolio-slide:first").next().removeClass("portfolio-inactive").addClass("portfolio-active"); $activeExpandWhere.parents(".portfolio-slide:first").next().find(".portfolio-slide-inner li").eq(0).animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); return false; } $(".activeExpand").next("li").animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); return false; } $(".inactiveExpand").css({"left":"-100%"}); $(".activeExpand").animate({"left":100+"%"},500,"easeInCubic",function(){ $(this).removeClass("activeExpand").addClass("inactiveExpand"); }); if($(".activeExpand").prev("li").length == 0){ if($activeExpandWhere.parents(".portfolio-slide:first").prev().length == 0){ $(".portfolio-slide").removeClass("portfolio-active").addClass("portfolio-inactive"); $(".portfolio-slide:last").removeClass("portfolio-inactive").addClass("portfolio-active"); $(".portfolio-slide:last").find(".portfolio-slide-inner li").eq(($(".portfolio-slide:last").find(".portfolio-slide-inner li").length-1)).animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); return false; } $(".portfolio-slide").removeClass("portfolio-active").addClass("portfolio-inactive"); $activeExpandWhere.parents(".portfolio-slide:first").prev().removeClass("portfolio-inactive").addClass("portfolio-active"); $activeExpandWhere.parents(".portfolio-slide:first").prev().find(".portfolio-slide-inner li").eq(0).animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); return false; } $(".activeExpand").prev("li").animate({"left":0+"%"},500,"easeInCubic",function(){ $(this).removeClass("inactiveExpand").addClass("activeExpand"); }); } $(document).ready(function(e) { galleryInit(); $(".additional-nav-info1").click(function(){ if($(".additional-nav-info-inner1").css("display") == "block"){ $(this).removeClass("active"); $(this).addClass("inactive"); $(".additional-nav-info-inner1").stop().slideToggle(250); } else { $(this).removeClass("inactive"); $(this).addClass("active"); $(".additional-nav-info-inner1").stop().slideToggle(250); } }); $(".additional-nav-info-inner1 a").hover(function(){ $(this).find("img").eq(0).fadeOut(250); $(this).find("img").eq(1).fadeIn(250); }, function(){ $(this).find("img").eq(0).fadeIn(250); $(this).find("img").eq(1).fadeOut(250); }); }
  2. Hi I'm trying to change an image when a certain link is clicked. The image is a logo of a company and the links that will be clicked is english, arabic, and Chinese. So if someone clicks on Chinese then the logo changes to the Chinese version of the normal logo. Here is my html <?php $langArabic=''; $langChinese=''; $langSpanish=''; $langEng=''; $linkArabic=getSEOLink($page_id); $linkChinese=getSEOLink($page_id); $linkSpanish=getSEOLink($page_id); $linkEng=getSEOLink($page_id); $queryLink = mysql_query("SELECT * FROM $_SEO_TABLE WHERE `id_page`='".$page_id."'"); if(mysql_num_rows($queryLink) > 0){ $resultLink = mysql_fetch_object($queryLink); if($resultLink->url != ''){ $linkEng = $_HTTP_ADDRESS."".$resultLink->url; if($page_id == 1 || $page_id == '1'){ $linkEng = $_HTTP_ADDRESS; } } if($resultLink->url_arabic != ''){ $linkArabic = $_HTTP_ADDRESS."".$resultLink->url_arabic; } if($resultLink->url_chinese != ''){ $linkChinese = $_HTTP_ADDRESS."".$resultLink->url_chinese; } if($resultLink->url_spanish != ''){ $linkSpanish = $_HTTP_ADDRESS."".$resultLink->url_spanish; } } switch (urlExtension()) { case 'html': $langClass = ''; $langEng='langActive'; $langTag='en'; break; case 'ar': if($page->title_arabic == ''){ $langClass = '_arabic'; }else{ $langClass = '_arabic'; } $langArabic='langActive'; $langTag='ar'; break; case 'es': $langClass = ''; $langSpanish='langActive'; $langTag='es'; break; case 'cn': $langClass = ''; $langChinese='langActive'; $langTag='cn'; break; default: $langClass = ''; $langEng='langActive'; $langTag='en'; } ?> <a class="main-logo<?php echo $langClass;?>" href="javascript:void(0);"><img src="<?php echo $_HTTP_ADDRESS;?>images/logo-letters.png" /></a> <div class="language-selection-wrapper<?php echo $langClass;?> overlay-bg<?php echo $langClass;?> border-bottom-white<?php echo $langClass;?> padding-level-one<?php echo $langClass;?>"> <div class="language-inner-wrapper<?php echo $langClass;?>"> <a class="<?php echo $langEng;?>" href="<?php echo $linkEng;?>">English</a><span>|</span> <a class="<?php echo $langArabic;?>" href="<?php echo $linkArabic;?>">العربيّة</a><span>|</span> <a class="<?php echo $langSpanish;?>" href="<?php echo $linkSpanish;?>">Español</a><span>|</span> <a class="<?php echo $langChinese;?>" href="<?php echo $linkChinese;?>">中文</a> <div class="clearboth"></div> </div>
  3. Hi I'm trying to display the errors that I might have. I entered some code and I'm now getting a blank page. I have tried ini_set("display_errors", "1"); error_reporting(E_ALL); but I haven't gotten any errors. Is there any other way for me to display any errors that I might have
  4. Hi I'm getting this error on that line is $this->name = $result->name; this is the entire line function setFromDatabase(){ global $_FRAMES_TABLE; $query = mysql_query("SELECT * FROM $_FRAMES_TABLE WHERE id='$this->id'"); $result = mysql_fetch_object($query); $this->name = $result->name; $this->content = $result->content; $this->image = $result->image; } I'm not sure why I'm getting this error or how I can go about fixing it
  5. Hi I'm trying to create a page where the menu shows all the job titles and then if you click on a title it displays all the information that has that job title. For Example: In the menu I have puppies and I have kittens. If I click on puppies it has to give me all the information that I have in the database that has the job title "puppies" and if I click on kittens then it gives me all the information for the job title "kittens". Here is my code function putFilterResults(){ global $_PRODUCTS_IMAGES_DIR, $_PRODUCTS_TABLE; $str=''; $i=2; $jobSearch=''; if(isset($_SERVER['REQUEST_URI'])){ if(stristr($_SERVER['REQUEST_URI'], '?')){ $explodeJob = explode('?',$_SERVER['REQUEST_URI']); if(trim($explodeJob[1]) != ''){ $explodeJob[1] = str_replace("-", " ", $explodeJob[1]); $jobSearch=strtolower($explodeJob[1]); }else{ $jobSearch=''; } }else{ $jobSearch=''; } } $query = mysql_query("SELECT DISTINCT `job` FROM $_PRODUCTS_TABLE WHERE `active`='1' ORDER BY `job` ASC"); while($result = mysql_fetch_object($query)){ $langClass = ''; $langVar = ''; $colour=''; if(strtolower($result->{'job'.languageText()}) == $jobSearch){ $colour = ' style="color:#2BA8C4"'; } $str.='<a href="#"><li'.$colour.' id="'.$i.'">'.$result->{'job'.languageText()}.'</li></a>'; $i++; } return $str; } function putImage(){ global $_PRODUCTS_IMAGES_DIR, $_PRODUCTS_TABLE; $explode_img = explode(",", $this->image); $numImages=1; $numCount=1; $wowCount=0; $newImgArr = array(); $newClientArr = array(); $proinfo=''; $str =''; $str.=' <div class="ws_images">'; $jobSearch=''; if(isset($_SERVER['REQUEST_URI'])){ if(stristr($_SERVER['REQUEST_URI'], '?')){ $explodeJob = explode('?',$_SERVER['REQUEST_URI']); if(trim($explodeJob[1]) != ''){ $explodeJob[1] = str_replace("-", " ", $explodeJob[1]); $jobSearch=' AND LOWER(job) = "'.strtolower($explodeJob[1]).'"'; }else{ $jobSearch=''; } }else{ $jobSearch=''; } } $imageArr=''; $clientArr=''; $ff=0; $query = mysql_query("SELECT * FROM $_PRODUCTS_TABLE WHERE `active`='1' AND `image` LIKE '%.%'".$jobSearch." ORDER BY `client` ASC"); if(mysql_num_rows($query) < 1){ $query = mysql_query("SELECT * FROM $_PRODUCTS_TABLE WHERE `active`='1' AND `image` LIKE '%.%' ORDER BY `client` ASC"); } while($result = mysql_fetch_object($query)){ if(stristr($result->image,",")){ $explode = explode(",", $result->image); foreach($explode as $singleImg){ if($singleImg != ''){ array_push($newImgArr, $singleImg."!!!".$result->id."!!!".$result->client."!!!".$result->job."!!!".$result->description."!!!".$result->overview); } } }else{ array_push($newImgArr, $result->image."!!!".$result->id."!!!".$result->client."!!!".$result->job."!!!".$result->description."!!!".$result->overview); } } shuffle($newImgArr); foreach($newImgArr as $newImages){ if($ff < 100){ $styleLeft= "style='left:-750px'"; $activeImg = ''; $explode2 = explode("!!!",$newImages); $pathToFile = 'products_images/'.$explode2[0].''; if(file_exists($pathToFile)){ if($ff == 0){ $styleLeft= "style='left:0px'"; $activeImg = ' activeImg'; } $str.= '<div class="ws_div_wrapper'.$activeImg.'" id="ws_div_wrapper_'.$wowCount.'" '.$styleLeft.'>'; $str.= '<div class="ws_div_wrapper_relative" id="ws_div_wrapper_relative">'; $str.= '<p name="wowspanName" id="wowspan'.$wowCount.'" style="display:none;">'.$explode2[1].'</p>'; $str.= '<a style="cursor:pointer;"><img src="'.$_PRODUCTS_IMAGES_DIR.''.$explode2[0].'" id="wows'.$wowCount.'"/></a>'; $wowCount++; if($ff==0){ $proinfo=''; $proinfo.= '<div class="myWrapper" id="myWrapper">'; $proinfo.= "<div class='productbox'>"; if( $explode2[2] != "" ) $proinfo.= "<div class='topborder'> <span class='right'><b>".$explode2[2]."</b></span> </div>"; if( $explode2[3] != "" ) $proinfo.= "<div class='topborder1'> <span class='right'>".$explode2[3]."</span> </div>"; if( $explode2[4] != "" ) $proinfo.= "<div class='topborder1'> <span class='right'>".$explode2[4]."</span> </div>"; if( $explode2[5] != "" ) $proinfo.= "<div class='topborder1'> <span class='right'>".$explode2[5]."</span> </div>"; $proinfo.= "</div>"; $proinfo.= "</div>"; } $ff++; $str.= "</div>"; $str.= "</div>"; } } } $str.=' <input type="hidden" name="pVal" id="pVal" value="0">'; $str.=' <div class="clearboth"></div>'; $str.=' <p class="next_prev">'; $str.=' <a class="ws_next"></a>'; $str.=' <a class="ws_prev"></a>'; $str.=' </p>'; $str.=' </div>'; return $str; } If there is anything you don't understand please let me know.
  6. Hi I tried the code that you gave and I only got 1 image showing. On firebug all the images are there.
  7. Hi I'm trying to create a loop where 9 images are displayed and then you click on the arrow and the rest is then displayed. For example: In my database I have 15 images and at the frontend I need 9 images to be displayed and next to those images is 2 arrows one on the left and one on the right. If I click on the arrow on the right then the 6 images is then displayed and if I click on the left arrow the previous 9 images is displayed. What the problem that I have is, is that the <li> tag doesn't want to be work inside the <ul> tag. If I use firebug I get this The <li> that is inside the <ul> doesn't locate the image, but the <li> that is outside the <ul> locates the image and displays the images. What I would like is for the <li> that is inside the <ul> to locate the images and for the <li> that is outside the <ul> to not be there. Here is the code function putGrid($pageid){ global $_GRID_FRAMES_TABLE, $_GRID_TABLE, $_GRID_CROSS_GRID_FRAMES_TABLE, $_GRID_CROSS_PAGES_TABLE, $_HTTP_ADDRESS; $i=0; $cpt=1; $str=''; $whichCount = 1; $query = mysql_query("SELECT * FROM $_GRID_CROSS_PAGES_TABLE WHERE id_page='$pageid'"); $combineArr = mysql_num_rows($query); if( mysql_num_rows($query) ){ $result = mysql_fetch_object($query); $grid = new Grid($result->id_grid); foreach($grid->getSwfMultiple() as $gridSwf){ if($whichCount == 1){ $portfolioClass="portfolio-active"; $style = "position: absolute; left:0%; top:0; width:100%;"; }else{ $portfolioClass="portfolio-inactive"; $style = "position: absolute; left:-100%; top:0; width:100%;"; } if($whichCount == 1){ $str.='<div id="portfolio-slide'.$i.'" class="portfolio-slide '.$portfolioClass.'" style="'.$style.'">'; $str.= '<div class="portfolio-slide-inner">'; $str.= '<div class="portfolio-banner-content portfolio-banner-left">'; $str.= '<div class="portfolio-banner-header">'; $str.= '</div>'; $str.= '<div class="portfolio-banner-copy">'; $str.= '<ul id="gallery">'; } $str.= '<li>'; $str.= '<img src='.$_HTTP_ADDRESS.'grid_images/'.$gridSwf['image'].' />'; $str.= '</li>'; //} if($whichCount % 9 == 0 && $whichCount < $combineArr){ $i++; $str.= '</ul>'; $str.= '</div>'; /*$str.= '</div>';*/ $str.= '</div>'; $str.= '</div>'; $str.='</div>'; $str.='<div id="portfolio-slide'.$i.'" class="portfolio-slide '.$portfolioClass.'" style="'.$style.'">'; $str.= '<div class="portfolio-slide-inner">'; $str.= '<div class="portfolio-banner-content portfolio-banner-left">'; $str.= '<div class="portfolio-banner-header">'; $str.= '</div>'; $str.= '<div class="portfolio-banner-copy">'; $str.= '<ul id="gallery">'; } if($whichCount == $combineArr){ $str.= '</ul>'; $str.= '</div>'; /*$str.= '</div>';*/ $str.= '</div>'; $str.= '</div>'; $str.='</div>'; } $whichCount++; } $cpt++; } return $str; } If there is anything you don't understand please let me know
  8. Hi I know this is probably a stupid question but I have this error On line 2785 is $combineArr = mysql_num_rows($query); On line 2787 while( $result1 = mysql_fetch_object($query) ){ This is the entire code function putGrid($pageid){ global $_GRID_FRAMES_TABLE, $_GRID_TABLE, $_GRID_CROSS_GRID_FRAMES_TABLE, $_GRID_CROSS_PAGES_TABLE, $_HTTP_ADDRESS; $i=0; $cpt = 1; $str = ''; $whichCount = 1; $query = mysql_query("SELECT * FROM $_GRID_TABLE WHERE id_page='$pageid'"); //return mysql_num_rows($query) or mysql_error(); //return $query; $combineArr = mysql_num_rows($query); while( $result1 = mysql_fetch_object($query) ){ if($whichCount == 1){ $gridClass="grid-active"; $style = "position: absolute; left:0%; top:0; width:100%;"; }else{ $gridClass="grid-inactive"; $style = "position: absolute; left:-100%; top:0; width:100%;"; } if($whichCount == 1){ $str.='<div id="grid-slide'.$i.'" class="grid-slide '.$gridClass.'" style="'.$style.'">'; $str.= '<div class="grid-slide-inner">'; $str.= '<div class="grid-banner-content grid-banner-left">'; $str.= '<div class="grid-banner-header">'; $str.= '</div>'; $str.= '<div class="grid-banner-copy">'; $str.= '<ul id="gallery">'; } $str.= '<li>'; $str.= '<img src="'.$_HTTP_ADDRESS.'products_images/'.$result->image.'">'; $str.= '<span>'; $str.= '<h3>'.$result->name.'</h3>'; $str.= $result->description; $str.= '</span>'; $str.= '</li>'; if($whichCount % 9 == 0 && $whichCount < $combineArr){ $i++; $str.= '</ul>'; $str.= '</div>'; $str.= '</div>'; $str.= '</div>'; $str.='</div>'; $str.='<div id="grid-slide'.$i.'" class="grid-slide '.$gridClass.'" style="'.$style.'">'; $str.= '<div class="grid-slide-inner">'; $str.= '<div class="grid-banner-content grid-banner-left">'; $str.= '<div class="grid-banner-header">'; $str.= '</div>'; $str.= '<div class="grid-banner-copy">'; $str.= '<ul id="gallery">'; } if($whichCount == $combineArr){ $str.= '</ul>'; $str.= '</div>'; $str.= '</div>'; $str.= '</div>'; $str.='</div>'; } $whichCount++; $cpt++; } return $str; }
  9. Hi I'm trying to create a site where there is a picture on the left side and on the right is a menu that opens up vertically and content beneeth it. The content has to be in a box that can scroll up or down to view the content. I did user overflow but for some reason it's not working. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link rel="stylesheet" href="css/styles.css"/> <script src="js/jquery-1.10.2.min.js"></script> <script src="js/jquery-migrate-1.2.1.js"></script> <script src="js/main.js"></script> </head> <body> <div class="container"> <div class="logos1"> logos </div> <div class="bigm"><img src="images/bigm.png" /> <div class="logo"> <img src="images/almamorah_logo.png" /> </div> <div class="verticalline"> <img src="images/vertical_line.png" /> </div> <div id="nav"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About Us</a> <ul> <li><a href="#">Vision & Mission</a> </li> <li><a href="#">Our Partner</a></li> <li><a href="#">Our Team</a></li> <li><a href="#">Our Customers</li> <li><a href="#">Suppliers & Manufacturers</li> </ul> </li> <li><a href="#">Services</a> <ul> <li><a href="#">Pharmaceutical Distribution</a></li> <li><a href="#">Logistics</a></li> <li><a href="#">Brand Custodianship</a></li> <li><a href="#">Operation Map</li> </ul> </li> <li><a href="#">Products</a> <ul> <li><a href="#">Pharmaceuticals</a></li> <li><a href="#">Medical Equipment</a></li> </ul> </li> <li><a href="#">Contact Us</a> </li> </ul> </div> <div class="content"> Delivering health, carefully. </div> <div class="content-box"> <!--<label>--> <div class="top-para">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam non ornare lacus. Nullam egestas nisi et lacinia interdum. Donec purus dui, mattis in odio id, pellentesque pulvinar tortor. In suscipit sollicitudin erat, et dapibus risus tristique eu. Vivamus a turpis facilisis arcu tempor vulputate eget quis nunc. Pellentesque sapien ipsum, pulvinar eget tortor dictum, tincidunt vulputate velit. Morbi in sem sed nibh congue vulputate in ut libero. Aliquam quis elit ut odio laoreet aliquam. Sed sed est purus. Integer tempus lectus in cursus pharetra. Vivamus pharetra bibendum ligula, in scelerisque eros sagittis sit amet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque consequat nunc et mattis fringilla.</div> <br /><br /> Cras viverra lorem eu neque porttitor auctor. Sed mattis sodales malesuada. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean ac egestas urna, ac hendrerit leo. Suspendisse consectetur rhoncus sollicitudin. Mauris a faucibus ligula, id aliquet nunc. Maecenas suscipit gravida lectus. Vestibulum bibendum eros justo, eu euismod dui vehicula et. Aliquam erat volutpat. Maecenas sodales lorem sed laoreet ultricies. Nulla lobortis erat purus, rhoncus malesuada felis posuere vitae. <!-- </label>--> </div> <div class="logos2"> logos 2 </div> </div> and this is the css body{ } .container{ width:976px; margin:0 auto; height:672px; } .bigm{ align: left; } .logo{ text-align: right; margin-top: -400px; margin-left: 550px; position:relative; width: 178px; height: 145px; } #nav{ text-align:left; margin-top:-112px; margin-left:790px; } .verticalline{ margin-right: 200px; margin-top: -132px; text-align: right; } .content{ margin-left: 550px; margin-top: 50px; padding-bottom: 13px; } .content-box{ border-bottom-color: #F6F6F6; border-bottom-style: groove; border-top-color: #F6F6F6; border-top-style: ridge; display: block; height: 26%; margin-left: 550px; overflow: auto; width: 40%; } .top-para{ color: #fec604; } #nav ul, #nav ul li{ margin:0; padding:0; list-style:none; } #nav ul li{ border-bottom:solid 1px white; width:150px; cursor:pointer; } #nav ul li:hover{ background-color:#6679e9; position:relative; } #nav ul li a{ color:#000000; display:inline-block; text-decoration:none; } #nav ul li ul{ position:absolute; display:none; } #nav ul li:hover ul{ left:150px; top:0px; display:block; } #nav ul li ul li{ background-color:#cae25a; } #nav ul li:hover ul li:hover{ background-color:#b1b536; } #nav ul li ul li a{ color:#454444; display:inline-block; width:120px; }
  10. Hi I'm using wordpress and I want to create a link that will use the slug of an item from the database. For example if the user clicks on view of an item, then the link must direct the user to a page that will have more information of the item. I have this <?php global $wpdb; $bras = $wpdb->get_results("SELECT * FROM bras;"); ?> [/size][/font][/color] <table> <?php foreach($bras as $bra): ?> <td><?php echo $bra->title ?><br /> <img src="<?php echo bloginfo('template_directory').'/img/'.$bra->filename; ?>" /><br /> <?php echo $bra->content ?><br /> <?php echo $bra->price ?><br /> <a href="#" />View</a> <?php endforeach; ?> </td> </table> and then the user will click view and then get directed to bras_view which will then give the information of the item,
  11. I have managed to select my data with a loop and now the only problem I have is that my image doesn't want to work. I only get a little box with a torn edge. This is my code <?php global $wpdb; $flowers = $wpdb->get_results("SELECT * FROM flowers;"); ?> <table> <?php foreach($flowers as $flower): ?> <td><?php echo $flower->title ?><br /> <img src="<?php echo $flower->filename; ?>" /><br /> <?php echo $flower->content ?><br /> <?php endforeach; ?> </td> </table>
  12. Hi I'm using wordpress 3.4.2 Is there a way to insert images into a certain table through wordpress with out using the media library and is there a way to select images and put them on a page. for example I have a table named flowers and a table named herbs and I want to be able to put all the flowers on the flowers page and all the herbs on the herbs page. I know that in wordpress you can use <?php $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM flowers ORDER BY name", $pattern) ); ?> to call all the flowers but I don't know where I would put it.
  13. cerberus478

    Nav Bar

    I'm using wordpress 3.4.2, I'm trying to create a nav bar using css3 but it isn't working and I don't know where I went wrong. What I mean by it itsn't working is that the nav bar is not showing up, the links are there but there is no css3 style for the nav bar. this is my style.css /* Theme Name: Voluptuous Decadents Theme URI: //www.voluptuous_decadents.co.za Description: An awesome theme for voluptuous decadents Author: Nicole Version: 1.0 */[/size][/font][/color] body{ font-family: Arial, Helvetica, Georgia, Sans-serif; font-size: 12px; background: #b6b6b6; color: #000000 } a:link, a:visited{ text-decoration: none; color: #000000; } a:hover{ color: #5f5f5f; } h1{ font-size: 54px; } h3{ font-size: 24px; } #wrapper{ margin: 0 auto; width: 750px; text-align: left; background: #fff; padding: 20px; } #header{ width: 750px; height: 100px; } #blog{ float: left; width: 520px; padding: 0 10px 10px 10px; } .sidebar{ float: left; width: 200px; margin: 0 0 0 10px; font-size: 14px; list-style: none; } #footer{ clear: both; text-align: center; height: 50px; background: #ccc; padding: 10px; } table#wp-calendar{ width: 100%; } /* JS disabled styles */ .no-js nav li:hover ul { display:block; } /* base nav styles */ nav { display:block; margin:0 auto 20px; border:1px solid #222; position:relative; background-color:#6a6a6a; font:16px Tahoma, Sans-serif; } nav ul { padding:0; margin:0; } nav li { position:relative; float:left; list-style-type:none; } nav ul:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } nav li a { display:block; padding:10px 20px; border-left:1px solid #999; border-right:1px solid #222; color:#eee; text-decoration:none; } nav li a:focus { outline:none; text-decoration:underline; } nav li:first-child a { border-left:none; } nav li.last a { border-right:none; } nav a span { display:block; float:right; margin-left:5px; } nav ul ul { display:none; width:100%; position:absolute; left:0; background:#6a6a6a; } nav ul ul li { float:none; } nav ul ul a { padding:5px 10px; border-left:none; border-right:none; font-size:14px; } nav ul ul a:hover { background-color:#555; } /* CSS3 */ .borderradius nav { -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; } .cssgradients nav { background-image:-moz-linear-gradient(0% 22px 90deg, #222, #999); background-image:-webkit-gradient(linear, 0% 0%, 0% 70%, from(#999), to(#222)); } .boxshadow.rgba nav { -moz-box-shadow:2px 2px 2px rgba(0,0,0,.75); -webkit-box-shadow:2px 2px 2px rgba(0,0,0,.75); box-shadow:2px 2px 2px rgba(0,0,0,.75); } .cssgradients nav li:hover { background-image:-moz-linear-gradient(0% 100px 90deg, #999, #222); background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#222), to(#555)); } .borderradius nav ul ul { -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; -webkit-border-bottom-left-radius:4px; -webkit-border-bottom-right-radius:4px; border-bottom-left-radius:4px; border-bottom-right-radius:4px; } .boxshadow.rgba nav ul ul { background-color:rgba(0,0,0,0.; -moz-box-shadow:2px 2px 2px rgba(0,0,0,.; -webkit-box-shadow:2px 2px 2px rgba(0,0,0,.; box-shadow:2px 2px 2px rgba(0,0,0,.; } .rgba nav ul ul li { border-left:1px solid rgba(0,0,0,0.1); border-right:1px solid rgba(0,0,0,0.1); } .rgba nav ul ul a:hover { background-color:rgba(85,85,85,.9); } .borderradius.rgba nav ul ul li.last { border-left:1px solid rgba(0,0,0,0.1); border-bottom:1px solid rgba(0,0,0,0.1); -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; -webkit-border-bottom-left-radius:4px; -webkit-border-bottom-right-radius:4px; border-bottom-left-radius:4px; border-bottom-right-radius:4px; } .csstransforms ul a span { -moz-transform:rotate(-180deg);-webkit-transform:rotate(-180deg); } /* fallbacks */ .no-cssgradients nav, .no-js nav { padding-bottom:4px; border:none; background:url(../fallback/navBG.gif) repeat-x 0 0; } .no-borderradius nav ul, .no-js nav ul { background:url(../fallback/navRight.gif) no-repeat 100% 0; } .no-borderradius nav ul ul, .no-js nav ul ul { background:none; } .no-borderradius nav li, .no-js nav li { height:44px; } .no-cssgradients nav li:hover, .no-js nav li:hover { background:url(../fallback/navOverBG.gif) repeat-x 0 0; } .no-borderradius nav li li, .no-js nav li li { height:auto; width:98%; left:-2px; } .no-borderradius nav li:first-child, .no-js nav li:first-child { background:url(../fallback/navLeft.gif) no-repeat 0 0; } .no-borderradius nav li:first-child:hover, .no-js nav li:first-child:hover { background:url(../fallback/navOverLeft.gif) no-repeat 0 0; } .no-borderradius nav li li:first-child, .no-js nav li li:first-child { background:none; } .no-rgba nav ul ul, .no-js nav ul ul { left:1px; padding-left:2px; background:url(../fallback/subnavBG.png) no-repeat 100% 100%; } .no-rgba nav ul ul a, .no-js nav ul ul a { left:3px; } .no-rgba nav ul ul a:hover { background:url(../fallback/subOverBG.png) repeat 0 0; } .no-csstransforms ul a span { height:7px; width:12px; margin-top:8px; text-indent:-5000px; overflow:hidden; background:url(../fallback/indicator.png) no-repeat 0 0; } .no-borderradius ul ul li.last { margin-bottom:10px; } .no-cssgradients.boxshadow nav { box-shadow:none; }
  14. I?m trying to send an email using codeigniter and gmail for some reason it doesn?t work and I have checked the coding and I have researched to make sure it was right and everything does look right so I don?t know what I?ve done wrong. When I use the $this->email->print_debugger() I get this error This is my main controller public function signup_validation() { $this->load->library('form_validation'); $this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email|is_unique[users.email]'); $this->form_validation->set_rules('password', 'Password', 'required|trim'); $this->form_validation->set_rules('cpassword', 'Confirm Password', 'required|trim|matches[password]'); $this->form_validation->set_message('is_unique', "That email address already exists"); if($this->form_validation->run()) { //generate random key $key = md5(uniqid()); $config = array( 'protocol' => 'smtp', 'mailtype' => 'html', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => 'something@gmail.com', 'smtp_pass' => 'something' ); $this->load->library('email', $config);//, $config);//, array('mailtype'=>'html')); $this->email->set_newline("\r\n"); $this->email->from('something@gmail.com', "Nicole"); $this->email->to($this->input->post('email')); $this->email->subject("Confirm your account"); $message = "<p>Thank you for signing up!</p>"; $message .= "<p><a href='".base_url()."main/register_user/$key'>Click here</a>to confirm your account</p>"; $this->email->message($message); if($this->email->send()) { echo "The email has been sent"; } else { echo "Could not send the email"; show_error($this->email->print_debugger()); } //send an email to the user //add them to the temp_users db } else { $this->load->view('signup'); } } and this is the signup view <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Signup Page</title> </head> <body> <div id="container"> <h1>Signup</h1> <?php echo form_open('main/signup_validation'); echo validation_errors(); echo "<p>Email"; echo form_input('email', $this->input->post('email')); echo "</p>"; echo "<p>Password"; echo form_password('password'); echo "</p>"; echo "<p>Confirm Password"; echo form_password('cpassword'); echo "</p>"; echo "<p>"; echo form_submit('signup_submit', 'Sign Up!'); echo "</p>"; echo form_close(); ?> </div> </body> </html>
×
×
  • 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.