drupal-6

Drupal: how to avoid memory exhausted error message in few circumstances

老子叫甜甜 提交于 2019-12-11 16:44:36
问题 I'm using a Drupal website on godaddy hosting with a low php memory limit. The website runs ok, but I get an exhausted memory error message when I visit a View. Are views much more expensive to generate for a server ? How can I overcome this issue ? Also, I've noticed I've issues to navigate in the admin pages if I'm the admin user (uid=1): exhausted memory error again. If I'm just an authenticated user, then I have no issues with that. Is it maybe because I've more permissions and therefore

how can i change the entire template of the page according to module in drupal6

偶尔善良 提交于 2019-12-11 16:16:15
问题 I have check lots of area in the web about theming in drupal6. All the tutorials in the web saying theme module, which means the theming a small area or theming a samll blobk etc. But in my case i need to change the entire template of a page when i access a module. Is this is possible in drupal6 ? 回答1: You can write if conditions in your theme's template.php function. The function is template_preprocess_page(&$variables) And in this function, write some if conditions. For example: if($some

could i add some variables into the drupal node body?

﹥>﹥吖頭↗ 提交于 2019-12-11 12:12:40
问题 when i create an article useing the story type,could i add some variables into the body's textarea.then can invoke the variable and output it. thank you. the drupal version is 6. 回答1: Inserting textual placeholders to be replaced by actual values on render is the purpose of the filters system in Drupal. Token filter provides, well, token replacement and is an handy tools if your need replacement for tokenized values. But there are plenty of filters for Drupal 6.x and you can even define your

Drupal form submission to a 3rd party website

你。 提交于 2019-12-11 11:47:20
问题 I'm building a form in Drupal that needs to submit to a 3rd party website. Within the form API it seems like this is not really possible as you register form submission handlers to do all of the processing. I need to have the form method to to POST and it needs to be submitted to this website as it is a 3rd party hosted ordering system. Has anyone run into a similar situation? Any suggestions? 回答1: Use the #action attribute on the form array: $form['#action'] = 'http://example.com'; 来源: https

How to get the first image field from a node without knowing the field's name?

ε祈祈猫儿з 提交于 2019-12-11 10:49:44
问题 The site I am working on uses many content types and almost all of them use one or more image fields. Image fields are not shared between content types, so there is a big number of them. What I need is to get the first image field from a node, assuming there are more image fields linked to a node and without knowing the name of any of these fields. The first one is considered to be the one with a lower weight . 回答1: This should build you an array of the "lightest" imagefield per content type.

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

邮差的信 提交于 2019-12-11 10:07:50
问题 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 回答1: With hook_form_alter you can set a permission on form fields. That way only users with the permission can edit it. Example: $form['example']['#access'] = user_access('permission'); 回答2: This is nearly the same question as

Drupal excessive menu parts

懵懂的女人 提交于 2019-12-11 10:03:54
问题 In a module development (webtv) I am providing a generic block that can be configured for its contents (playlists). On the configure form there is a list of added contents (playlists) along with links "add new playlist" and "edit" existing one placed next to each entry. As the block configuration path is: "admin/build/block/configure/[my_module_name]/[block_delta]". And I am expecting to add/edit playlist form on a separate page and should be accessible on: admin/build/block/configure/[my

in Drupal, how to make login state consistent between browser pages and embedded XMLRPC client?

寵の児 提交于 2019-12-11 08:43:52
问题 I have a Drupal site with user logins. Embedded within this site is a Flash application that shows some data to everybody but allows extra functionality if the user is logged on. From within Flash, I'm using XMLRPC to access the system.check method (to determine whether the user is logged in) and the user.login method (to log in a user from within Flash). Within Flash, everything works fine. However the Flash login state does not seem to correspond to the rest of the site. For example, if I

show administration theme when editing page in drupal

落爺英雄遲暮 提交于 2019-12-11 08:36:17
问题 I am using a custom theme for the front end of my drupal website.I created it by modifying garland theme.And I am using garland as the admin theme. When I try to edit a page from admin it shows the edit page with my custom theme (http://example.com/node/2/edit?destination=admin%2Fcontent%2Fnode). And It breaks up the layout. I want to show the admin theme for all the admin tasks. This problem also occurs on the blocks page (http://example.com/admin/build/block). Is there any custom module or

How to modify the drupal search templates?

蹲街弑〆低调 提交于 2019-12-11 07:51:00
问题 I'm attempting to create my own templates for the search pages using drupal 6. When creating these template pages i usually use Drupal Template Suggests but for some reason when creating the files: search-block-form.tpl.php search-result.tpl.php search-results.tpl.php search-theme-form.tpl.php None of them seem to override the Drupal templates for some reason? is there anything special that i have to put in or anything i can test to see if they are working as everything i've tried so far has