drupal-6

theme_menu_item() is not working

Hello I have a Drupal theme called wellington located in \sites\all\themes\wellington. I wish to override the menu_item function and followed the instructions at http://drupal.org/node/310356. I want to add a class to the li as described. I have tried naming the function wellington_menu_item and tried phptemplate_menu_item but no luc...

How / where can I include a library?

hi, how can I include a custom library in Drupal ? For example I need to insert this statement somewhere, to use the dompdf library: require_once("dompdf_config.inc.php"); Once the this file is included, i can trigger custom php code from my drupal back-end custom actions. thanks ...

Equality of $is_admin for custom created role users

Hi friends, I have created a site-admin role for my client to edit page contents. Are users under this site-admin included to $is_admin condition? I tested and as I see it is not unless I miss something. So, what is the equality of $is_admin for my custom created role users? Appreciate helps!! Thanks a lot ...

How to send e-mails from custom PHP code ?

hi, I need to send an e-mail from my custom php code using the Drupal service. In other words, I've noticed Drupal can easily send emails so I would like to know how can I use drupal libraries to send the emails, instead of using external libraries. thanks ...

Drupal: access permissions for php scripts ?

hi, I'm writing a custom php code in my Drupal website. I need to load the content of specific pages from PHP. These pages are visible only for authenticated users, and it seems I cannot access them from php, even if I trigger the script when I'm logged in as user. Is there a way to simulate "a logged in" user from php, so I have acce...

Load particular stylesheet on Access Denied

When a user gets an Access Denied page, how can you use drupal_add_css to load a particular stylesheet? Is this possible? ...

how to do an drupal form submit using ajax ?

i have a custom module, in which i am submitting the form using drupal submit. ie using mymodule_submit() function. i want to ajaxify this submit using jquery. what all are the prerequisites for ajaxifying in drupal ? how to return the values and all? somebody please help . thanks in advance ...

Rating system for users and posts (and comments)

hi, I need to implement a message board with rating system. Something similar to stack overflow, but much simpler. I need to rate both questions / answers and compute the rating for each user. I'm looking modules in Drupal to implement it. Could you give me some tip ? thanks ...

Drupal, where is edit account tab in user profile.

Hello After login, my account page is display, but I can't find edit tab. I can see only registered profile values without editing option. :( Could somebody tell me why? Another issue I am getting is hook_validate problem. I added to my custom module: function advert_user_validate($node, &$form) { echo '<pre>'; echo var_dump(...

Drupal, Ubercart: how can I get the order printable version programmatically ?

hi, I need to generate a pdf from Ubecarts orders. I know how to access to the printable versions of orders from my browser: i.e. "admin/store/orders/45/invoice/print" However, I was wondering how to access to the page from php, maybe using ubercart apis ? What I need is the equivalent of node_view, for orders (which is not a node). ...

Drupal 6: How to set up & use Mercurial for my Drupal projects

Hi friends, I need to start using version control system for my Drupal projects, and I decided on Mercurial. During last 2 days I have been googling to find some tutorials, guides, tips, anything about "how to use mercurial for my drupal projects", but I just can't find anything! :/ Can you advise any link or tutorial or anything fo...

Drupal 6: using bitbucket.org for my Drupal projects as a real version control system dummy

Hi friends, Here is a real version control system dummy! proper new starter! The way I have worked so far: I have a Drupal-6 web project www.blabla.com and making development under www.blabla.com/beta . I'm directly working on blabla.com/beta on server. nothing at my local, nothing at anywhere else. Only taking backup to local, time...

Drupal, user profiles: adding fields *only* editable by administrators

hi, I would like to add a field to user profiles that only administrator can use and change for each user. In other words, it should be visible in users profiles but not editable by users (only by administrators). I cannot do it with drupal permissions, right ? thanks ...

Drupal: images don't show up inside the block (text only)

hi, I've added the following code inside a Drupal block, to display an image. <img alt="Fuzion logo" src="sites/all/themes/zen/zen/logo.png" />test<br /> I've tried several urls. For none of them I can see the image in my front-end website. The block only contains the text "test". hostingpath/sites/all/themes/zen/zen/logo.png ---> I...

Drupal: modifying a template without hacking the module

hi, I need to edit an invoice template in Drupal (both php template and css). I've copied pasted the file in my theme folder, as I usually do to override for blocks and pages templates, but it didn't work. This is the template customer.itpl.php inside Ubercart/uc_orders/templates folder. How can I override it without hacking the uber...

Drupal, Ubercart: Extended price for products in the templat ?

hi, I'm modifying the invoice template of my Ubercart shop. There is a missing parameter I need (Please see the image): http://dl.dropbox.com/u/72686/extendedPrice.png The Extended Price is not correct. I need to multiply the unit price for the units. I was wondering how can I retrieve it (i.e. The unit price is uc_price($price_info, ...

MimeMail: issue with attachments

hi, I'm using mimemail module in Drupal to send e-mails with attachments. The e-mails are correctly sent, but the attachments not. This is the code I use (I've just enabled the module): $sender = '[email protected]'; $recipient = '[email protected]'; $subject = 'New order'; $body = 'Please, see the attachment.'; $plaintext = TRUE; $...

Drupal - Blog post links not working from certain points

Hi, we've put a quick Drupal 6 site as part of a Give-Camp and at the last minute noticed a problem with the site blog's recent posts section. If you go here: http://closingthenolagap.org/ you can see the problem that I'm talking about under Recent Posts. Those links should exist since those posts do. We can't figure out what setting ...

Drupal, Views module, Group fields in layout

I want to group some fields inside a div or similar HTML tag, for example I'm displaying node's title + node's teaser + node's image, I want to group the title and teaser into one DIV in layout for easier CSS styling. I know a silly method to do it in templates, but I want a quicker and easier method (Drag-and-drop in views edit). A sim...

Administration menu

Hello I'm looking for some beginners resources for drupal. I've been writing my own module as a way of teaching myself the basics of development as I like the idea of having Drupal to go to when Wordpress can't manage. (Although wordpress is fast becoming as accomplished as Drupal, but that's not what the questions about.) I have the m...