Converting to 4.7

What are the differances in the MySQL database between 4.6 and 4.7 that would effect a migrating script?

I am trying to convert phpBB 2.0.11 to Drupal 4.7. I've been trying to update the MySQL conversion script to drupal 4.7. It seems as the users and forum containers get converted great. The problem I'm having is with the forum topics and comments. When you view the forum container, it displays the correct number of topics and posts for each forum. Then when you click on the individual forums, all the posts are messed up. Most of them say that the topic has been moved. When I'm able to click on an individual topic, it contains posts from other topics.

Can someone please help me find the problem? The script I am currently using (not yet working, see above) is here:


#
# Written by Feodor (feodor [at] mundo.ru)
#
# Modified for drupal 4.5.2 and phpbb 2.0.11-2.0.13
# by Alexander Mikhailian
#
# This script makes an assumption that phpbb and drupal tables are kept in
# one and the same database. Phpbb tables are expected to have the prefix
# phpbb_ and drupal tables are expected to have the prefix
#
# If phpBB forum use CP1251 (or another) encoding, the tables must be converted
# into UTF8. If version of MySQL less then 4.1 "iconv" command can be used for
# convertion of exported tables into UTF8.
#
# Example:
# iconv -fcp1251 -tutf8 < phpbb2.sql > phpbb2_utf-8.sql

Create Pages for Categories?

I am having some difficulty understanding how to create landing pages for specific categories within my site. I understand that it is possible to see all posts for a particular category by going to taxonomy/term/1, but this isn't what I want. What I want is basically a page that is all about that topic, so that all of the blocks are now about that topic.

Let's take the A.V. Club for example. When you click on DVD you get a page that has blocks that are all about DVDs, including Same goes for Music, Cinema, etc. The Onion site works the same way, when you click on Politics, you get a page with a ton of blocks all about Politics, including New, Featured Politics, Opinions, In Brief, etc.

What is the best way of building out topical category pages like this? I've thought of using Organic Groups since groups can have their own homepage, but this doesn't seem to be what OG was built for. Should I be using the new category module to do this? I've read throught the documentation for category module, and I still don't get what it does exactly. I just feel like I must be missing something. Should I just create specific blocks for each of the main categories I want to have pages for?

form api: return $form vs. $output

Hi!

I already read the handbook pages about 4.7's new form api, but I still dont understand how to use it
correctly. I wrote a simple test module to play with the api:

function formtest_settings() {

  $form['global'] = array(
    '#type' => 'fieldset',
    '#title' => t('form_group'),
  );

  $form['global']['formtest_enable'] = array(
    '#type' => 'radios',
    '#title' => t('Test Radios'),
    '#default_value' => variable_get('formtest_enable', 0),
    '#options' => array(t('Off'), t('On')),
  );  
  
  $options = array();
  $options[0] = "Choose Option";
  $options[1] = "Option A";
  $options[2] = "Option B";
  
  $form['global']['formtest_method'] = array(
    '#type' => 'select',
    '#title' => t('Test Select'),
    '#default_value' => 1,
    '#options' => $options,
    '#description' => t('Sample Desciption'),
  );
  
  //$output = form_render($form);
  //$output = drupal_get_form('testform', $form);
  //return $output;
  return $form;
  
}

The code works nicely with return $form, but when I try one of the other lines and return $output
I receive "Fatal error: Cannot use string offset as an array in ...\system.module on line 728"
Whats wrong with my code? What function should I use form_render or drupal_get_form?

As long I must use return $form, I'm unable to apply special format to my output,
e.g. $output = theme('table', $header, $rows) is not possible then.

Hoping for help, Thilo

Problems installing Beta 3 on XAMPP

1. Copied files
2. Created MySQL db and loaded it with database.sql
3. Edited settings.php with the db username, password, address and site address
4. Tried accessing site and got:

My implementation of inline forms for Drupal 4.7

Hello everybody =)

I'm developing an ajax widget that runs on Drupal 4.7 to easily implement inline forms (note: this is different from autocomplete. A good inline form example is http://www.baekdal.com/x/xmlhttprequest/). It is already basically running, but using xajax as library (along with the xajax module from CVS). I don't have the primary intention to be merged to the core (and that's why I'm using xajax -- and we know that 3rd party libraries don't get merged into the core). I would like to know if 1) is this something that interests everybody and deserves to be developed using the core stuff for ajax instead of xajax and 2) is there anobody here already working with inline forms. If somebody thinks that this will be useful to be published, let me know =)

Currently, to make your form "inline", you need to setup a 3rd callback called _inline, that will handle the field changes. So, let's suppose that you have a simple form with : "Name", "E-mail", "Login" and "Password" and you want to let the user know if the login is already taken in real time (as in gmail and others), and your form is called "user_register".

drupal_get_form('user_register', $formfields);

and you have the default callbacks (_submit and _validate)

function user_register_submit($form_id, $values) { }
function user_register_validate($form_id, $values) { }

and on my model, you create a 3rd one

Accessing $node fields from a block

Hi everybody..

is there a smarter way to access $node fields from a block
than this?

if(arg(0)=='node' && is_numeric(arg(1))) {
    if($node = node_load(arg(1))) {
....
  }
}

The problem is that using this while browsing a node page
will duplicate each query which load the node fields.
This is not needed becouse them are already been loaded once.

Does someone has ideas?

Thanks

Fabio

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x