TinyMCE not working correctly

I was trying to create a new page on my site using TinyMCE editor that I obtained from CVS and the 2.0.3 TinyMCE engine. The page that I created had two main problems that I noticed.

1) The paragraph formating didn't work. The page was laid out with several paragraphs in the editor, but when the page was submitted, it came out as one long paragraph.

2) I had inserted an image using the insert image feature of the editor. The insert image dialog box opened and I filled in the boxes with the necessary information. But when I sumbitted the page, there was no image.

file download

I have an MP3 file and I want to send to to the user's browser. What is the most drupalish way of doing this?

ATM I am trying this one out:

Rebuilding node_comment_statistics

One of my sites recently got a heavy dose of comment spam from an anonymous user who found his way around spam.module. Since deleting comments one by one was way too much hassle, I ended up deleting the comments through a simple MySQL call, directly to the database, screwing up the comment counts etc in the node_comment_statistics table.

I had a look around drupal.org but could not find info on manually rebuilding the node_comment_statistics table, untill I found some neat MySQL calls in the wp2drupal script on ninjafish.org.

Here's a working excerpt I used, and I hope someday it saves someone's node_comment_statistics. To run this script, I created a new page with a user with PHP input permissions. I did not actually post this page to the site, but used 'preview' to execute the PHP statements.

Be sure to back up your database before executing the PHP below!

<?php
db_query("DELETE FROM node_comment_statistics");

$nodes = db_query("SELECT DISTINCT nid,max(cid) FROM comments GROUP BY nid");
while ($m = db_fetch_object($nodes)) {
$nid = $m->nid;
$cid = $m->{"max(cid)"};

$lastcomments = db_query("SELECT uid,name,timestamp FROM comments WHERE cid=$cid");
$n = db_fetch_object($lastcomments);
$uid = $n->uid;
$name = $n->name;
$timestamp = $n->timestamp;

$counts = db_query("SELECT count(*) FROM comments WHERE status=0 AND nid=$nid");

5 Latest flexinode blocks

What code should I use in a block to show 5 latest flexinodes with the choosen types of fileds?

Problem installing

Hi all,

trying to get drupal to work still.

using Uniform server, already tried xampp

now i keep on getting the following message


MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)

Any sugestions! Should i start again?

This is driving me crazy

Pleeeeeeease Help!!!!!

#button_type: submit vs. button

function theme_submit($element) {
  return theme('button', $element);
}

function theme_button($element) {
  return '<input type="submit" ...  />\n";
}

I'm unable to create a simple button with form-api! All buttons are automatically of type="submit".
Form.inc contains to functions for theming a button (look above):
1. theme_submit() what creates a type="submit" button. Perfect.
2. theme_button() what also create a submit button. Why?
I think theme_button() should create a type="button" button instead, right?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x