Help needed - D7 insert Node+Menu with PHP

hello,

on d6 i used following code to post into a php enabled node, this is a "1 time usage snipped", it creates pages and menu from 1 array.

Great Idea for Website

I have a great idea for a website. I believe it will be very popular (not as much as facebook or twitter, but as much as popular sports sites). I also think it is doable using Drupal. The problem is I don't have web designing idea. If anyone having good knowledge is interested, please provide me a way to contact you personally.

A view with sort tabs

Hi,

I wonder how to get sort criteria located and selected in ajax tabs of a view on Drupal 7 with Views 3?
Imagine a list of news, sorted by date (Newest). But we need also to sort them by number of voices (Best), and maybe - by count of comments (Popular) - just in place, via ajax, by clicking corresponding Tabs: Newest, Best, Popular. How to do this?
Example: http://www.onlinedisk.ru/view/607546

Making new content-type not appear in navigation by default

I'm new on Drupal but I've looked and can't find an answer to this.

I've created a new content type called 'biography'. When I add a new biography content-type page it appears in the main navigation. I want it so that by default it does not appear in the navigation. How can I do this?

Thanks in advance.

inserting data into a node.

Hi all

( delete part of earlier post )

Okay maybe not the best post ill try to explain what i am doing.

I need to migrate a website from plain php to drupal. This web site pulls its information every hour from a database in XML format. I have already written a parser for it so i have the data in a page in drupal. This data is stored in a array.

I now need to import this data from this array to the drupal data base. I have created a content type that is correct. The data i am getting is checked before it goes in the database on the other end so i do not need to check it.

I have looked at drupal_form_submit but i do not need it checked. So node_save should do it to.
I do not have any data from this type in my database. I checked if i had a NID but i do not. I do have a node type so i shoud use that.

<?php
  $title = 'Test Title';
  

  $node = new stdClass();
  $node = array();
  $node['type'] = 'content_type'; // put my content my content type in here
  $node['uid'] = 1;
  $node['title'] = $title;


  if ($node = node_submit($node)) {
    node_save($node);
  }
?>

I am getting errors like --->
Warning: Attempt to assign property of non-object in node_submit() (line 1019
Notice: Undefined index: field_name in _field_invoke()

Drupal 7 and PHP version

My webhost has PHP 5.2.13... I realise this is a previous version to the one required by Drupal 7... but is there anything I can do about that? I would like to use Drupal 7.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x