Drupal ThemesUser login |
DrupalDrupal 6 fails to build menu router and linksWhen I enable a new menu in Drupal (for example, mymodule), Drupal should be able to get the menu items from mymodule_menu (hook_menu), process the items and insert the menu items to menu_router and menu_links table. However, my Drupal fails to do so (it worked well before, according to the previous developer). Each time I enable a module (written by me or modules contributed by others, or core modules), Drupal does not seem to get the new information. The menu items defined in the newly enabled module are not processed and inserted to Drupal's menu system. That means the newly enabled module has no chance to work-- because it's inaccessible. I did fix this by manually insert the menu item information for the new module into the menu_router and menu_links table and the new menu started working. But this is a nightmare if I have to do this each time I enable a module. Any one has ever had the same problem? How to fix this? Thank you in advance. Categories: Drupal
Adding a AHAH powered form element with AHAHHello masters :) I hope someone from you can help me a little bit. I have a multistep form with AHAH enhanced elements (with AHAH Helper). All runs fine. Now I have to insert a new form element (a select) with AHAH. This is no problem, I render the new form element with drupal_render in the form definition directly in the output of the wrapper-div and build the form element before. This new element have AHAH functionality too and THIS doesn't function. There is no reaction when I click in the select. Can you help me please with a hint? Forget I something? Thank you Categories: Drupal
Can not set default option selected in a select fieldFirst of all, sorry for posting before in a quite old post (https://drupal.org/node/240783). This new post is related to mentioned one. form['aform']['status'] = array('#type' => 'select', The question is that this form is same used to add new records in a db table as for editing existing ones. So If editing, the previously selected value for this No way men, I cannot get it working. Some one said (in older versions of drupal in the above mentioned post) that the options array should be of type array('OFF'=>'OFF', 'ON'=>'ON'); Where keys and values are the same. :| Actually thrilling if someone's got keys like 'this is my option one'. Categories: Drupal
problem with user_external_login_registerIt looks like user_external_login_register use incorrect assumptions about what will happen if you call user_load_by_name for none-existing user name. In modules/user/user.module:2087 we have following code: Problem is that for "new user" user_load_by_name will return FALSE. function user_external_login_register($name, $module) { Categories: Drupal
backporting simple D6 module to D5 (hook_form_alter question)Hi, I've not done much D5 module development, but I need to backport a small D6 module I wrote to D5. hook_form_alter() has changed. The D6 version has a $form_state variable passed to it that contains the current form state. I've used that to do a little processing and change the value of a webform redirect. Code below. My question is, what's the D5 equivalent of the form_state variable? Categories: Drupal
Urgent - a simple question about module developmentHi - I am tasked with quickly knocking up a Drupal module for a client. the module is supposed to provide centralized control of error messages across the site. This is not something I've done before but I'm an experienced PHP dev. Anyway, perhaps there's something I'm deeply misunderstanding here, but I can't find any standard way to make my module store it's data in custom tables. I've seen plenty of tutorials on the _creation_ of these tables in the module.install file but nothing on actually _using_ them... here's my install file:
Categories: Drupal
Debugging modules with KomodoIDE causes browser to never complete the requestI have never been able to get XDebug and KomodoIDE to have the browser complete the request while debugging. If I, say, set a breakpoint, the debugger comes up and I can step and continue to other breakpoints. When I continue past the last breakpoint (or if there are no breakpoints), Drupal seems to run to completion, but the browser never refreshes the window with the result. I then click the stop button in the browser, turn off debugging, and refresh, and the new page displays as expected -- including any redirection to a new page. This obviously slows down my debugging and ActiveState support doesn't know what's wrong. I have searched drupal.org for a solution, as well as looked at the ActiveState forum. My configuration is: Any help or hints or links / search ideas would be greatly appreciated. I *think* this is the right forum, since XDebug is a tool for module development. Categories: Drupal
Views Bulk Operations - how do I add an operation?Hi I am using the Views Bulk Operations module. But I need to include an action to allow the user to download content nodes as an RTF. I tried to implement my own 'downloads module' with the hook_node_operations like this /** This option did show in the admin drop-down but was not available in selected operations in my view. Why does this not appear, any ideas (I am logged in as admin user1)? Thanks Categories: Drupal
XML moduleHey all Sorry if this is the wrong place to post but I couldn't find a sub forum that seemed to fit my question. I'm looking for a module that will allow me to display XML data pulled from another website in a users profile and have this as a required field when the user register's on my site. The user would be required to enter a url upon registration which would pull the required XML data from an extrernal site. Sounds mind boggling but hopefully someone will be able to point me in the direction of a solution. I thought an XML feed module might be what I'm after but a bit unsure if there's something along the lines of a CCK XML displayer? Cheers for any help. Andy Categories: Drupal
DependencyI''ve added a dependency to my modue by adding the line dependencies[] = token to my .info file. However when I try to call the token_replace() or any other token function I get the "Call to undefined function" error from php. Have I missed something? Have searched for site for a "How To" for dependencies without any joy. Cheers, Roy Categories: Drupal
Query related to jcarouselHi, I have installed jcarousel jcarousel-6.x-1.1 ,viewscarousel-6.x-2.x-dev modules for carousel effect . I created a view for the carousel with image nodes. currently I have a display of carousel in a block which displays 3 images at a time.My query is I want to display only 1 image at a time and after scroll it should display the next one.(i.e one image display at a time). Anybody has any suggestion to tweak a module so that I get a required display? Thanks. Categories: Drupal
About ahah in formHi, about ahah in form. i'm new in this part and i found it really hard to make it work. Below is the code: $form['xxx']['zzz'] = _function_to_get_element($id); // this is also a selection element The logic is when i select the 'yyy' element, i want to update the 'zzz' element content according to the 'yyy' selection value. I tried many times, when i change 'yyy' selection, nothing happens. I don't konw why. Any suggestions appreciated! Categories: Drupal
Showing view / edit tabs in list of nodesI got a page that lists nodes (a list of services, where each service is a node). I now want to add those view / edit tabs above each item, so that if you click the edit tab, you can edit the node right below it. I know how to add those tabs above a single node that spans the entire page, but am stumped on even figuring out how to start on adding them on a listing. Can anybody shed some light on this? Thanks! Categories: Drupal
How to get hook_theme work for two different blocks?Trying to add second block for random polls for advanced poll module. Currently it has only one for latest poll. I am trying to add a block for random poll. Have done most of the job, need just a little push further from more advanced coders. Please, see http://drupal.org/node/811762#comment-3067462 Categories: Drupal
Remove the Posts tab in the user profilesHi I'm trying to alter the tabs in the user profile. I have added an extra tab by using the hook_menu API and that was successfull. But I'm now trying to remove the Posts tab in the user profiles by using the hook_menu_alter API. I have no sucess at the moment. I want to remove the user/%user/posts because I have replaced it by another page with only some specific posts.
/** return $items; function _node_gallery_custom_access($account) { function node_gallery_custom_menu_alter(&$items) { Br. Categories: Drupal
Trigger module: Programmatically assigning actions to triggersHi, I try to make a module I develop to assign some actions it defines through the hook_action to appropriate triggers. Looking at the documentation, searching the web and looking at trigger module code I didn't find any function for actually assign an action to a trigger from inside a module's code. Studding the code of trigger.admin.inc I came up with this piece of code for doing what I want: /*Assign actions to triggers. A dirty hack.*/ I really don't like much this "hack". Is there a more straightforward way to do what I want through my module? Have I missed anything? What do you suggest? Categories: Drupal
I want to change "Group" word to "project" in organic group module, I am using drupal 6.x with postgre.Plz suggest me how to customize organic group module so i would use it as "Project" instead of "Group"......! Categories: Drupal
File FieldHi to all, Can any one please tell me the path where the files will be stored that are uploaded using the file field in CCK form? Thanks for your understanding, NIKHIL Categories: Drupal
how to add enum field using drupal_install_schema?Hello friends, I want to create a table using drupal_install_schema, I have define all fields within schema but now I am not getting how to add enum type fields. Thanks in advance. Categories: Drupal
Possible to insert nodes through a form?Sorry, newbie question. I've got a form_submit() file in a module I've created. I want to take what's in the $form_state['values'] and insert it into the database for specific nodes. <?php Was thinking of hooking in through hook_nodeapi() but I can't figure out what case operation I would need. Kind of lost, new to programming Drupal. Thanks for any help. Categories: Drupal
|
Popular contentDrupal Showcasedrupal security feed |