Drupal ThemesUser login |
DrupalI need little help with a small PHP snippet for a computed fieldGreeting, Please help, because I know that many people are looking for a solution to something like this, while there is no helper module. Here's the scenario: I have a site where people submit URL links to external articles, powered by Drigg module. To achieve this, I'm trying to use the Computed Field module, which allows us to enter PHP snippets and calculate a new field from values entered in another field. $url is something that comes from the Drigg module, and it's the full external URL of an article So far I know how to strip away the http:// or http://www. and everything that comes after the .com with this code: Categories: Drupal
Need Drupal Gardens 7.x API's for LinkedIn search and VigorCRM.Need Drupal Gardens 7.x API's for LinkedIn search and VigorCRM. Categories: Drupal
Delete query not workingIn my module I'm using the following code to remove a row from my database: <?php At first everything seems to work fine. The query isn't really executed though, causing no change to the db. I'm sort of clueless on what the reason could be so any advice is welcome. Thanks in advance, Bouke Categories: Drupal
Own cck fieldHi, i am coding a contrubute module /custom cck field. But i am stuck at the point where i want my files to be uploaded to a folder outside the public html folder. I want them to be for example in /var/files. It does not work because the working directory is still the sites/default/files dir (checked that with getcwd() ), even if i pass /var/files to file_move (to move them out of the temp dir). I read the sourcode of a module that does save its files outside the public html, it uses something like: global $conf; ...... operations and code and then sets the paths back. $conf['file_directory_path'] = $system_directory_path; I think that does not look very clean. Is there another way without manipulating the global $conf at runtime of the module? any ideas? thank you marco Categories: Drupal
Drupal7 File stream wrappers - where is file_get_contents() or file_load_data()?I'm working through a module upgrade, and hit a bit of a standstill with the Drupal 7 file wrappers. Simple case - I use file_save_upload() to upload a file from a form. stdClass Object I can't see any read function in the public API, although there is a file_save_data() going the other way. Is this a gap in the Drupal 7 API? Do I have to do it by hand? I see in stream_wrappers.inc a declaration of stream_read() ... but where's good old file_get_contents() or equivalent? For now, it seems I can go So what am I missing? Categories: Drupal
File Redirect Module: Use File API?Hi First, I am looking for a module that allows the admin setup that all file uploads by users are redirected to a storage location outside of the Drupal website. However, if such module does not exist, then as a head-start, is File API the best starting place?: http://drupal.org/node/555118 Are there known File API samples or tutorials? Thanks Categories: Drupal
ProssimaFermataGenova.it - case studyProssima Fermata Genova
http://www.prossimafermatagenova.it BackgroundThe town of Genoa (Italy) in the last few years has focused his attention on digital media and the "web 2.0" phenomenon, realizing several interesting activities under the Genova Città Digitale (i.e. Genoa Digital City) project. Among those: the The Genoa Municipality Channel on YouTube, the Genoa on Facebook network, the Genova HUB on MySpace and the creation of a network of WiFi hotpots all over the city. Categories: Drupal
Retrieving data using jsonHi, I have a question for drupal json, for example on the server side I have a code that will get like 10 images fetched then feed the data back via ajax using drupal_json. currently the workflow: 1 post -> 10 images fetched -> 10 images passed via json -> 10 images displayed at once. is it possible to have this? 1 post-> 1 image fetched -> 1 image passed via json -> 1 image displayed at once -> refetched another image without doing another post loop until all 10 image is shown one by one Categories: Drupal
Ask for quotation: import an attachment on multipl nodesI need quotation to build a module that will import an attachment on selected multiple nodes. Categories: Drupal
Problem with the file_directory_path() functionHi guys, I've got a problem with the file_directory_path() function. It always returns the path of a directory named "resources" which I’ve created in 'sites\default\files'. However, other directories have been created and should be used. This causes a serious problem when I want to use the file_create_url() function which also uses the file_directory_path() function (=> malformed URL : sites/default/files/resources/sites/default/files/entities/file.png) What can be done about it ? Thanks for helping ! C:\wamp\www\mySite\sites\default\files>dir Categories: Drupal
Maphilight not workingI have installed lastest Maphilight plugin for D6 along iwth jquery plugin. Works fine in FireFox, but in IE8 i get following javascript error: User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Message: Invalid argument. Message: '$.fn.maphilight' is null or not an object However if I goto http://davidlynch.org/js/maphilight/docs/demo_usa.html in IE8 it works fine. Could the issue be the fact that the demo is using jquery-1.4.2.min.js whereas via drupal my site is using a diff version of jquery: Note: I have included Categories: Drupal
I think there's a bug in db_last_insert_id()UPDATE: the issue has reappeared, so I opened a bug here. Hello good people, Can anyone confirm this 6.x core bug? This code returns a wrong ID. db_query("INSERT INTO {boxes} (body, info, format) VALUES ('%s', '%s', %d)", "Some body here...", "A title is here", 1); Now delta should have the maximud id of the {boxes} table, right? Well this is wrong. Currently the problematic function looks like that: As you can see there's no use of the two input parameters. I had to rewrite the function as follows. function db_last_insert_id($table, $field) { Now this works. Please correct me if I did some mistake. Thanks Categories: Drupal
Site agency of the real estateI wrote site for agency of the real estate What do you think about this site? Categories: Drupal
Theming a module pageHi there, I'm creating a drupal module. In one page of the module i need to remove the left sidebar and header just need a separate template file for a page. Please suggest how can i do that. Thank you in advance. Categories: Drupal
Drupal functions in AJAXI'm currently working on a module to load some views-results in a window on the page when click/hovering them. I'd like to know whats the standard/best way of loading drupal functions in an ajax request to I can for example do a node_load and some other stuff in a custom .php file? Curently I'm just getting the entore page with ajax (written something within a hook_menu to get what I want, so I have my php code) and then cut off the html I don't need. So, best way to load drupal's functions in ajax? Categories: Drupal
How does my template know that a valid form has been successfully submitted?Hi there, I'm fairly news to Drupal and have followed the steps in the tutorial here: http://hokuten.net/2010/drupal-creating-an-e-mail-subscription-block/ in order to build a newsletter subscription block for my website consisting of two simple required fields: name and email. I want to be able to know for sure in my template that the user has successfully submitted a valid form and that their details have been saved to the database. In the tutorial I've been following, the following code in the submit function sets a message which can be read by the template: drupal_set_message('Thanks for subscribing!'); Ideally I need a boolean variable that I can check in the template that tells me that the form has been saved. Any ideas? Categories: Drupal
module for rearranging of nodesIs there any module for rearranging of nodes by using drag and drop options.can any one please tell which one is best???? Categories: Drupal
how to add new topic and date list to left-button block?dear all drupal user I want to add news date and title of the news to a left-content block, my page have three block (1. left 2. center 3. right ) in one page here is example how could i do ? Categories: Drupal
Email ModuleHi, I have to manage the email templates for the dynamic users. I am searching a suitable module for this but did not get any luck so far. Thanks in advance. Regards, Categories: Drupal
Manage Email TemplatesHey Guys, I have to manage the email templates ( i.e HTML content ) from the Administrator of drupal. I will have to send emails to our users daily. Now I am searching for a suitable module through which we can easily able to edit the HTML. Best regards, Categories: Drupal
|
Popular contentDrupal Showcasedrupal security feed |