Blogs

For Geeks and Programmers who think simple!

Embedding Views and passing filters to exposed filters in Drupal

Submitted by sudeepg on Mon, 05/19/2008 - 19:23.

    $view3 = views_get_view('SportsFeed');
    $filters = views_get_filter_values(array('filter0' => arg(2)));
    $scroll_str = (views_build_view('embed', $view3, array(), false, 0, 0, 0, $filters));

$remove = array("<li>",'<ul id="view-sportsfeed">',"\n");
$strrss = str_replace($remove,"",$scroll_str);
$remove = array("</li>", "</ul>");

Subtle Difference in Zen-Cart and Cre-Loaded

Submitted by ankit on Sat, 05/17/2008 - 21:10.

Oscommerce has two branches, the spiritually inclined Zen-Cart and commercially inclined Cre-Loaded.

Both use same codebase as osc and have a rich set of features. Cre has more intitutive and better looking admin as compared to zen cart and understandably so as CRE has a company behind it.

Altough both have pretty similar basic features there is a subtle difference in the way they treat categories/products.

How to pass filter to Views?

Submitted by sudeepg on Sat, 03/15/2008 - 07:02.

$view = views_get_view('popular_location_upcoming');
$filters = views_get_filter_values(array('filter0' => 'chicago'));
print views_build_view('block', $view, $args, false, 0, 0, 0, $filters);

How to Get Equal Height Columns in HTML Design?

Submitted by sudeepg on Tue, 02/26/2008 - 08:52.

There is a  problem with  "Equal Height Columns" as discussed in: http://www.positioniseverything.net/articles/onetruelayout/appendix/equa...

So, found the alternative at:

 

http://articles.techrepublic.com.com/5100-22-5268973.html

 

 

How to create News letter in Drupal

Submitted by dileep on Sat, 02/23/2008 - 19:01.

Hi,

In my site I need a news letter subscription page with functionality to get the following informations

name
Sir name
Email address
Occupation

I need newletter creation functionalities also. Which module is usesd for this?

Please help me. 

How to find free Ebooks using Google Search Engine

Submitted by sudeepg on Sat, 02/23/2008 - 08:41.

Type in the following command with your keywords for the book that you are looking at and you would find free ebooks on the internet available:
Google: -inurl:htm -inurl:html intitle:"index of" +("/ebooks"|"/book") +(chm|pdf|zip)

How to change the look of a pager result set?

Submitted by navdeep on Sat, 02/09/2008 - 05:18.
<div>
You can copy theme_pager() (http://api.drupal.org/api/function/theme_pager/5) and paste it in your theme's template.php file, then rename it to _pager() or phptemplate_pager() and change its behavior, as either of those versions of the theme_pager() function will be called before the default theme_pager() function found in core.</div>

How to display fullname in Drupal instead of username using template.php

Submitted by sudeepg on Sat, 01/05/2008 - 20:49.

Following function in template.php does the trick:

node_save: The way to save node to your Drupal Code without running into INSERT query?

Submitted by sudeepg on Wed, 01/02/2008 - 07:47.

I was trying to create a new node programatically by inserting information in node, node_revision tables and using "sequences" table to figure out what is the latest nid and vid. But, for some reason it was failing and then I found the saviour, "node_save", the easy one.

The following code saves your node without any bug, error or tension:

How to print "latest avatar" user list in a block in Drupal? Php code?

Submitted by sudeepg on Thu, 12/27/2007 - 12:58.

1. Go to Admin

2. Go to Blocks

3. Add Block

4. Add following code.