Search Results

Search found 11930 results on 478 pages for 'media center'.

Page 105/478 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • Is it Secure to Grant Apache User Ownership of Directories & Files for Wordpress

    - by Oudin
    I'm currently setting up WordPress on an Ubuntu server 12 everything runs fine but there is an issue when it comes to automatically updating and uploading media via WP as Apache "www-data" user does not have permissions to write to the directories. "user1" has full permission All my directories have permissions of 0755 and files 644 my directories setup is as follows: /home/user1/public_html All WP files and directories are in "public_html" In order to work around the auto updating and uploading media I've granted Apache user ownership to the following directories sudo chown www-data:www-data wp-content -R sudo chown www-data:www-data wp-includes -R sudo chown www-data:www-data wp-admin -R I would like to know security wise how secure this is and if it is not secure what would be the best solution? That will allow me to keep all files and directories owned by user1 and still allow wp to be able to automatically update and uploading media

    Read the article

  • RewriteRule applying pattern even though 1 of the RewriteCond's failed

    - by BHare
    #www. domain . tld RewriteCond %{HTTP_HOST} (?:.*\.)?([^.]+)\.(?:[^.]+)$ RewriteCond /home/%1/ -d RewriteRule ^(.+) %{HTTP_HOST}$1 RewriteRule (?:.*\.)?([^.]+)\.(?:[^.]+)/media/(.*)$ /home/$1/client/media/$2 [L] RewriteRule (?:.*\.)?([^.]+)\.(?:[^.]+)/(.*)$ /home/$1/www/$2 [L] Here is rewritelog output: #(4) RewriteCond: input='tfnoo.mydomain.org' pattern='(?:.*\.)?([^.]+)\.(?:[^.]+)$' [NC] => matched #(4) RewriteCond: input='/home/mydomain/' pattern='-d' => not-matched #(3) applying pattern '(?:.*\.)?([^.]+)\.(?:[^.]+)/media/(.*)$' to uri 'http://www.mydomain.org/files/images/logo.png' #(3) applying pattern '(?:.*\.)?([^.]+)\.(?:[^.]+)/(.*)$' to uri 'http://www.mydomain.org/files/images/logo.png' #(2) rewrite 'http://www.mydomain.org/files/images/logo.png' -> '/home/mydomain/www/logo.png' If you note on the 2nd 4 it failed the -d (if directory exists) pattern. Which is correct. mydomain does not have a /home/. Therefore it should never rewrite, atleast according to my understanding that all rewriterules are subject to rewriteconds as logical ANDs.

    Read the article

  • align h1 before and after background

    - by renathy
    I have image before and after h1. However, I need to position it as following: h1 text should be in the center h1 before image should start at the left side of container h1 after image should end at the right side of container I cannot get all of them. For example, I can center h1 text, but then h1 before and h1 after images are not aligned correctly. Here is jsfiddle example: http://jsfiddle.net/wK8ve/ Also Html and css here: CSS: .test { border: 1px solid black; width: 1000px; height: 200px; } h1 { text-align: center; font-size: 22px; font-weight: bold; color: #5d5d5d; margin: 0 0 32px 0; } h1:before { text-align: left; background-image: url('http://modeles-de-lettres.org/test/images/h_ltr.png'); background-repeat: no-repeat; background-position: center left; padding: 0 352px 0 0; content: "\00a0"; } h1:after { background-image: url('http://modeles-de-lettres.org/test/images/h_rtl.png'); background-repeat: no-repeat; background-position: center right; padding: 0 180px; content: "\00a0"; } HTML: <div class="test"> <h1>Test</h1> </div> And here is live example: http://modeles-de-lettres.org/test/index.php?p=about_us

    Read the article

  • Can a switch consume bandwidth?

    - by aashiq
    I have a network with a router and a switch. At first my ISP's optical fiber is connected with media converter input port. Than Ethernet cable (output port of Media converter) is connected with the switch. Then an output Ethernet cable is connected with our inner Microtik router. Then this router is connected with another LAN switch. From this switch we have got every connection other switch. It is our total network structure. Our bandwidth is 2 Mbps. From the 11th of March our MRTG graph shows high all the time even when my all switch is switched off except LAN switch. That's why our line is breaking up (Voice call). How could be it possible? My all PC's bandwidth is limited but when connected PC with media converter directly then the graph shows normal. That's why I can't blame my ISP.

    Read the article

  • backing up ntfs disk using rsync on ubuntu

    - by user70366
    For a long time I was using windows. I have a separate drive I use to keep copies of my media files, photos etc. on, which I periodically backup to an external drive. In Windows I used SyncToy to do this. After my Windows stopped booting, I decided to switch to Linux (Ubuntu 10.10). That seems to be going fine, but now I want to backup my drive to the external drive like before. Mostly the two drives will be already the same with maybe about 10GB of extra files added. So I try to use rsync to synchronise the two drives like this: rsync --dry-run -rvlt --modify-window=1 /media/Antonio1TB/Backup /media/FREECOM\ HDD/Backup The problem is the dry run indicates that every file on the drive will be copied. Not just the files I have recently added. What is the correct command to synch two NTFS drives under Ubuntu so that files that already exist don't get copied again? Thanks.

    Read the article

  • Vertically and horizontally align

    - by user1760649
    My problem is the following: I've vertically centered a div. However, I'd like to center another div horizontally. The problem is that I don't manage to center it horizontally. Here are my (X)HTML and CSS (X)HTML: <body> <div id="strut"></div> <div id="page"> <div id="inner_page"> <h1>Galidie "jQzz" Clément</h1> </div> </div> CSS: html, body { margin: 0; padding: 0; height: 100%; } #strut, #page { display: inline-block; vertical-align: middle; } #strut { height: 100%; } #page { border: 1px solid #c00; } #inner_page { width: 750px; margin: 0 auto; background-color: #c00; } h1 { text-align: center; margin: 0; } strut is the marker for vertically center an element. page is centered vertically. The idea is to try to center horizontally the inner_page block. Should I use absolute position? Or anything else? Did I choose the good method? Thank for your futur help.

    Read the article

  • Layout issue regarding a JQuery smoothDivScroll

    - by MichaelMcCabe
    Hi all. I have been scratching my head for a while on this one. I dont really play around with HTML formatting that often. I have a smoothDivScroll using JQuery (http://maaki.com/thomas/SmoothDivScroll/) to scroll through dynamically generated images. What I want it for, is to have multiple small images lined up right next to each other, and each image has a section of writting underneath. about 25 images, 140px width each in a 7560px span. I acheived this great by putting a table inside the div, and each image inside a<td>.This works problem i have, is that i need the slider to start from the furthest RIGHT image, and slide automatically left. This is acheived by (if you look at the link above) - startAtElementId: But if I am using a table inside the div, it is taking the TABLE as a element and not the TD... so it doesnt work. I know this because if I change every image to be inside tables (i.e 25 tables), it works... but obviously then the formatting is not how I want. Can anyone think of a way I can use this slider (modifications to the js code or not), with 25 images that NEED to be right next to each other, no gap. I guess this is more of a formatting question, than about the slider. Because I only know ONE way of doing what I want, and thats to have below which will not alow me to set startAtElementId. <div class="scrollableArea"> <table width="7560px" class="index-body"> <tr> <td width="140px"><center><a onclick="__doPostBack('getEarlierDate');" ><img src="../images/olderGraphs.gif" width="140" height="60"></a>Click for more</center></td> <td width="300px"><center><a onclick="__doPostBack('chartClicked25');" ><cewolf:img chartid="verticalbar25" renderer="cewolf" width="300" height="60"/></a><c:out value="${date25}"/></center></td> <td width="300px"><center><a onclick="__doPostBack('chartClicked24');" ><cewolf:img chartid="verticalbar24" renderer="cewolf" width="300" height="60"/></a><c:out value="${date24}"/></center></td> and so on

    Read the article

  • How can I share data from a Samsung Wave Mobile phone with the Mac OS?

    - by M. Bedi
    This is driving me up the wall just a bit. I have a new Samsung Wave mobile phone. It is running the Bada OS. The mobile phone does not come with anyone software for the Mac. The Kies desktop interface is only available for Windows. I did try installing the Kies software in a VM with Parallels 5 but it did not detect the phone connected via USB. I tried using Bluetooth file exchange on the Mac; it lets me browse the file system on the Wave phone but not actually see any of the media files; I just get empty directory views. But I am able to access files using media sharing with the Wave phone and my PS3. So what would be a Mac desks top app that can be used a media sharing browser?

    Read the article

  • if isset PHP not working?

    - by Ellie
    Okay, Im trying to set a captcha up, However with this code in, it breaks. if(isset($_POST["captcha"])) if($_SESSION["captcha"]==$_POST["captcha"]) When i do it with out it, the page works, but the captcha is letting incorrect submits through. Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/waloraweb085/b2027/moo.lutarinet/jointest.php on line 71 <?php $pagetitle = "Home"; $checkrank = 0; include ($_SERVER['DOCUMENT_ROOT'].'/header.inc.php'); ECHO <<<END <br><br> <b><center><i><u>DO NOT</u> USE YOUR NEOPETS PASSWORD OR PIN NUMBER!!!</b></i></center> <p> ?> <?php session_start() ?> <center><P><FORM ACTION="join.pro.php" enctype="multipart/form-data" METHOD=POST> <table width="393" height="188" border="0" cellpadding="0" cellspacing="0"> <td width="150">Username</td> <td width="243"><input type=text name="name" value="" size=32 maxlength=15></td> </tr> <tr> <td>Password</td> <td><input type=password name="pass1" VALUE="" maxlength=15></td> </tr> <tr> <td>Confirm Password</td> <td><input type=password name="pass2" VALUE="" size=32 maxlength=15></td> </tr> <tr> <td>Security Code (4 Diget Number)</td> <td><input type=password name="security" VALUE="" size=32 maxlength=4></td> </tr> <tr> <td>Email Address</td> <td><INPUT TYPE=text NAME="email" VALUE="" SIZE=32 maxlength=100></td> </tr> <tr> <td height="41" colspan="2" valign="middle"><p><p><center> By registering an account here you agree to all of our <A HREF="$baseurl/tos.php">Terms and Conditions</A>. You can also view our <A HREF="$baseurl/privacy.php">Privacy Policy</A>. </center></p></td> </tr> <tr><td align="center">CAPTCHA:<br> (antispam code, 3 black symbols)<br> <table><tr><td><img src="captcha.php" alt="captcha image"></td><td><input type="text" name="captcha" size="3" maxlength="3"></td></tr></table> </td></tr> <td height="27" colspan="2" valign="middle"> <center><input type=submit name=Submit value="Register"></center> </td> </table> </form> <?php if(isset($_POST["captcha"])) if($_SESSION["captcha"]==$_POST["captcha"]) { //CAPTHCA is valid; proceed the message: save to database, send by e-mail ... echo 'CAPTHCA is valid; proceed the message'; } else { echo 'CAPTHCA is not valid; ignore submission'; } ?> <?php END; include ($_SERVER['DOCUMENT_ROOT'].'/footer.inc.php'); ?> captcha.php <?php session_start(); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); function _generateRandom($length=6) { $_rand_src = array( array(48,57) //digits , array(97,122) //lowercase chars // , array(65,90) //uppercase chars ); srand ((double) microtime() * 1000000); $random_string = ""; for($i=0;$i<$length;$i++){ $i1=rand(0,sizeof($_rand_src)-1); $random_string .= chr(rand($_rand_src[$i1][0],$_rand_src[$i1][1])); } return $random_string; } $im = @imagecreatefromjpeg("http://sketchedneo.com/images/sitedesigns/captcha.jpg"); $rand = _generateRandom(3); $_SESSION['captcha'] = $rand; ImageString($im, 5, 2, 2, $rand[0]." ".$rand[1]." ".$rand[2]." ", ImageColorAllocate ($im, 0, 0, 0)); $rand = _generateRandom(3); ImageString($im, 5, 2, 2, " ".$rand[0]." ".$rand[1]." ".$rand[2], ImageColorAllocate ($im, 255, 0, 0)); Header ('Content-type: image/jpeg'); imagejpeg($im,NULL,100); ImageDestroy($im); ?> Help please anyone? Line 71: if(isset($_POST["captcha"])) Line 72: if($_SESSION["captcha"]==$_POST["captcha"])

    Read the article

  • RichFaces Toolbargroup centering a group

    - by Jeremiah
    Hello there I am trying use a toolbar so that it has three parts part A is aligned left part B is aligned Center part C is aligned right both the right and left i can use the location attribute ... but since there is no center attribute i am not able to center part b. I can use a rich:spacer but this makes the toolbar rigid and when the screen size is reduced the toolbar gets overlapped ... is there any i can center this without the toolbar getting over lapped. Any suggestions or workarounds is welcome cheers

    Read the article

  • Displaying a collection of controls in a specific way in WPF

    - by Alvaro
    I have a collection of controls "MyCollection" wich changes in the Runtime. And I have to follow some constraints for that, for example: If my parameter "MyCollection.Count = 4" the property "NumberOfcolumns" will have the value 2, in order to create new Lines, and show the controls Two per Two. This is how I'm displaying my collection : <ItemsControl ItemsSource="{Binding MyCollection}" BorderThickness="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate > <UniformGrid Columns="{Binding NumberOfColumns}" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> The problem is that my controls have different sizes, and as In UniformGrids, Cells are uniform... My design is not really pretty, because I have little controls shown in big Cells !! Can someone help me to solve this problem ? NB: Please give me a detailled solution if possible, not something like : "Use WrapPanel..."

    Read the article

  • Optimally place a pie slice in a rectangle.

    - by Lisa
    Given a rectangle (w, h) and a pie slice with start angle and end angle, how can I place the slice optimally in the rectangle so that it fills the room best (from an optical point of view, not mathematically speaking)? I'm currently placing the pie slice's center in the center of the rectangle and use the half of the smaller of both rectangle sides as the radius. This leaves plenty of room for certain configurations. Examples to make clear what I'm after, based on the precondition that the slice is drawn like a unit circle: A start angle of 0 and an end angle of PI would lead to a filled lower half of the rectangle and an empty upper half. A good solution here would be to move the center up by 1/4*h. A start angle of 0 and an end angle of PI/2 would lead to a filled bottom right quarter of the rectangle. A good solution here would be to move the center point to the top left of the rectangle and to set the radius to the smaller of both rectangle sides. This is fairly easy for the cases I've sketched but it becomes complicated when the start and end angles are arbitrary. I am searching for an algorithm which determines center of the slice and radius in a way that fills the rectangle best. Pseudo code would be great since I'm not a big mathematician.

    Read the article

  • Find the centroid of a polygon with weighted vertices

    - by Calle Kabo
    Hi, I know how to find the centroid (center of mass) of a regular polygon. This assumes that every part of the polygon weighs the same. But how do I calculate the centroid of a weightless polygon (made from aerogel perhaps :), where each vertex has a weight? Simplified illustration of what I mean using straight line: 5kg-----------------5kg ^center of gravity 10kg---------------5kg ^center of gravity offset du to weight of vertices Of course, I know how to calculate the center of gravity on a straight line with weighted vertices, but how do I do it on a polygon with weighted vertices? Thanks for your time!

    Read the article

  • Using Shell32 to extract Mimes on Windows Server 2008

    - by Léon Pelletier
    In a desktop app, I'm using Shell32 to extract Mime infos and ID3 tags. I want to do the same in ASP.Net on server side with http posted files, plus fetch some other infos, but as a Windows Server 2008, there are not several media applications installed, so I wonder if it will still retrieve a lot of informations from the files. Will it be possible to do it from server side? If yes, will it fetch several Mimes without media app installed. If not, is there some Mime pack to get some file informations without the app being installed. [EDIT] I installed VLC player and Windows Media Player on the server, which provide all MP3s / movies infos (Duration, Artist, Album, Width, Height, etc.), but I don't know if this is a good practice.

    Read the article

  • UIView animation problem

    - by FoJjen
    I try to make a UIImageView open like a hatch, and under the "hatchView" its anoter imageView but when I start the animation its like the view under gets over and cover the animation, When the animation gets over the imageView the its getting visibel. its works fine if a remove the imageView thats under. Here is the code for animation view. - (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *) event { if (!isHatchOpen) { if (hatchView.layer.anchorPoint.x != 0.0f) { hatchView.layer.anchorPoint = CGPointMake(0.0f, 0.5f); hatchView.center = CGPointMake(hatchView.center.x - hatchView.bounds.size.width/2.0f, hatchView.center.y); } UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:hatchView]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationBeginsFromCurrentState:YES]; float pct = location.x / 320.0f; float rad = acosf(pct); CATransform3D transform = CATransform3DMakeRotation(-rad+5, 0.0f, -1.0f, 0.0f); transform.m14 = (1.0 / -2000) * acosf(pct); hatchView.layer.transform = transform; [UIView commitAnimations]; isHatchOpen = YES; } else { if (hatchView.layer.anchorPoint.x != 0.0f) { hatchView.layer.anchorPoint = CGPointMake(0.0f, 0.5f); hatchView.center = CGPointMake(hatchView.center.x - hatchView.bounds.size.width/2.0f, hatchView.center.y); } [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationBeginsFromCurrentState:YES]; CATransform3D transform = CATransform3DMakeRotation(0, 0.0f, -1.0f, 0.0f); transform.m14 = 0; hatchView.layer.transform = transform; // Commit the changes [UIView commitAnimations]; isHatchOpen = NO; } } And here a add the Views hatchView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 1, frame.size.width-1, frame.size.height-2)]; [self addSubview:hatchView]; imageView = [[UIImageView alloc] initWithFrame:CGRectMake(1, 1, frame.size.width-2, frame.size.height-2)]; imageView.contentMode = UIViewContentModeScaleAspectFit; [self insertSubview:imageView belowSubview:hatchView];

    Read the article

  • CSS with Aligned LI within a UL

    - by Alex
    I am trying to have some LIs within a UL align left, right, and center within a page. For the life of me, I can't figure out how to keep something "centered" on the same line as a left and right aligned LI. <style> ul { margin:1em 0; padding:0 } ul li{ display:inline-block; white-space:nowrap; margin:5px } ul li.left{ float: left; text-align:left; } ul li.center{ float:left; text-align: center; } ul li.right{ float: right; text-align:right; } </style> <ul> <li class="left">left</li> <li class="center">center</li> <li class="right">right</li> </ul> <ul> <li class="left">left</li> <li class="right">right</li> </ul> <ul> <li class="left">left</li> </ul> Can anyone help? BTW, I've trying to avoid DIVs. Thanks!

    Read the article

  • How can I stream video from my XP sp3 desktop to my win 7 laptop?

    - by Robb
    I would like to stream media from my XP sp3 desktop to my Win7 laptop. I currently have Windows Media Player 11 on both machines. The XP one is set up for the media sharing service as far as I can tell. I have also set the 'Play To' option to my Win 7 machine on the XP WMP. However, the only way I've been able to 'stream' is to simply tell my Win7 WMP to add a network folder to its libraries. This seems to work over the wifi but it does stutter a touch, even with a 20 second buffer. The stuttering also appears randomly, maybe 4-5 times during a 22 minute show. I feel like I'm doing something wrong. Is this setup OK or am I missing something?

    Read the article

  • php database image show problem

    - by Termedi
    here is the code <?php session_start(); if(!isset($_SESSION['user_name'])) { header('Location: login.php'); } $conn = mysql_connect("localhost", "root", "") or die("Can no connect to Database Server"); ?> <html> <head> </head> <body> <center> <div id="ser"> <form action="" method="post"> <label for="file">Card No:</label> <input type="text" name="card_no" id="card_no" class="fil" onKeyUp="CardNoLength()" onKeyDown="CardNoLength()" onKeyPress="CardNoLength()"/> <input type="submit" name="search" value="Search" class="btn" onClick="return CardNoLengthMIN()"/> </form> </div> </center> <br/><hr style="border: 1px solid #606060 ;" /> <center><a href="index.php">Home</a></center> <br/> <center> <?php if(isset($_POST['card_no'])) { if($conn) { if(mysql_select_db("img_mgmt", $conn)) { $sql = "select * from temp_images where card_no='".trim($_POST['card_no'])."'"; $result = mysql_query($sql); $image = mysql_fetch_array($result); if(isset($image['card_no'])) { //echo "<img src=\"".$image['file_path']."\" alt=\"".$image['card_no']."\" width=\"250\" height=\"280\"/>"; header("Content-type: image/jpeg"); echo $image['img_content']; } else { echo "<p style=\"color:red;\">Sorry, Your search came with no results ! <br/> Try with different card number"; } } else { echo "Database selection error: ".mysql_error(); } } else { echo "Could not connect: ".mysql_error(); } } ?> </center> </body> </html> But it after executing the script it shows: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\img\search.php:61) in C:\xampp\htdocs\img\search.php on line 77

    Read the article

  • xl create doesn't bring up console

    - by ineff
    I've tryed to run VM in Xen 4.2 using xl command (for what I get this should be standard toolstack, while xm is deprecated). In this case I've the following configuration file kernel = '/media/home_separata/domU_kernel/boot/vmlinuz-linux' ramdisk = '/media/home_separata/domU_kernel/boot/initramfs-linux.img' name = "domU_Arch_linux" memory = "512" root = '/dev/xvda1 ro' disk = ['file:/media/home_separata/domU_kernel/arch_linux_kernel.img,xvda1,w'] vif = ['mac=aa:::10:11:f1,ip=192.168.0.2,bridge=xenbr0'] when I try to start the virtual machine with xl create it seems it works (it also bring up the vif interfaces) but if I try to connect via xl console it gives an error: xenconsole: Could not read tty from store: No such file or directory the fun fact is that the I've the problem inverse using xend/xm (in that case xend doesn't bring up vif interfaces but activate console). Does anyone have any suggestion?

    Read the article

  • shop by brand name in magento

    - by Jyotiranjan
    This is brand.php file having directory local/Vilpjsc/brand/Block.I want the brand name with logo(image) sholud display on home page .But I am getting the error i.e Fatal error: Call to a member function getCollection() on a non-object in /var/www/magentodemo/app/code/local/Vilpjsc/Brand/Block/Brand.php on line 25 <?php class Vilpjsc_Brand_Block_Brand extends Mage_Core_Block_Template { public function _prepareLayout() { return parent::_prepareLayout(); } //Get Collection from Brand Controller public function getBrand() { if (!$this->hasData('brand')) { $this->setData('brand', Mage::registry('brand')); } return $this->getData('brand'); } //Get Brand Featured Collection public function getFeaturedBrand() { return $this->getBrand()->getCollection()->setPageSize(12)->addFilter('status', '1'); } public function resizeImage($img,$width=100, $height=60) { if (!file_exists("./media/brand/resized")) mkdir("./media/brand/resized", 0777); $imageResized = Mage::getBaseDir('media') . DS . "brand" . DS . "resized" . DS . $width."x".$height.$img; if (!file_exists($imageResized) && file_exists("./media/brand/" . $img)) { $imageObj = new Varien_Image("./media/brand/" . $img); $imageObj->constrainOnly(TRUE); $imageObj->keepAspectRatio(TRUE); $imageObj->keepFrame(FALSE); $imageObj->resize($width, $height); $imageObj->save($imageResized); } $newImageUrl = Mage::getBaseUrl('media')."brand/resized/".$width."x".$height.$img; return $newImageUrl; } public function getNormalBrand() { return $this->getBrand()->getCollection()->addFilter('status', '0'); } public function getBrandChar() { extract($this->getBrandKey()); return $this->getBrand()->getCollection()->saveBrandcollection($char); } //Create Alphabet navigation public function navigation() { extract($this->getBrandKey()); $alphas = range('A', 'Z'); $navigation = ""; $digitClass = ""; foreach ($alphas as $key) { if ($char == $key) $class_key = "current_char"; else $class_key=""; $navigation .= "<li class='key_item " . $class_key . "'><a href='" . Mage::getBaseUrl() . "brand/index/index/brand_key/" . $key . "'>" . $key . "</a></li>"; } if ($char == "digit") { $digitClass = "current_char"; } elseif ($char == "all") $allClass = "current_char"; $navigation = "<li class='key_item " . $digitClass . "'><a href='" . Mage::getBaseUrl() . "brand/index/index/brand_key/digit'>#</a></li>" . $navigation; return $navigation; } //Get request for brand block public function getBrandKey() { $brand_key = Mage::registry('brand_key'); if ($brand_key) { $char = $brand_key->getParam('brand_key') ? $brand_key->getParam('brand_key') : 'A'; $option_id = $brand_key->getParam('option_id') ? $brand_key->getParam('option_id') : '1'; $brand = $brand_key->getParam('brand') ? $brand_key->getParam('brand') : 'Nike'; } else { $char = 'digit'; $option_id = '544'; } return compact('char', 'option_id', 'brand'); } }

    Read the article

  • PHP - WideImage class cropping

    - by Kolind
    I am trying to crop a large image to make thumbnails. But I can't get WideImage to save the file. I've tried the following: 1st method: $img = WideImage::load('../files/' . $file_name)->crop('center', 'center', 200, 200); $img->saveToFile('../files/thumb/thumb_' . $file_name); 2nd method: $img = WideImage::load('../files/' . $file_name)->crop('center', 'center', 200, 200); $img->copy('../files/thumb/thumb_' . $file_name); But nothing seems to happen, when I am performing any of these methods. I am getting no errors and no thumbnails. Am I doing something wrong here?

    Read the article

  • $("body").scrollTop() doesn't update in safari

    - by Kristoffer Nolgren
    I'm working on a website: http://beta.projektopia.se/ the body has several background-images that are updated on scroll like this: $(document).ready(function(){ $(document).scroll(function(){ var scrollfactor=$("body").scrollTop()*0.2; var centerscrollpos =scrollfactor+613; var docheight = $(document).height(); var windowheight = $(window).height(); var bottompos = (docheight-980)-((docheight-windowheight)*0.2)+scrollfactor; var scrollpos = 'center '+scrollfactor+'px,center '+bottompos+'px, center '+ centerscrollpos+'px,center 0px'; $("body").css("background-position", scrollpos); }); }); Lots of calculations, but the important thing is that a scrollpos is created that should change the position of the background when you scroll, to create a parallax-effect. It works great in chrome, but in firefox, the variable scrollfactor, that is suppose to get the current scroll-position, doesn't update. ps, some people have this issue due to lack of correct doctype. I believe i have declared it correctly like this: <!DOCTYPE html>

    Read the article

  • multi divs centered

    - by user1319385
    I have 2 divs with 3 divs inside them, all 2 wrapped around one big div. I try and center it and its not working. Here is my code: <div stye="margin-left:auto; margin-right:auto; width: 1210px;"> <div id="left" style=" float:left; width: 606px; height: 506px;"> <div style="top:0px; float:left; width:300px; border: 2px solid #FF0; height:502px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A picture of a cool guy wearing our shirt will go in here.</h1></div> <div style="top:0px; float:left; width:300px; border: 2px solid #FF0; border-left:0px; height:200px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A product image will go in here.</h1></div> <div style="top:0px; float:left; width:300px; border: 2px solid #FF0;border-top:0px; border-left:0px; height:300px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A tight product image will go in here.</h1></div> </div> <div id="left" style="float:left; width: 604px; height: 506px;"> <div style="top:0px; float:right; width:300px; border: 2px solid #FF0; border-left:0px; height:502px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A picture of a cool guy wearing our shirt will go in here.</h1></div> <div style="top:0px; float:left; width:300px; border: 2px solid #FF0; border-left:0px; height:200px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A product image will go in here.</h1></div> <div style="top:0px; float:left; width:300px; border: 2px solid #FF0;border-top:0px; border-left:0px; height:300px; text-align:center; font-family: Myriad Pro, Arial, sans-serif; color:#FFF;"><h1>A tight product image will go in here.</h1></div> </div> </div>

    Read the article

  • In Windows 8.1, how can I configure File History to backup *some* of my SkyDrive folders?

    - by Matthew
    I want File History to back up all of the folders in my SkyDrive except for the media folders (Music, Pictures, Videos, Podcasts). My media folders are "available online only", the rest of "available offline". Right now File History does not back up any of the content in my SkyDrive, and I can't seem to find a way to configure which folders it backs up. I found some sources that say if my SkyDrive is available offline, it will be added to File History. But I don't want to make my entire SkyDrive available offline, just the non-media folders.

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >