How can I add "On" before the published date in feedControl

57 views
Skip to first unread message

Nga

unread,
Aug 8, 2012, 5:17:21 PM8/8/12
to google-ajax...@googlegroups.com
Hi,
I'm using feedControl and it displays correctly with title, link, publisher, date and the teaser.
I removed the publisher, and would like to change the date display which is now from "-  Aug 04, 2012" to "On Aug 04,2012". Could you please help me on this.
My code is now.
<style type="text/css">
 #feedControl .gfc-title {font:bold 11pt arial; padding:10px;}

 #feedControl .gf-author {
  display : none;}


</style>


<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

function OnLoad() {
  var feedControl = new google.feeds.FeedControl();
 
  feedControl.addFeed("http://feeds.feedburner.com/IDMGOVBlog");
 
  feedControl.draw(document.getElementById("feedControl"));
}

google.setOnLoadCallback(OnLoad);

</script>

<div id="feedControl"></div>

Thanks in Advance!

Jeremy Geerdes

unread,
Aug 8, 2012, 5:29:21 PM8/8/12
to google-ajax...@googlegroups.com
Unfortunately, the code to override that - character is buried within the Feeds API, and there is no method to change it alone. You could, however, override the entire createHtml method of the FeedControl. Although it may be easier to just write your own version of the control altogether.

Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msg/google-ajax-search-api/-/NPffbKv_SKsJ
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

Nga

unread,
Aug 8, 2012, 5:43:58 PM8/8/12
to google-ajax...@googlegroups.com
Thank you for your immediate reply. Could you pls explain me further on "write your own version of the control". You mean, initialize and add the variables in to object before it calls the url?
Also, It would be helpful if you give me any reference/blog etc. I tried to locate one, but couldn't find.

Jeremy Geerdes

unread,
Aug 8, 2012, 5:52:38 PM8/8/12
to google-ajax...@googlegroups.com
To write your own control would be to duplicate the functionality of the FeedControl that you're using. I don't know of any recent resources, references, or blogs about doing this. And sadly, the documentation for the FeedControl has long since disappeared so you won't be able to know exactly what methods and properties it exposed. But the basic premise is simple enough: build a JavaScript application which will use DOM methods to construct elements based on what is received back from the Feeds API. You should be able to manage if you have a reasonable understanding of JavaScript and the Feeds API documentation, such as it is.


Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!


To view this message on the web, visit

Nga

unread,
Aug 9, 2012, 10:59:04 AM8/9/12
to google-ajax...@googlegroups.com
Ok. I'm not fan of JavaScript, but will try to do as per your suggestion.
Thanks!

Amudha Ganesan

unread,
Aug 9, 2012, 2:10:19 PM8/9/12
to google-ajax...@googlegroups.com
Hi, I have another question.
The title is being truncated in my display. Do you have any suggestion
on how to display the whole title?
Thanks!
>>> google-ajax-searc...@googlegroups.com
>>> To view this message on the web, visit
>>> https://groups.google.com/d/msg/google-ajax-search-api/-/NPffbKv_SKsJ
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Google AJAX APIs" group.
>> To post to this group, send email to
>> google-ajax...@googlegroups.com
>> To unsubscribe from this group, send email to
>> google-ajax-searc...@googlegroups.com
>> To view this message on the web, visit
>> https://groups.google.com/d/msg/google-ajax-search-api/-/M_RRePNPCTsJ
>> For more options, visit this group at
>> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Google AJAX APIs" group.
> To post to this group, send email to
> google-ajax...@googlegroups.com
> To unsubscribe from this group, send email to
> google-ajax-searc...@googlegroups.com
> To view this message on the web, visit
> https://groups.google.com/d/msg/google-ajax-search-api/-/OKuN4c3qaXsJ
Reply all
Reply to author
Forward
0 new messages