where are the secondary links in cvs-4.7?

I decided to fiddle with cvs-4.7 and I must say it's pretty cool. However, using the default php template/bluemarine combo, I was confronted with a new menu system for primary and secondary links. In 'menus' there are multiple 'primary' and 'secondary' links headings. Can someone please explain how all this works? Also, I managed to get the primary links up and working, but after a lot of messing about I still cannot get the secondary links working. How can I do this? Are they still supported in cvs-4.7?

thanks,

larry

Menu callback to produce a form - how exactly?

Hi

I am trying to put a menu item up (successful) which when clicked on presents a form. The form will be something for users to select an item off (basically volunteer for an option).

I don't understand exactly how to get this right - could someone just point me in the right direction - here is where I am:

I added a menu item:

function fhsstadmin_menu($may_cache) {
  $items = array();
    $items[] = array('path' => 'assignments', 'title' => t('Assignments'),
      'callback' => 'fhsstadmin_assignments',
      'type' => MENU_CALLBACK,
      'access' => user_access('access nodes'));
}
  return $items;
}

I am not sure exactly what type should be but it shows up and when I click on Assignments it does call my function:

function fhsstadmin_assignments()
{
// return a list of all nodes not assigned to anybody i.e. assigned to nobody
//step 1 - get nobody's uid
$querynobody = "SELECT uid FROM users WHERE name = 'nobody'";
$nobodyobject = db_fetch_object(db_query($querynobody));
$query="SELECT * FROM node WHERE uid = $nobodyobject->uid";
$queryResult=db_query($query);
$options = array();
$string = "";
while ($links = db_fetch_object($queryResult))
{
$options["$links->nid"] = $links->title;
$string .= "$links->nid";
}
$form['fhsstadmin_assignment'] = array(
'#type' => 'radios',
'#title' => t('Choose the section you would like to start with:'),

& amp; in url problem

In my site, i have a forum node, with comments spanning multiple pages. However, the pages in the pager bar gives a link such as this:

http://localhost/~xxxxxx/drupal-cvs/?q=node/8& amp;comments_per_page=10& amp;page=1 (without spaces)

clicking on those link brings the page back to the same first page.

i suspected its the & causing the problems and sure enough, commening $uri = htmlspecialchars($uri, ENT_QUOTES); from check_url($uri) makes a usable link such as this

how stable is drupal 4.7? should I use it?

just wondering how stable is 4.7? should I give it a try? tks

How to display categories in separate block

How do I get categories listed in a separate block. To see an example visit http://performancing.com/ and look at the side bar on the right. It includes a index page and the main categories.

Thanks
Marcel
http://www.BlogNetworkForum.com
http://Diarists.com

Implementation of _user chokes on 'insert' - probably really simple error

Hi

I have implemented _user for my module to ask users a specific question and store the result in my own table. My form question shows up perfectly (I think - it looks correct anyway). My code chokes when I actually do the
registration and submit. It breaks on the database insert in the user module (not mine) but my insert must be
the problem. Here is my little _user:

function fhsstadmin_user($op, &$edit, &$user, $category = NULL)
{
  $books = _findbooks();  // return list of books 
  switch($op)
 {
    case 'register':
      $form['fhsstadmin-initialbook'] = array(
      '#type' => 'radios',
      '#title' => t('Choose the book you would like to start with:'),
      '#options' => $books);
   break;
   case 'insert':
     db_query("INSERT INTO fhsstadmin_userbooks (uid, bookparentid) VALUES (%d, %d)",$user->uid,$edit['fhsstadmin-initialbook']);
     $edit['fhsstadmin-initialbook'] = NULL;
   break;
 } // end switch
return $form;
}

I would really appreciate any advice. Its probably a trivial issue for an expert but I really can't see whats wrong and I think I've followed what is defined on: http://drupaldocs.org/api/head/function/hook_user

I have added the error message for completeness:

user error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0, pass, init, status, created, uid) VALUES ('fred', 'marknewlyn query: INSERT INTO users (name, mail, 0, pass, init, status, created, uid) VALUES ('fred', 'marknewlyn@gmail.com', '37693cfc748049e45d87b8c7d8b9aacd', '364aacd64f75ca82e0c373bc40500c6c', 'marknewlyn@gmail.com', '1', '1133714662', '13') in /var/www/fhsstadmin/includes/database.mysql.inc on line 108.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x