User login

Using the Banner Module

Agaric is experimenting with the Drupal Banner module, and as some of it is less than intuitive, we thought we'd document some of it here.

  • Don't forget to follow its installation instructions and put those two PHP files in your root directory.
  • And put at least <?php print banner_display(4, 1); ?> in your page.tpl.php where you want the banner to appear, with "4" being the taxonomy term ID of the banner group (see docs, and "1" is the number of banners from that group at a time.)
  • You may be able to administer its settings under admin > settings > banner, but you have to do additional access control settings to see its other admin page under admin > banner (this is Drupal 4.7) .
  • To actually create a banner, you go to create content as you would for any node
  • Under Default Options under /admin/settings/content-types/banner (Drupal 4.7) you probably want to uncheck "Promote to front page" and change Default Comment Settings to disabled.
  • When adding a banner, make note of the banner limits chance setting. If you or someone else has been setting chance to 100 (it defaults to 1), then not changing will mean your banner won't show up very much.
  • If you want to replace one banner with another (so that it always displays), be sure to disable other banners.
  • Don't use Image Assist to upload your banner images (although changing the setting to text would be an interesting experiment...). Unfortunately you cannot disable image_asst for all banner node type textboxes when editing, but you can tell image_asst to only display its helpful link on certain node creation pages. For instance, under "Access Settings" change node/* to node/*/edit</edit> and add:
    <code>node/add/page
    node/add/story
    node/add/blog

    ... and whatever other content types you want to allow using image assist when creating content.

As a final thought, Agaric would be interested in looking into using imagecache with banner module to automatically size banners to fit in their banner area, but for now uploading appropriately sized and shaped images for banners (or just using text!) is recommended.

Agaric is experimenting with the Drupal Banner module, and as some of it is less than intuitive, we thought we'd document some of it here.

  • Don't forget to follow its installation instructions and put those two PHP files in your root directory.
  • And put at least &lt;?php print banner_display(4, 1); ?&gt; in your page.tpl.php where you want the banner to appear, with "4" being the taxonomy term ID of the banner group (see docs, and "1" is the number of banners from that group at a time.)
  • You may be able to administer its settings under admin &gt; settings &gt; banner, but you have to do additional access control settings to see its other admin page under admin &gt; banner (this is Drupal 4.7) .
  • To actually create a banner, you go to create content as you would for any node
  • Under Default Options under /admin/settings/content-types/banner (Drupal 4.7) you probably want to uncheck "Promote to front page" and change Default Comment Settings to disabled.
  • When adding a banner, make note of the banner limits chance setting. If you or someone else has been setting chance to 100 (it defaults to 1), then not changing will mean your banner won't show up very much.
  • If you want to replace one banner with another (so that it always displays), be sure to disable other banners.
  • Don't use Image Assist to upload your banner images (although changing the setting to text would be an interesting experiment...). Unfortunately you cannot disable image_asst for all banner node type textboxes when editing, but you can tell image_asst to only display its helpful link on certain node creation pages. For instance, under "Access Settings" change node/* to node/*/edit</edit> and add:
    <code>node/add/page
    node/add/story
    node/add/blog

    ... and whatever other content types you want to allow using image assist when creating content.

As a final thought, Agaric would be interested in looking into using imagecache with banner module to automatically size banners to fit in their banner area, but for now uploading appropriately sized and shaped images for banners (or just using text!) is recommended.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.