Simple-Mvc-System-Drupal-6

I’ve recently started working on a custom module in Drupal 6 and I really disliked the idea to use built in functions for tables and/or to use embedded html into my module. So I’ve made a simple system on having a view like system in Drupal 6. Create a new module, and in the module folder create a directory called views (for eg:). Add the following function in your module...

24 May, 2012 · 1 min · 163 words · Alexandru Bucur

How to Change or Remove Views2 Exposed Button From Drupal

Add this to your template file: 1 2 3 4 5 6 7 8 9 10 11 12 13 function YOUR_THEME_NAME_preprocess_views_exposed_form(&$vars, $hook) { //this is important // only alter the required form based on id if ($vars['form']['#id'] == 'views-exposed-form-where-to-buy-page-1') { // Change the text on the submit button $vars['form']['submit']['#value'] = t('Search'); // Rebuild the rendered version (submit button, rest remains unchanged) unset($vars['form']['submit']['#printed']); $vars['button'] = drupal_render($vars['form']['submit']); } }

15 June, 2009 · 1 min · 67 words · Alexandru Bucur

Drupal Ubercart Get Add to Form

Quick and easy way on how to get ubercart’s form output for a node. 1 $output .= drupal_get_form('uc_product_add_to_cart_form_'. $node->nid, $node);

15 June, 2009 · 1 min · 20 words · Alexandru Bucur

Drupal 6 Custom Content Type Page Theme

If you ever wondered how to change the page.tpl.php for a custom content type you’ve found out that by default Drupal 6 doesn’t know how to do it. It’s “fixed” easily by adding the following code: 1 2 3 4 5 6 7 8 9 10 11 /** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { // Add per content type pages if (isset($vars['node'])) { // Add template naming suggestion....

04 June, 2009 · 1 min · 98 words · Alexandru Bucur