Questions about PHP not related to Drupal should be asked on Stack Overflow. Don't use this tag to generally mean "the question is about PHP code."

learn more… | top users | synonyms

0
votes
1answer
13 views

drupal 7 Views: output a field with views php

Drupal 7.22 Views: 7.x-3.7 i have the field "content:path" and i want to output the containing data with php. I use a global php field. it shows me this: Available variables $row->path: Inhalt: ...
1
vote
2answers
31 views

Create a node using services with PHP

I want to add a new page node using drupal services and REST server. $postdata = http_build_query(array( 'type' => 'page', 'title' => 'aaa', 'field_test[en][0][value]' ...
0
votes
0answers
14 views

OG services add new group

I want to use Organic groups Services module to add by PHP new Organic Group node. I wanted to do it in this way: $opts = array('http' => array( 'method' => 'POST', ...
0
votes
0answers
45 views

Installed TCPDF and encountering PHP Fatal error: Cannot use object of type REPORT_PDF as array

I am using Drupal version 7.18 and have installed TCPDF package in my library under /var/www/html/drupal-sites/all/libraries Everything is working well for my generated pdf report. However, when i ...
1
vote
0answers
27 views

hide a field using custom php in rules

Drupal 6 only: I have a button field on a petition node for users to sign that petition. I have custom php in a rule to check if they've signed it before. If they have, I need to hide the button. So ...
0
votes
1answer
248 views

Drupal 7 Views 7.3.3 and Highcharts module Aggregation and Grouping with dates and integers

I am using Views along with Highcharts Module. Here is my objective - I have some integers that are contained in nodes 3 different integer fields to be exact. These integers occur over a duration of ...
0
votes
0answers
15 views

How to convert drupal parameter to html element

I have custom module which sends list donations to user,i pass set of donations as a parameter but problem is pass list of donations shows as string not as a html elemt foreach($donation as $dd) { ...
0
votes
0answers
9 views

How to add expose View filter for a derived field

I have a Drupal View looking at User profiles. One of the fields is derived, or calculated, which is done using Views PHP. I'm trying to add an exposed filter for this View, but the expose option ...
1
vote
1answer
26 views

How to programmatically delete all values in custom CCK field for a given node?

I'm on Drupal 6, and I have a multiple value CCK field. I need a PHP function to delete all the values in that field so I can later repopulate it. I am currently doing this: if ...
0
votes
2answers
21 views

Print base path in html.tpl.php

Im trying to print the full path to my theme in my html.tpl.php file. In the following code the 2nd part prints correctly but the first part does nothing. <?php print base_path() . ...
0
votes
0answers
16 views

PHP snippet won´t work: unset() a commerce checkout pane with custom module

This D7 snippet won´t do anything in my code and I don´t know why: <?php function mymodulename_commerce_checkout_pane_info_alter(&$checkout_pane) { foreach ($checkout_pane as $pane_name ...
0
votes
1answer
26 views

Is this snippet modification correct? (php snippet in a drupal commerce rule)

I´ve read about the possibility to use this snippet to hide a specific checkout pane (in Drupalcommerce), according to the cart contents. Could I use this somewhat modified to hide a pane when the ...
0
votes
1answer
19 views

Programatically insert product/order to cart from php file external to Drupal

I have an external php file on the same server, how can I create an item in the checkout? I have tried this, but I dont know which or how to include the proper files for the functions. Could I just ...
1
vote
1answer
44 views

How to access the order total amount in Drupal commerce?

I'm trying to make a block with an image that would change when there is something in his or hger basket (empty basket image when basket is empty, full basket when it's full) My understanding of PHP ...
0
votes
2answers
68 views

Views: Apply a wrapper to every 3 and 6 group of rows

My Views Output is as follows <div class="views-row-1">Content</div> <div class="views-row-2">Content</div> <div class="views-row-3">Content</div> <div ...

1 2 3 4 5 14
15 30 50 per page