I've written a beta version of "headlines.module", which enables users to create a "headlines" page highlighting the top items on their site. I'm hoping it will be useful for Civicspace users who want to create their own online newspapers. I'd appreciate it if people could take a look and give me some feedback.
In addition to headlines.module, I've created a couple of other modules that work alongside it, called "splash.module" (which facilitates the creation of splash pages for a site) and "abstract.module" (which makes it possible to create brief summary abstracts of node contents. This is the same "abstract.module" that I posted and discussed here a couple of weeks ago.) You can download all three modules from my website, at the following URLs:
http://www.prwatch.org/headlines.tar.gz
http://www.prwatch.org/abstract.tar.gz
http://www.prwatch.org/splash.tar.gz
In addition, you can try out a demo at the following URL:
http://www.prwatch.org/civicspace4
This is a testing version of my site, so don't worry about messing things up. To see some displays of the headlines, try the following URLs:
http://www.prwatch.org/civicspace4/headlines
http://www.prwatch.org/civicspace4/splash/doodle
http://www.prwatch.org/civicspace4/splash/times
The first URL above will display a headlines section called "Important Stuff," which includes the topics "politics," "public relations," "war/peace," "environment" and "human rights."
The second URL will display the same headlines section, using a layout I created using the "splash" module and mimicking the layout of Google News.
The third URL displays the same headlines section, this time mimicking the layout of the New York Times.
Finally, you can experiment with administering the headlines yourself, at:
http://www.prwatch.org/civicspace4/admin/headlines
There are a couple of bugs that I'm aware of, but this should be good enough for testing and feedback purposes. Here are some specific questions:
(1) Is the interface for headlines administration clear enough for users to understand? If not, how should it be changed?
(2) As I've discussed here previously, "abstract.module" is very similar to an existing Drupal module called "excerpt.module." The difference is that "abstract.module" requires adding a table to the database, whereas excerpt.module doesn't. Excerpt.module gets away with this by using the "teaser" field in the node table to store its excerpts. I've chosen to store this information in a separate table because some users may want to have teasers *and* to have separate brief summaries. (In my sample headlines page, the "abstract_summary" field appears directly under the headline and is typically just one or two short sentences. For example, the headline "Inaugural Product Placement" in my demo has an abstract_summary that says, "Cadillac gets some free advertising out of the U.S. presidential inauguration." So...my question regarding abstract.module is: Given the similarity to excerpt.module, would it be best to (1) try to talk the author of excerpt.module into incorporating my functionality into his module; (2) create a separate abstract.module, which some people might find useful for doing things other than what I'm doing with it on headlines pages; or (3) get rid of abstract.module entirely, and incorporate its functionality directly into headlines.module?
(3) Finally, "splash.module" is something that I threw together quickly, mostly as a proof of concept to show a couple of different ways that headlines could be made to display. However, it might have some uses beyond display of headlines. For example, here's the URL to a splash page that I created which looks identical to the home page of my brother Kenny's website:
http://www.prwatch.org/civicspace4/splash/kenny
With some cleaning up, therefore, I think splash.module might be a useful addition to Drupal, but I'd like to know what people think of the concept and design. Is there another way to code it that might be better?
Those are my questions for now. Thanks in advance for your attention and feedback.
--Sheldon Rampton
This is unbelievable Sheldon! We've been batting around ideas for how
to tackle this exact issue for months. What you've built gets us most
of the way there.
What do people think about including them in a CivicSpace release when
they are stable?
-Zack
http://www.civicspacelabs.org
http://www.zacker.org
On Jan 25, 2005, at 10:53 AM, Sheldon Rampton wrote:
>
> I've written a beta version of "headlines.module", which enables users
> to create a "headlines" page highlighting the top items on their site.
> I'm hoping it will be useful for Civicspace users who want to create
> their own online newspapers. I'd appreciate it if people could take a
> look and give me some feedback.
>
> In addition to headlines.module, I've created a couple of other
> modules that work alongside it, called "splash.module" (which
> facilitates the creation of splash pages for a site) and
> "abstract.module" (which makes it possible to create brief summary
> abstracts of node contents. This is the same "abstract.module" that I
> posted and discussed here a couple of weeks ago.) You can download all
> three modules from my website, at the following URLs:
>
> http://www.prwatch.org/headlines.tar.gz
> http://www.prwatch.org/abstract.tar.gz
> http://www.prwatch.org/splash.tar.gz
>
> In addition, you can try out a demo at the following URL:
>
> http://www.prwatch.org/civicspace4
>
> This is a testing version of my site, so don't worry about messing
> things up. To see some displays of the headlines, try the following
> URLs:
>
> http://www.prwatch.org/civicspace4/headlines
> http://www.prwatch.org/civicspace4/splash/doodle
> http://www.prwatch.org/civicspace4/splash/times
>
> The first URL above will display a headlines section called "Important
> Stuff," which includes the topics "politics," "public relations,"
> "war/peace," "environment" and "human rights."
>
> The second URL will display the same headlines section, using a layout
> I created using the "splash" module and mimicking the layout of Google
> News.
>
> The third URL displays the same headlines section, this time mimicking
> the layout of the New York Times.
>
> Finally, you can experiment with administering the headlines yourself,
> at:
>
> http://www.prwatch.org/civicspace4/admin/headlines
>
> There are a couple of bugs that I'm aware of, but this should be good
> enough for testing and feedback purposes. Here are some specific
> questions:
>
> (1) Is the interface for headlines administration clear enough for
> users to understand? If not, how should it be changed?
>
> (2) As I've discussed here previously, "abstract.module" is very
> similar to an existing Drupal module called "excerpt.module." The
> difference is that "abstract.module" requires adding a table to the
> database, whereas excerpt.module doesn't. Excerpt.module gets away
> with this by using the "teaser" field in the node table to store its
> excerpts. I've chosen to store this information in a separate table
> because some users may want to have teasers *and* to have separate
> brief summaries. (In my sample headlines page, the "abstract_summary"
> field appears directly under the headline and is typically just one or
> two short sentences. For example, the headline "Inaugural Product
> Placement" in my demo has an abstract_summary that says, "Cadillac
> gets some free advertising out of the U.S. presidential inauguration."
> So...my question regarding abstract.module is: Given the similarity to
> excerpt.module, would it be best to (1) try to talk the author of
> excerpt.module into incorporating my !
> functionality into his module; (2) create a separate abstract.module,
> which some people might find useful for doing things other than what
> I'm doing with it on headlines pages; or (3) get rid of
> abstract.module entirely, and incorporate its functionality directly
> into headlines.module?
>
> (3) Finally, "splash.module" is something that I threw together
> quickly, mostly as a proof of concept to show a couple of different
> ways that headlines could be made to display. However, it might have
> some uses beyond display of headlines. For example, here's the URL to
> a splash page that I created which looks identical to the home page of
> my brother Kenny's website:
>
> http://www.prwatch.org/civicspace4/splash/kenny
>
> With some cleaning up, therefore, I think splash.module might be a
> useful addition to Drupal, but I'd like to know what people think of
> the concept and design. Is there another way to code it that might be
> better?
>
> Those are my questions for now. Thanks in advance for your attention
> and feedback.
>
> --Sheldon Rampton
>
Ack, wrong list, my bad.
-Zack
http://www.civicspacelabs.org
http://www.zacker.org
On Jan 25, 2005, at 6:34 PM, Zack Rosen wrote:
> This is unbelievable Sheldon! We've been batting around ideas for how
> to tackle this exact issue for months. What you've built gets us most
> of the way there.
>
> What do people think about including them in a CivicSpace release when
> they are stable?
>
> -Zack
>
> http://www.civicspacelabs.org
> http://www.zacker.org
Nice work. I don't see much difference between abstract and excerpt as excerpt does allow you an abstract that shows up on summary pages only. It won't show up on the node page but that isn't a big deal. However, in my experience excerpt was not consistent at auto-filling for the summary page if no excerpt was specified.
I've only checked out the headlines and splash on your site, but could you layout some of the differences between those modules and the summary and front_page modules already on drupal?
Jasonwhat asked, "Could you layout some of the differences between those modules and the summary and front_page modules already on drupal?"
The summary module on Drupal isn't a headlines module. It generates page of that displays taxonomy terms. Clicking on a term takes you to a page that displays teaser-version nodes that have been tagged with that term. That's not the same thing as a headlines page.
My headlines module also gives administrators a number of options for selecting and displaying headlines. You can manually select individual nodes for inclusion, and you can also set the module to automatically include the top n nodes for a topic (based on a ranking system that first selects nodes marked "sticky," and then by most-recently-created). You can also use weighting to control the order in which the manually-selected nodes appear. Also, my module organizes content within a headlines page by "topic" rather than by taxonomy term. (A topic can be a cluster of taxonomy terms, based on the taxonomy tree. For example, you might have a vocabulary with the term "sports" that in turn has child terms such as "baseball, football, tennis, rugby." In my module, any of those terms would qualify an item for inclusion under the topic "sports.")
My headlines module also makes it possible to have more than one headlines page. If you want to imitate a typical newspaper, for example, you could have separate sections for "local," "state," "national," "international," "sports," "health," "entertainment," etc.
Finally, headlines module includes a "headlines_build_section" function that can be used by other modules or by PHPtemplate to display the headlines using whatever layout someone cares to create. The summary module can't do that.
As for the front_page module, its function is indeed fairly similar to my "splash" module, but the splash module is more powerful. Front_page lets you paste the HTML for a page into a form, and that HTML is what displays if you go to path "front_page." For that purpose, it seems to works fine. Here, for example, is the URL to a copy of my brother Kenny's home page that I created on my personal website using front_page:
http://www.sheldonrampton.com/front_page
One of front_page's limitations, however, is that the user can only use it to create two "special" front pages: one for logged-in users, and one for users who are not logged in. My "splash" module would let site administrators create as many special pages as they want, simply by adding additional layout files to the splash directory. In my demo version, I've created three: layout_kenny.inc, layout_times.inc, and layout_doodle.inc.
Another, more important difference is that my splash module makes it possible to use PHP as well as HTML when creating special pages. This is necessary when creating headline display pages that use my headlines module. The PHP in layout_times.inc and layout_doodle.inc both call the function headlines_build_section() function and then use logical branching and iteration to display each headline. The idea here is that headlines.module does the heavy lifting of administering and selecting headlines, but splash.module provides an easy way to layout and style the headlines however the site administrator sees fit.
------------------------
Sheldon Rampton
Research Director, Center for Media and Democracy
http://www.prwatch.org
http://www.disinfopedia.org
http://www.sheldonrampton.com
Great module Sheldon. I really like it. However, I had trouble getting it to display much. I created one section and that seemed to display fine. Then I created a second section, on all the splash views the first section had disappeared. I didn't know how to get it back or specify which section I was viewing. Then I jut deleted the second section. Now nothing showed up on any of the splash pages. Other than that I gotta say that it is amazing how you integrated this so that I can just put whatever html I want around the headlines. You can do some pretty cool stuff.
One thing I'd like to see is the ability to display node types. that is one thing about summary module I liked, was I could easily say show me 3 blogs on the front page.
Keep up the good work and I hope I can get the bugs out and really use this.
Hi, Jason. Thanks for doing the testing. The problem you're describing is a known bug that is happening to me as well. I'll work on getting that fixed. (It was working fine awhile ago, but then I made a few changes and that must be how the bug snuck in.)
Is there anyone else who'd care to work with me on cleaning this up and getting it ready for public release?
------------------------
Sheldon Rampton
Research Director, Center for Media and Democracy
http://www.prwatch.org
http://www.disinfopedia.org
http://www.sheldonrampton.com
Hey Sheldon,
Just wondering if you've been succesful with any bug fixes. I'm excited to give it another go and really try to get it integrated.
Funny you should ask. I've just been finishing up the revisions. I've uploaded the changed files to my site. As before, they can be downloaded at:
http://www.prwatch.org/headlines.tar.gz
http://www.prwatch.org/abstract.tar.gz
http://www.prwatch.org/splash.tar.gz
I don't think I've made any changes to abstract.module, but in addition to bug fixes, I've coded some additional functionality into headlines.module and splash.module. If you've previously tried installing headlines.module, to reinstall you'll need to drop the tables headlines_section, headlines_topic and headlines and then recreate them using the included file headlines.sql. (You won't need to do anything like this for splash.module, which doesn't use any database tables.)
The new features I've added to headlines.module are:
(1) Users with "administer headlines" permission can now edit headline sections to specify which node types they want to associate with that section.
(2) Headline administrators can also specify a time frame covered by the headline section. For example, a time frame of "30 days" means that headlines will be selected from items that have been posted within the last 30 days. Other possibilities could be "2 years," "3 months," "1 week," etc. (If no time frame is specified, there is no limit.)
(3) The module also creates sidebar blocks for each section, which can be used as part of a site's theme (for examples, see below).
I've also added some functionality to "splash.module" based on "front_page.module" (not to be confused with "frontpage.module"). Written by a fellow in Ireland named Jason, "front_page.module" provides a quick way that someone can create a splash page by simply pasting the HTML into a text field in admin/settings/front_page. I was hoping that Jason would agree to accept my version of "splash" as a patch to "front_page," but after corresponding with him for a couple of days by email, I've concluded that this isn't likely to happen.
Like "front_page," splash.module is intended to provide an easy way for someone to create a page or several pages that bypass the page theme for the rest of the site. However, front_page *only* lets users create a single HTML page, whereas splash.module uses a template layout scheme which supports the creation of multiple layouts using PHP as well as HTML.
I also have a copy of our website where I've been testing my modules. If you'd like to see them in action, go to the following URL:
http://www.prwatch.org/civicspace2/admin/headlines
This shows you a page that site administrators use to create and edit headline sections. (To facilitate testing, I've temporarily given "administer headlines" permission to all users. If you want to experiment with the settings for for splash.module and abstract.module, however, you'll need to install them on your site.)
To see the headline pages as they would appear to site visitors, go to:
http://www.prwatch.org/civicspace2/headlines
http://www.prwatch.org/civicspace2/headlines/1
The first URL points to the headlines display of a section I've created called "Important Stuff." The second URL points to another section called "Secondary stuff."
I've used "splash.module" to create some other headline page layouts. You can see examples at the following URLs:
http://www.prwatch.org/civicspace2/splash/doodle
http://www.prwatch.org/civicspace2/splash/doodle/1
http://www.prwatch.org/civicspace2/splash/times
http://www.prwatch.org/civicspace2/splash/times/1
The two "doodle" pages show how "Important Stuff" and "Secondary Stuff" display within a layout that I've modeled after Google News. The two "times" pages show how they display within a layout loosely modeled after the New York Times. The Doodle pages bypass my site theme entirely; the Times pages use the site theme but enable a two-column layout for part of the page. (Note also that my site theme places blocks for "Important Stuff" and "Secondary Stuff" in the left sidebar.)
Finally, the following URLs show a few other splash pages:
http://www.prwatch.org/civicspace2/splash
http://www.prwatch.org/civicspace2/splash/times2
http://www.prwatch.org/civicspace2/splash/hello
http://www.prwatch.org/civicspace2/splash/kenny
The first URL (splash) shows a very basic page that simply says "Hello, world," which was created by simply pasting the HTML into a textarea in admin/settings/splash. The second URL (splash/times2) shows another headlines display, also modeled after the New York Times website but this time bypassing the site theme. The next URL (splash/hello) displays a page whose content varies depending on user roles. It says "Hello, stranger" to anonymous visitors but addresses logged-in users by name, and it displays a fully-exploded menu of administrative links to site administrators. The last URL (splash/kenny) mimics the home page of my brother Kenny's website.
There are a couple of things that I think still need work.
First, it would be nice to be able to add images to sections and topics created by headlines.module. However, I don't have any experience writing code that deals with images in Civicspace.
Second, headlines.module contains a line of problematic code for generating its sidebar blocks. Specifically, it says:
$data['subject'] = l(t($section->title), "splash/times/$section->hsid");
This makes it possible to have the sidebar heads link to headline sections that have been formatted through my splash module. However, the links would break if someone tried to use the headlines module without splash installed or if they didn't have a splash layout named "times." Replacing the line above with the following code would prevent the links from breaking:
$data['subject'] = l(t($section->title), "headlines/$section->hsid");
However, this code doesn't take advantage of splash for page layout. There ought to be some way to have the best of both worlds, but I'm not sure yet how to do so. Thoughts, anyone?
ADDENDUM: After writing all of the above, I've just realized that the "themes" function in Drupal provides a solution to my sidebar blocks dilemma. In headlines.module, I rewrote my headlines_page() function so that it calls theme('headlines_content'), and then I created a customized headlines_content function in my site's theme directory which overrides theme_headlines_content. Voila, I can layout my headlines page however I want, without going through splash.module at all!
This of course raises the question of what splash.module is good for in the first place. I think it still has some utility as a way of enabling easy creation of individual pages that break out of a site's overall design. Thoughts, anyone?
------------------------
Sheldon Rampton
Research Director, Center for Media and Democracy
http://www.prwatch.org
http://www.sourcewatch.org
http://www.sheldonrampton.com
Re: Beta version of headlines.module
This is unbelievable Sheldon! We've been batting around ideas for how
to tackle this exact issue for months. What you've built gets us most
of the way there.
What do people think about including them in a CivicSpace release when
they are stable?
-Zack
http://www.civicspacelabs.org
http://www.zacker.org
On Jan 25, 2005, at 10:53 AM, Sheldon Rampton wrote:
>
> I've written a beta version of "headlines.module", which enables users
> to create a "headlines" page highlighting the top items on their site.
> I'm hoping it will be useful for Civicspace users who want to create
> their own online newspapers. I'd appreciate it if people could take a
> look and give me some feedback.
>
> In addition to headlines.module, I've created a couple of other
> modules that work alongside it, called "splash.module" (which
> facilitates the creation of splash pages for a site) and
> "abstract.module" (which makes it possible to create brief summary
> abstracts of node contents. This is the same "abstract.module" that I
> posted and discussed here a couple of weeks ago.) You can download all
> three modules from my website, at the following URLs:
>
> http://www.prwatch.org/headlines.tar.gz
> http://www.prwatch.org/abstract.tar.gz
> http://www.prwatch.org/splash.tar.gz
>
> In addition, you can try out a demo at the following URL:
>
> http://www.prwatch.org/civicspace4
>
> This is a testing version of my site, so don't worry about messing
> things up. To see some displays of the headlines, try the following
> URLs:
>
> http://www.prwatch.org/civicspace4/headlines
> http://www.prwatch.org/civicspace4/splash/doodle
> http://www.prwatch.org/civicspace4/splash/times
>
> The first URL above will display a headlines section called "Important
> Stuff," which includes the topics "politics," "public relations,"
> "war/peace," "environment" and "human rights."
>
> The second URL will display the same headlines section, using a layout
> I created using the "splash" module and mimicking the layout of Google
> News.
>
> The third URL displays the same headlines section, this time mimicking
> the layout of the New York Times.
>
> Finally, you can experiment with administering the headlines yourself,
> at:
>
> http://www.prwatch.org/civicspace4/admin/headlines
>
> There are a couple of bugs that I'm aware of, but this should be good
> enough for testing and feedback purposes. Here are some specific
> questions:
>
> (1) Is the interface for headlines administration clear enough for
> users to understand? If not, how should it be changed?
>
> (2) As I've discussed here previously, "abstract.module" is very
> similar to an existing Drupal module called "excerpt.module." The
> difference is that "abstract.module" requires adding a table to the
> database, whereas excerpt.module doesn't. Excerpt.module gets away
> with this by using the "teaser" field in the node table to store its
> excerpts. I've chosen to store this information in a separate table
> because some users may want to have teasers *and* to have separate
> brief summaries. (In my sample headlines page, the "abstract_summary"
> field appears directly under the headline and is typically just one or
> two short sentences. For example, the headline "Inaugural Product
> Placement" in my demo has an abstract_summary that says, "Cadillac
> gets some free advertising out of the U.S. presidential inauguration."
> So...my question regarding abstract.module is: Given the similarity to
> excerpt.module, would it be best to (1) try to talk the author of
> excerpt.module into incorporating my !
> functionality into his module; (2) create a separate abstract.module,
> which some people might find useful for doing things other than what
> I'm doing with it on headlines pages; or (3) get rid of
> abstract.module entirely, and incorporate its functionality directly
> into headlines.module?
>
> (3) Finally, "splash.module" is something that I threw together
> quickly, mostly as a proof of concept to show a couple of different
> ways that headlines could be made to display. However, it might have
> some uses beyond display of headlines. For example, here's the URL to
> a splash page that I created which looks identical to the home page of
> my brother Kenny's website:
>
> http://www.prwatch.org/civicspace4/splash/kenny
>
> With some cleaning up, therefore, I think splash.module might be a
> useful addition to Drupal, but I'd like to know what people think of
> the concept and design. Is there another way to code it that might be
> better?
>
> Those are my questions for now. Thanks in advance for your attention
> and feedback.
>
> --Sheldon Rampton
>