drupal

How do you configure TinyMCE so that it doesnt display BB code?

Hi! I'm having trouble with Tiny MCE 3.2.5. Im using Drupal 6.1.13 and for someone reason when i come to use TinyWYISYG editor, and alter the text to different fonts it always displays it in BB code. I've tried just using HTML source code, but I still get the same problem. Tried unchecking the boxes on the profile settings so that it do...

drupal 6: how to get data from a custom module in to a template file

im using a custom module to create the contents of my homepage at example.com/frontpage. in the module i run a query that gets the data i need, in an array. when i return theme('page', $my_array) i get the "homepage inside the homepage", ie the default drupal logo and sitename is displayed a second time in the main content area. what'...

PHP: Truncate text at word boundaries

Does anybody have the exact name of the function Drupal uses to turn the following string: "Hello, how are you. Some more text." into "Hello, how..." I.e. The function that's used to cut off a sentence after x words, and then add an elipsis. Alternatively, if anybody has a php snippet that does this, that would be great too! ...

Drupal: Upgrade Node strategy

I effectively want two nodes: Normal Node Premium Node The only difference will be that the premium node can take more images and a few other features. What is the best strategy to go about this? have two distinct nodes with the differences have one nodes and somehow find a to apply an UPGRADED attribute to it? I would prefer (b)...

Drupal: Views, blocks and template?

I have a block view called: "MYVIEW" And I have a region on my template called: "right". What must I call the template file to edit this? The following does not work: block-MYVIEW.tpl.php block-right--MYVIEW.tpl.php ...

Drupal: Staying Organized with Module Changes

The deeper I get with Drupal the more I have to make changes to code within other people's modules. These are usually small changes, and so far it doesn't make sense to rewrite the module's functionality for my own needs. I'm trying not to make any modifications to Drupal core since that just seems like asking for trouble. But sooner ...

Drupal - logic of the template.php file

Hi guys, I have spent a good proportion of time today looking into expanding a drupal site I inherited, convinced that the issues I face were down to my bespoke SQL query. I have since realised that the SQL is ok (checked it in PHPMYadmin and got it executing of sorts within the drupal website). So I am happy I am getting all the resul...

How can I programatically add images to a drupal node?

I'm using Drupal 6.x and I'm writing a php class that will grab an RSS feed and insert it as nodes. The problem I'm having is that the RSS feed comes with images, and I cannot figure out how to insert them properly. This page has some information but it doesn't work. I create and save the image to the server, and then I add it to the ...

Drupal for users creating "sub"-users?

Hi, I'm wondering if Drupal is the right choice for me. I need to create a solution where my "primary"-users should have the capability to create their "secondary"-users and provide access to certain paid subscriptions. Is that easily doable in Drupal, or am I better off not using that and looking elsewhere? (Alternative was to integrat...

Facebook API and Drupal

I'm trying to use the drupal module called FB (http://drupal.org/project/fb). I just want to know if I'm on the right track. I've installed the module, setup the keys and so forth. All I want is the following: To make a call into facebook Retrieve all MY notes Retrieve all the COMMENTS on my notes So my questions are: Is it necessa...

Where does Drupal store NODE BODY content?

In the node table, you'll find everything EXCEPT the actual body. Where can I find this body text? I'm assuming it's being stored as a blob somewhere. ...

Where does Drupal store NODE data?

This is a follow up to my previous question: http://stackoverflow.com/questions/1284476/where-does-drupal-store-node-body-content Now, I tried adding values into node and node-revision, but still the node data is not showing. So, obviously more data is stored somewhere else. So basically, I want to know, which tables are affected when ...

Drupal 6 Views 2: PHP Snippets

I am using Views 2 to get information from my Drupal 6 site. After getting the data, I want to use a little PHP to do some calculations that are unavailable through Views + Views calc. What is the best way to go about doing this? I could alter the "Header" or "Footer" text, set the input format to "PHP Code", and try to access the $view...

Get Drupal Paths During node 'insert' operation with Pathauto enabled?

I'm writing a module that interfaces with Google Base. It needs to insert a link to the page that the item is on, however, this item has no path until pathauto runs. How can I either make sure pathauto runs its hooks before my module does, or get the path that will result from pathauto?. The solution needs to be generic enough to wo...

Drupal Coding Standards for Commercial Use?

I'm busy working on book/document that will be used for commercial use. I want to include the Drupal Coding Standards in this as the one section deals with drupal in depth. Am I allowed to copy and paste the coding standards and place it in my book as an appendix? Must I get permission? ...

Drupal with Texy and GeSHi

I have my Drupal installation set up to use both Texy for markup (hand-writing HTML soon gets tedious) and GeSHi for syntax highlighting (which is about the only syntax highlighter I found for Drupal at that time). The problem now is that since the last update to Texy seemingly nothing really works anymore. I spend a long time trying to...

Drupal 6: Programmatically Altering User Values (how do you use profile_save_profile??)

I've been trying to figure this out for quite some time without success. foreach ($users as $user) { //list of users to act on $by_user = views_get_view_result('attendance', 'page_3', array($user->uid)); //view containing info about this user $edit = array('profile_attendance_short_term' => substr(count($by_user) / count($general), 0,...

Why does the '#weight' property sometimes not have any effect in Drupal forms?

Hello, I'm trying to create a node form for a custom type. I have organic groups and taxonomy both enabled, but want their elements to come out in a non-standard order. So I've implemented hook_form_alter and set the #weight property of the og_nodeapi subarray to -1000, but it still goes after taxonomy and menu. I even tried changing the...

Cron on XAMPP (windows)

I am developing a site locally using xampp. I would like to configure cron, so the dev environment is the same as the production environment. However, my system is windows vista. Is there any way to do this, or am I forced to accept that my dev and production environments will be forks? ...

Why do images disappear?

I am developing a site with Drupal. I noticed that sometimes an image that was showing perfectly alright disappear all of a sudden, even though it is physically present in the file directory. And yet, it cannot be reached directly via url, which is why it doesn't show up on the page. Entering a direct url into the browser like this: ww...