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
27 views

how to specify which region of panelpage can be displayed with php

I am using a page--front.tpl for my frontpage. It overrides a panelpage whice i use for my frontpage. I can display the content of my panelpage with <?php print $content; ?> Is it possible to ...
-1
votes
1answer
21 views

PHP Fatal error /allowed memory size exhausted (but 100% NOT the “problem”) [on hold]

I have several blank pages coming up and the server log contains the following error: PHP fatal error […] allowed memory size exhausted […] in ...
-1
votes
0answers
10 views

Drupal Blocks/Widgets Width / Height Parameters [on hold]

The site I am maintaining has bugs in the header and widget blocks. How do I change this? Search bar is out of alignment with nav menu. News and Events widgets overextends if too much text is ...
0
votes
2answers
32 views

How to build web app with Drupal

I would like to build a php based webapp. I am newbie with Drupal, but after some research I am convinced that Drupal may be the best solution for my web app. However I have some questions, here is ...
0
votes
0answers
9 views

What is the use of drupal_render and in what kind of situations do we use it [closed]

I was going through some video tutorials and i found certain things like tags and comment form being themed using drupal_render and then returned to the function whereas other things were themed ...
0
votes
0answers
13 views

Shared hosting - force mail return envelope

I hope I'm on the right site, because it's a crossover between drupal and server configuration... I am currently using shared hosting for a website and am encountering mail problems while sending ...
0
votes
0answers
11 views

Drupal 7 views show nodes filtered by user profile field

Drupal 7 views show nodes filtered by user profile field In Drupal 7, create taxonomy vocabulary "Interests". It has terms sports, arts, computer... admin/structure/profiles create main profile. It ...
0
votes
0answers
19 views

translate php date?

Im my view I use last-access field for users. I use custom date format (only d) The resulot is for example 1 day 14 hours. Question: how to translate it to different language? I am not using any ...
0
votes
1answer
16 views

Alter keywords searched in solr

I want to search phrase entered by user as q="phrase"^21.0 OR phrase On localhost:8983/solr/admin/form.jsp it parses "phrase"^21.0 OR phrase perfectly! and return correct results How can i do it ...
0
votes
0answers
8 views

PDM: Remember dismissed messages until user logs out

I am using the Persistent Dismissible Messages module with Drupal 7, which works perfectly, however I could do with the adding a certain bit of functionality. When the user logs out, I need PDM to ...
0
votes
0answers
21 views

Call to undefined function views_embed_view() in php/php.module error

I have a Drupal 7 based website that is multi-site. There is one sub domain ,say sub.example.com which is a Drupal installation with out any module or content type and the example.com it self and they ...
-1
votes
0answers
17 views

On click of checkbox send email to selected recipients [duplicate]

<?php if( isset($_POST['Submitter']) && !empty($_POST['Submitter']) ) { $to = "syz@gmail.com"; $subject = "Test Subject"; $body = "Test Body"; $headers = "From: ...
0
votes
0answers
7 views

ckeditor interface language for multilingual site

I am trying to implement various languages in ckeditor interface for my multilingual site if i set config.language = 'en-gb'; config.wsc_lang = 'en_GB'; config.scayt_sLang = 'en_GB'; in admin panel ...
0
votes
0answers
7 views

How to hide a node in panels when user is member of some groupnode

In panels i like to hide a node. Users who are a member of any type of groupnode should not see the node. My problem is that i can only find a visibility rule that can hide the node when the user is ...
0
votes
1answer
27 views

Sub Menu's are not coming under main menu

I am using this code to fetch menu's in drupal. I have given Home as parent menu and other are sub menu's like submenu1, submenu2 etc. But in front end they are not coming under Home menu. Only Home ...
0
votes
1answer
30 views

What are some php cache related modules for drupal 7?

i just updated my server to php 5.5 and been reading about apc and opcache, and I'm not to sure which one to use or what modules support this feature. What are some modules or modifications to drupal ...
0
votes
0answers
12 views

AND/OR multiple subqueries in SOLR and Drupal 6

What i need is to search in forum & topic of forum is tid: 123. I want to limit the results to a particular topic author name and having keyword in it. e.g All topics by 'xyz' having the ...
0
votes
1answer
12 views

Drupal 6 theme add / edit content form

Drupal 6 theme add / edit content form In Drupal 6, we can add new content type "content-type". We want to theme /node/add/content-type by template file. We want to theme the edit form ...
0
votes
1answer
39 views

How to refer input values in php by giving $_POST[name] or $_GET[name]?

I have created content type and I want to refer two textboxes. How can I do that? using normal php the below will do that $Fname = $_POST[uname]; $Lname = $_POST[Lname]; How to do that using ...
1
vote
3answers
57 views

How do you disable strict errors for PHP 5.4 & 5.5 in Drupal 7 via the settings.php file?

Currently I disabled the error messages via UI under Administration > Developement > Logging & Errors: But I want to be able to do this via the settings.php file. How can that be done?
0
votes
1answer
38 views

Updating to PHP 5.4 breaks Drupal 7.25 with Strict warning: Declaration on bootstrap.inc

I tried updating to PHP 5.4, but got a few errors. These aren't critical errors right? seems like its only warnings. I'm using Drupal 7.20 What do the following errors mean exactly? And how can they ...
0
votes
0answers
14 views

How to substr_replace a “$” in front of price tags using VBO

I'm using Views Bulk Operations to update details on a bunch of products (more than 1300 of them.) I am trying to insert a "$" in front of the #### price tag, and I receive an error of: Parsing ...
1
vote
2answers
36 views

How to add button to user profile page in drupal

I start using drupal(7) 3 days ago and I have small task : I'm using Profile2 Module to create 2 type of users (candite/employer) and I Want to create a button in the wiew page of the profile of ...
1
vote
1answer
94 views

what is starting point of any drupal module.?

Only beginner can ask this type of question. as i am learning drupal recently. what is the first function that executes in .module file..how can i understand which function or hook executed.I just ...
0
votes
0answers
16 views

How to add social sharing buttons to a CCK slideshow

I have a simple d7 field slideshow with a carousel and I need to add the ability to "share" the image that is visible in the slideshow. I have included my custom buttons in the ...
1
vote
1answer
18 views

Nesting Navigation Tabs

In my custom module, I'm defining a menu_item with the type MENU_NORMAL_ITEM. In the default bartik theme, this adds a new navigation tab (next to the Home tab). This is great; however, I need nested ...
0
votes
1answer
37 views

Add and customize login block on page.tpl

I'm trying to add the user login block in my page.tpl file. I've tried inserting the following code but the only thing I see is the username, password and submit fields. The "Register" and "Forgot ...
0
votes
0answers
20 views

Print out multiple upload fields on a page

I'm trying to output 4 upload fields on a page. But the problem is that it only outputs the first one and not the rest. All works fine when uploading the files with Drupal's form api, but I just can't ...
0
votes
1answer
43 views

hook_views_pre_render -> how to access variables

I have a view of teasers, and would like to check the status of each node. Using hook_views_pre_render (in the template.php file of the theme), I can access: $view->style_plugin->row_plugin ...
0
votes
0answers
15 views

Fill a field with a specific number when clicking on a link

I have changed my node.tpl.php file a little bit, <div class="content clearfix"<?php print $content_attributes; ?>> <?php // We hide the comments and links now so that we can ...
0
votes
1answer
11 views

How to install certain modules only for specific site using Acquia Desktop

I am using Acquia Desktop for creating multisites. Problem is whenever I am installing a module it gets replicated in everyother site. What i need to know is that if i want to have a module only for ...
-1
votes
2answers
27 views

call views block with php [duplicate]

I make a page and enable php filter core module too. Now I want to call a views block with php. How can I do this? How can I call a views block with php?
0
votes
0answers
14 views

hook_init executing instructions multiple times..Does it happen only for drupal_set_message or also for other statements? [duplicate]

I have added a Drupal_set_message in my hook_init implementation of my module. I havent placed any if condition as i want the set of instruction to occur in every page . But often in many pages i can ...
1
vote
0answers
22 views

How to use drupal tokens using token_replace

Recently i developed a module which will prompt a message to user when he logs in Hi xyz .thanks for vising the site. using drupal_set_message.Now in order for this to work i had to use ...
0
votes
0answers
13 views

Drupal alter country list generated by location module [duplicate]

I want to remove some countries from the drop down field provided by location module, is there any admin way to remove the fields or hook_form_alter is the only way to limit them, thanks in advance
0
votes
0answers
23 views

How to get the value of a content type field in Drupal and pass it to a JS file

In my Drupal theme I have a field for soundCloud URL which its machine name is (field_soundcloud_url_) I have a javascript file that will work based of the value of this variable. But it does not ...
0
votes
1answer
24 views

Views Php how to select actual term name not term ID

How to select term reference field with variables in views global PHP field? I need to not Term ID, but actual term name. My views is fields of a content type that contains term reference field. And ...
0
votes
1answer
25 views

Send email with URL of same page as the email link?

We have a page that displays a logged-in user's selections from a Flag Lists process. The page includes code to generate the specific URL of that page, so it can be copied and pasted elsewhere. ...
1
vote
2answers
29 views

select nodes whose created date in hours is equal or larger than 48 hours

I make a PHP routine in which all node is selected and check created date and delete those nodes which is created in last 48 hours or greater. $result = db_query('SELECT n.nid, n.title, ...
0
votes
1answer
23 views

Two variables in function

I know this is my fault and lack of knowledge of php . Sorry about this . I have a function in my template.php . /** * Implements THEME_preprocess_node(). */ function ...
0
votes
1answer
18 views

HOOK_node_submit funtion not working in custom module

I recently upgraded a drupal installation from 7.15 to 7.31. All seemed to be working well but as I went through testing features I noticed one of the template forms for content submission wasnt ...
0
votes
0answers
24 views

hook_js_alter not being called

I find this strange. My module seems to be named correctly but the module will not be called. The var_dumps are not on the page nor are watchdogs when I put them in. The module shorthand is ...
0
votes
1answer
52 views

Hiding Field(s) if Date is Expired

I'm using Drupal 7 date field. Using views, when the date has expired, the page goes to a section labeled 'past events.' In the template page, the date and time are both separated for instance. ...
0
votes
1answer
32 views

clean URL and slash after index.php in drupal 8

Drupal 8 does not send any form. Stores only if you write through /index.php/ example: site.com/index.php/config That would be needed to site.com/config There is the idea that it's something with the ...
0
votes
1answer
33 views

How to add custom RewriteRule in .htaccess [closed]

I have a website which some one else has built using Drupal Database API (nothing else from Drupal has been used). With the RewriteRule added to the .htaccess file which is in the root folder, the ...
0
votes
2answers
28 views

Form Alter Foreach Loop changes not sticking

I'm trying to modify my exposed filter block to put each of the controls inside fieldsets, and make other modifications to them. However, when I try to utilize a foreach loop to do this, none of my ...
0
votes
0answers
20 views

Jquery Ajax to Drupal to External site, reading response

I have a drupal site. There is a page (page 1) with a form that gathers user info and submits it via AJAX to a Drupal Module page. The AJAX format is jquery var responseTarget = ...
0
votes
1answer
36 views

How can I restart the PHP environment installed with Drush for Windows?

I have installed Drush for Windows, works great, but it installs its own version of PHP in a subdir of the install directory. I've increased the memory limit and execution times in that ini but how ...
0
votes
1answer
24 views

Saving a value from Javascript on Drupal form submit

I have a jQuery map that I've built that allows users to select states and counties. This is all done in Javascript. I would like to, on form submit, take this data and submit it to the user's ...
0
votes
2answers
166 views

How do I prevent Drupal raising a segmentation fault when using a Node.js theming workflow?

Symptoms: Some drush commands fail; Some Drupal pages are blank. The failing drush commands report "Segmentation fault: 11" The Apache log (e.g. php-error.log in MAMP) also shows the same error. ...