_blogapi_validate_blogid

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 _blogapi_validate_blogid($blogid)

Validate blog ID, which maps to a content type in Drupal.

Only content types configured to work with Blog API are supported.

Rückgabewert

TRUE if the content type is supported and the user has permission to post, or a blogapi_error() XML construct otherwise.

▾ 3 functions call _blogapi_validate_blogid()

blogapi_blogger_get_recent_posts in modules/blogapi/blogapi.module
Blogging API callback. Returns the latest few postings in a user's blog. $bodies TRUE <a href="http://movabletype.org/docs/mtmanual_programmatic.html#item_mt%2EgetRecentPostTitles"> returns a bandwidth-friendly list</a>.
blogapi_blogger_new_post in modules/blogapi/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
blogapi_metaweblog_get_category_list in modules/blogapi/blogapi.module
Blogging API callback. Returns a list of the taxonomy terms that can be associated with a blog node.

Code

modules/blogapi/blogapi.module, line 928

<?php
function _blogapi_validate_blogid($blogid) {
  $types = _blogapi_get_node_types();
  if (in_array($blogid, $types, TRUE)) {
    return TRUE;
  }
  return blogapi_error(t("Blog API module is not configured to support the %type content type, or you don't have sufficient permissions to post this type of content.", array('%type' => $blogid)));
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen