Skip to main content

Posts

Showing posts with the label solution

Difference between session.gc_maxlifetime and session.cookie_lifetime in Drupal setting.php

ini_set('session.gc_maxlifetime', 200000); This value is for the server. It is a settings for Session Garbage Collection. If the users last visit happened before 200000s then this session is eligible for garbage collection. Since it is GC, the session value may be discarded and not compulsory. If a GC action happens after the session was made eligible for the GC, it will be deleted. ini_set ( 'session.cookie_lifetime' , 2000000 ); This value is for the browser. This is the absolute maximum time till which a browser can keep this cookie active. A 0 value here means immediate or when the browser is closed. Source: 

Fatal error: Call to undefined function db_fetch_object in Drupal 7

db_fetch_object no longer in Drupal 7 Now its completely new database API has been added Drupal 7 introduces a completely new database API, utilizing a number of dynamic query builders and formal prepared statements. The following Drupal 6 functions and hooks were removed: db_affected_rows ( ), db_distinct_field ( ), db_error ( ),  db_last_insert_id ( ), db_placeholders ( ), db_lock_table ( ),  db_prefix_tables ( ), db_result ( ),  db_fetch_* ( ), db_version ( ), db_rewrite_sql ( ),  hook_db_rewrite_sql ( ), pager_query ( ), tablesort_sql ( ), and others. For full information, read the Database API guide.

Set the default language in Notepad++

I am showing this for the PHP language. In Notepad++   Click on Settings -> Preferences   Click on the New Document tab   Change the Default Language to PHP See below inage   To add an extension to load PHP editor for different extensions.   Click on Settings -> Style Configurator   In Language scroll down to PHP and click it.   In below it will show default ext.     Add your extensions at user exit. (Don't need '.').       eg:  inc install module   Click on Save & Close See below image for reference.

Files that Drupal Themes Use

A drupal theme is a collection of files that define the presentation layer. You can also create one or more "sub-themes" or variations on a drupal theme. Only the .info file is required, but most themes and sub-themes will use other files as well. The following diagram illustrates the files that are found in a typical drupal theme and sub-theme. Drupal 6: Drupal 7: .info   (required) All that is required for Drupal to see your theme is a ".info" file. Should the theme require them, meta data, style sheets ,  JavaScripts ,  block regions  and more can be defined here. Everything else is optional in drupal theme. The internal name of the theme is also derived from this file. For example, if it is named "drop.info", then Drupal will see the name of the theme as "drop".  Drupal 5 and below used the name of the enclosing folder of the theme. Info files for themes are new in Drupal 6. In version 5, .info files were used solely for dru...

Drupal User, Permission, Role in Drupal

Every visitor to your  drupal  site, whether they have an account and log in or visit the site anonymously, is considered a  user   to Drupal. Each drupal user has a numeric user ID, and non-anonymous users also have a user name and an email address. Other information can also be associated with drupal users by modules; for instance, if you use the core  Profile Drupal module , you can define user profile fields to be associated with each drupal user. Anonymous drupal users have a user ID of zero (0). The drupal user with user ID one (1), which is the user account you create when you  install Drupal , is special: that user has permission to do absolutely everything on the site. Other users on your site can be assigned permissions via  roles . To do this, you first need to create a role, which you might call "Content editor" or "Member". Next, you will assign  permissions  to that role, to tell Drupal what that role can and can't do on t...

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...

Here is the Solution for Every Problem

Here is the Solution for Every Problem Nice approach towards the problems “Life is a problem” Vs. “In Life there are problems” If we get any problem we usually say “Life is a Problem” better than this we can say that “In Life will have some problems” this sounds good and we will try to solve those, because we said problem will be a part of life. If you feel that, you have many problems then here is the solution…… to make them less… >  Know about your Problems. Take a chart and Marker. Write your problems on chart using marker (Might be small, silly or important) which includes all types (Social, Professional, Personal, Ethical). Write whatever comes to your mind. ( Note : It should complete in 5 min). Read them only once (Complete it in one min). If you get some more problems than write them but in separate section called Late Entries (Don’t read them again). At this stage you have to feel free because you have your problems on paper. Don’t add p...