I looked at the GSnewsBar.prototype.searchComplete prototype method,
however, I could not figure out how to use that function with the
gfdynamicfeedcontrol.js and the ajax feed API. I am unsure how to
apply that method or what I need within the application exactly to
make that work. (
http://www.lib.montana.edu/feeds/lis.php). My
application takes feeds from our electronic journal subscriptions
through databases such as EBSCO, Gale, and Emerald, mashes those
together using the Google AJAX feed API and serves them together as a
virtual current periodical room so that users may browse the table of
contents for journals in their academic discipline. I chose journals
in Library and Information Science as a test to bring the web service
together. I am unsure about the licensing agreements we have and
wanted to add our proxy prefix -
http://proxybz.lib.montana.edu/login?url=
- to cover myself and ensure that only individuals affiliated with our
institution could access the databases and subscriptions.
I have been able to break down the following code within the
GFdynamicFeedControl.prototype.displayCurrentEntry_ = function () a
little bit -
this.current = this.entries[this.entryIndex].html;
I declared a variable and used the createLink_ function to create an
instance of the article link from the feed replacing the first five
lines of code in the function with the following -
this.clearNode_(this.nodes.entry);
var link = this.createLink_(this.entries[this.entryIndex].link,
this.entries[this.entryIndex].title,
this.options.linkTarget);
var class = 'gf-title';
var listEntry = this.createDiv_(class);
listEntry.appendChild(link);
this.nodes.entry.appendChild(listEntry);
this.createOverlay_();
Thus, I was able have a link in the featured div that was formated the
way I wanted it. However, I was not able to isolate the author or
snippet portions in a similar manner. I tried
this.entries[this.entryIndex].author and
this.entries[this.entryIndex].contentSnippet
and these broke the application. I then declared another variable and
wrote the following -
this.clearNode_(this.nodes.entry);
var link = this.createLink_(this.entries[this.entryIndex].link,
this.entries[this.entryIndex].title,
this.options.linkTarget);
var entry = this.entries[this.entryIndex].html;
var class = 'featureLink';
var listEntry = this.createDiv_(class);
listEntry.appendChild(link);
listEntry.appendChild(entry);
this.nodes.entry.appendChild(listEntry);
this.createOverlay_();
As you can see this would add the whole entry including the link,
author(s), and snippet so that I would have two links one after
another in the featured div. I then went into the css and declared
the 'gf-title a {display: none}', and this removed the second link.
While this works and looks fine as long as the css is available, I do
not think that this is a great solution. What do you suggest - can I
bring out the author and snippet in a similar manner and just have the
wrong code or can you suggest how to use the other function from the
GSnewsBar.
thank you for your time and consideration,
Michael
On Jun 27, 3:10 pm, Ben Lisbakken <
lisba...@google.com> wrote:
> Sudrland --
>
> If I were you I'd take a look at the GSnewsBar.prototype.searchComplete
> prototype method. Specifically, the ns.results variable. I would think
> that if you went through that variable, and changed all results' links or
> titles to whatever you want, this would be an easy way to acheive what you
> are trying to do.
>
> -Ben
>