Programming Bulls

For Geeks and Programmers who think simple!

For Geeks and Programmers who think simple!

Blogs

Embedding Views and passing filters to exposed filters in Drupal

    $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

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?

$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?

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

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

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?

<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

Following function in template.php does the trick:

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

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?

1. Go to Admin

2. Go to Blocks

3. Add Block

4. Add following code. 

 

Syndicate content

Powered by Drupal - Design by Artinet