homesupportdrupal 6.22 module

changelog

v1.0 . october, 2011
  • fixed issue with conflict between already existing ‘news’ content type.
v1.0 . september, 2011
  • fixed bug with categories not showing up in admin ui.
  • fixed bug causing post body to delete when edited.
v1.0 . march, 2011
  • fixed a few small bugs

[jump to top]

module requirements

  • drupal 6
  • php5 on your hosting server, with the curl library
  • mysql 5.0 database or newer

[jump to top]

installation

to install this module you’ll first have to copy the module directory into your*drupal installation*/sites/all/modulesfolder. this is located on your server so you will need to use an ftp client.

then, navigate to the module sub section of the administer menu as shown.

once there simply enable the “brafton scheduled feed importer” and save the new configuration.

[jump to top]

configuration

to configure this module navigate to the site configuration section of the administer menu.

here you will need to enter the unique api key that was given to you. first, select the feed url base for your product. if you are using content from brafton, use http://api.brafton.com/. next, enter your unique 36 character api key. once you have done this, click “save configuration.”

at this point your articles will be updated every time your site runs cron. normally this is set to occur once every few hours automatically. to run cron manually you must navigate to the status report section of the reports menu.

the articles will be imported as a custom content type called “news article.” their drupal machine name for this type is “b_news.” by default, a page is created with a stream of your latest articles at “yourdomain.com/b_news” and a headlines block with titles and links to your 5 most recent articles is added to your admin blocks menu.

[jump to top]

image handling

download and enable thecontent templatemodule for drupal. add the following code to either the body or teaser sections of the news article content type.

$result_obj = db_query("select large_url from {brafton_pictures} where nid = $node->nid"); $result = db_fetch_array($result_obj); $img_url = $result['large_url']; print "";

[jump to top]

category links in posts

if you are having issues displaying category links in individual posts, download and enable thecontent templatemodule for drupal. add the following code to the body section of the news article content type.

$term = db_query('select t.name, t.tid from {taxonomy_index} n left join {taxonomy_term_data} t on (n.tid = t.tid) where n.nid = :nid', array(':nid' => $node->nid)); $tax = ''; foreach ($term as $record) { $tax .= l($record->name, 'taxonomy/term/' . $record->tid) . ' '; } print $tax;