Skip to main content

Posts

Showing posts from November 8, 2009

Finding your Joomla Template Positions

In Joomla there is a hidden core function which once activated displays a layer on a Joomla website which shows you exactly the template positions currently used. To activate this function you just need to add ?tp=1 to the end of your current Joomla address. As an example take a look at the following link: http://www.dart-creations.com?tp=1  As you can see, you can know see all the positions which are template makes use of. You can use this on any Joomla version, on any Joomla site and on any Joomla page (though you might need to use &tp=1). The following parameters can be used:  ?tp=1 (for horizontal view) ?tp=-1 (for no wrapper niew) ?tp=0 (for normal view - no view of positions)

Thumbnail creation from FLV using ffmpeg

seek to the middle of the file an output a JPEG   http://ffmpeg-php.sourceforge.net/   <?php  function GetFLVDuration($file){   // get contents of a file into a string   if(file_exists($file)){    $handle = fopen($file, "r");    $contents = fread($handle, filesize($file));    fclose($handle);       if(strlen($contents) > 3){     if(substr($contents,0 , 3) == "FLV"){      $taglen = hexdec(bin2hex(substr($contents, strlen($contents)-3)));      if(strlen($contents) > $taglen){       $duration = hexdec(bin2hex(substr($contents, strlen($contents) - $taglen, 3)));       return $duration;      }     }    }   }   return 0;  }    // get duration and divide by 2 to get middle  $duration = number_format((GetFLVDuration('output.flv') / 1000) / 2);    // check for error  if($duration<0){   $duration = 0;  }    //save out thumbnail  $output2 = exec('ffmpeg -y -i output.flv -r 1 -vframes 1 -sameq -f image2 -ss ' . $duration . ' -an output.

XAMPP Apache port change

1. Find httpd.conf file in the folder path  C:\xampp\apache\conf\  2. Open httpd.conf file in your text editor. 3.Find this line: Listen 80 change it to: Listen 8009 4.Save and restart Apache. http://locahost:8009  would now be your XAMPP default pages.

Convert html page to .aspx page

step 1 . Convert Html page into .aspx. for example you have index.html, open that with dreamweaver and save as index.aspx. step 2. open ASP.NET web site. put that file into that folder. step 3. After putting this, right click folder, you will sub menu that menu choose Add New Item. After that the new dialog box will be opend. then choose class file. if you use C#, change that name as index.aspx.cs and finally press OK. step 4. In that class file, change the following public partial class _index : System.Web.UI.age { } step 5. Now go to index.aspx, bottom of that page, there will be source, if your press that you will get html content step 6. Write the following coding at top of that source <%@ Page Language="C#" AutoEventWrireUp="true" CodeFile = "~/index.aspx.cs" Inherits="_index" %> step 7. Finally save that file and close entire web application. Step 8. Now you can open that web application Step 9. After openning, press F

Remove the Label – “This site may harm your computer” : malware

http://www.seobyelan.com/2008/06/this-site-may-harm-your-computer/ To make users feel safe when they search web, Google continuously working to identify dangerous sites and increase protection for their users. This warning message appears with search results which they identified as sites that may install malicious software on your computer: Below is the sample SERP displaying the warning message for a website. [I got this screenshot when google affected with this malware

What are CSS sprites?

CSS sprites are a way to reduce the number of HTTP requests made for image resources referenced by your site. Images are combined into one larger image at defined X and Y coorindates. Having assigned this generated image to relevant page elements the background-position CSS property can then be used to shift the visible area to the required component image. This technique can be very effective for improving site performance, particularly in situations where many small images, such as menu icons, are used. The Yahoo! home page , for example, employs the technique for exactly this Further Reading A List Apart published an article entitled CSS Sprites: Image Slicing's Kiss of Death which explains the concepts behind CSS sprites. If you're new to this technique we'd strongly suggest heading over to A List Apart and taking a look. http://www.tutorial9.net/web-tutorials/building-faster-websites-with-css-sprites/ http://spritegen.website-performance.org/section/what-are-c