"node/add" => "/blog/1" problem fixed.

fusianasan - December 9, 2008 - 17:12
Project:Windows Live Writer BlogAPI
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

<?php
function wlw_blogapi_blogger_get_users_blogs($appid, $username, $password) {

 
$user = wlw_blogapi_validate_user($username, $password);
  if (
$user->uid) {
   
$types = _wlw_blogapi_get_node_types();
   
$structs = array();
    foreach (
$types as $type) {
      if (
strcmp($type, 'blog') == 0) {
         
$url = 'blog/'. $user->uid;
         
$blogName $user->name .': '. $type;
      }
      else {
         
$url = 'node/';
         
$blogName = $type;
      }
   
     
$structs[] = array('url' => url($url, array('absolute' => TRUE)), 'blogid' => $type, 'blogName' => $blogName);
    }
    return
$structs;
  }
  else {
    return
wlw_blogapi_error($user);
  }
}
?>

I found "blog/" literal in you code.
but page of "story" or "page" and user-defined ContentTypes are "node".
so, I fix it.

This fix makes style retrieval success.
Lucky!! :-)

I think ContentType.name is more better than ContentType.type for $blogName.
but I don't know grammer of php language. and tired...
so, please support it. sorry.

and I think $blogName and $url of ContentTypes from module are to get from the module, rather than literal.
... Is there any API ? I don't know... orz...

---
I send my contact info from contact form, but no responce... busy?
and I thought here is more proper than corey blog.

#1

jrglasgow - December 10, 2008 - 02:24

This is the proper place to bring these things up.

I made your changes, they seem to work fine for my tests.

I committed the changes and they are in the most recent release 6.x-1.3

#2

jrglasgow - December 10, 2008 - 02:36
Status:active» fixed

#3

System Message - December 24, 2008 - 02:41
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.