Skip to main content

Posts

Difference between SVN and GIT

A summary of Differences: 1. Git branches carry entire history. 2. Git was designed  to be fully distributed from start, allowing each developer to have full control. 3. Git’s repositories are much smaller than SVN’s. 4. Git repository clones acts as full repository backup. 5. Git is much faster than SubVersion Git’s major features Over Subversion(SVN) Distributed Nature: In Git, every has complete copy of repository data stored locally, there by making access to file history is fast, as well as allowing full functionality when disconnected to network. If you have 10 users, then you will have 10 backups of repositories . If any repository is lost then only the changes which were unique to that repository is lost. In centralized SVN, Only have central repository has a complete history. This means that user must communicate over a network with central repository to obtain the history about the file. backup are maintained independently of...

Optimize Drupal 7

Hi, There can be a number of approaches u can think of. I am listing some of those based on my recent experinces :  1. Try to have minimum no of tpl files in your theme folder. We should avoide writing separate tpl for each type of content or node  2. Try to include internal css & js files on at the apprpriate location under speific hooks or so, sothat those don't get loaded unnecessarily  3. Try to make use of modules like cache_external_files to load external js files from ur local system and get it updated on cron run  4. Write ur code under best possible drupal way, I mean say , if we can have some code be working under page preprocess , we shouldn't write it in hook_init.  5. can take help of sites like http://gtmetrix.com/ , newrelic to check the site performance & follow the suggestions they provide  6. Combine images using CSS sprites  7. Leverage browser caching  8. Enable gzip comp...

Smart pagination or page break in Drupal 7(CK editor)

1. Install Smart Paging module   Go to Administration › Configuration › Administer Smart Paging settings.   Under 'Default page break method', select "Manual placement of page break placeholder". 2.  Install  'Ckeditor' Module   Go to Administration › Configuration > Ckediotr profiles > Filtered HTML   Edit the settings of the Advanced (Filtered HTML) Profile. Under 'Editor Appearance' section, In plugins check the required options like " Plugin for inserting a Drupal teaser and page breaks. ". 3.  Edit the configuration settings of input formats (Filtered HTML, Full HTML, Plain Text)   Go to Administration › Configuration > Text formats. Edit the required input format. For example say "Filtered HTML". Under  "Enabled filters" section, check the 'Smart Paging' option and uncheck all the remaining checkboxes. 4. Go to Content type 'article' and create new content. We will s...

To find broken links on a site?

There are literally a bazillion SEO tools on the internet (literally!), this post discusses just one such tool; Xenu's Link Sleuth. Many people in the SEO industry are already aware of this tool but many people I've spoken to only treat the tool as a broken link finder. It's so much more than that.  What is Xenu? Xenu's Link Sleuth  is a FREE download (everyone loves free) that runs on all versions of Windows (but not quite on Macs unfortunately). It's a lightweight download and I've never had issues with it crashing or hanging. In a nutshell it's a site crawler and once you point it at a URL it will crawl around the site and spit out a report at the end. Its main focus and branding is all about finding broken links on your site (so where you link internally to a 404 error) but I've found that I use it to solve a whole host of different SEO-related issues. Problem - How do I find broken links on my site? This is the most basic use of Xenu in my opin...

Getting content from xml url using php

step1:first declare a url: $url ="[url]"; step2: getting content for  url:   $results = file_get_contents($url);   ( Note: file_get_contents: which reads entire file into string) step3: Load a xml content into a variable: $xml = simplexml_load_string($results); (NOTE: simplexml_load_string: Interprets a string of XML into an object) then u get content by echo $xml->[tag_name];