Help - Search - Members - Calendar
Full Version: Yahoo Buzz Code For Mt
Movable Type Community Forum > Using Movable Type > Additional Features
lwriter
The good news is that Yahoo Buzz is open to new publishers.

The bad news is that the way it looks right now I would have hand type in the information because I can't figure out the MT codes to use.

Heres' what they say

Optional Elements

QUOTE
To provide a story’s headline upon submission: yahooBuzzArticleHeadline = "Enter Story Headline Here"

To provide a story’s summary upon submission: yahooBuzzArticleSummary = "Enter Story Summary Here"

To provide a story’s category upon submission: yahooBuzzArticleCategory = "Enter Story Category Here"

where "Enter Story Category Here" must be one of the following: business, entertainment, health, images, lifestyle, politics, science, sports, travel, usnews, video, world-news

To provide a story’s media type upon submission: yahooBuzzArticleType = "Enter Media Type Here"

where "Enter Media Type Here" must be one of the following: text, image, video

Finally, to automatically pull the URL associated with the page where the button lives upon submission: yahooBuzzArticleId = window.location.href

and be sure to remove ARTICLEURL from the code
Example

Here is an example of the Large Rectangular Button (with Vote Count), and all of the above optional elements:

<script type="text/javascript">yahooBuzzArticleHeadline = "Yahoo! Buzz is now open!";yahooBuzzArticleSummary = "Welcome new publishers.";yahooBuzzArticleCategory = "science";yahooBuzzArticleType = "text";yahooBuzzArticleId = window.location.href;</script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype="large-votes"></script>


Theres got to be a better way!

If you post the MT way to do it here., I'm happy to give your buzzed article a vote.

Anyone who uses your code, should also buzz you.

I usually use the ADD Thirs button and it adds everything for each service listed.

It would be nice to have button to put in the column next to the article. When the buttons are in the article, I think they detract.

Somebody ought to write a template or plugin for this hey?

Any help is appreciatted.

Be sure to include your URL in the post.

From editor @ Wireless and Mobile News
OtherNiceMan
This limits the Summary to the first 15 words. ArticleType is set by using a system tag @text, @image or @video, no tag no article type sent. Be aware unsure of what happens with buzz if you submit multiple Article types, so may be better to create drop down list with custom files.

CODE
<script type="text/javascript">
    yahooBuzzArticleHeadline = "<mt:EntryTitle>";
    yahooBuzzArticleSummary = "<mt:EntryBody words="15">";
    yahooBuzzArticleCategory = "<mt:EntryCategory>";
<mt:EntryIfTagged tag="@text">
    yahooBuzzArticleType = "text";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@image">
    yahooBuzzArticleType = "image";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@video">
    yahooBuzzArticleType = "video";
</mt:EntryIfTagged>
    yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
    src="http://d.yimg.com/ds/badge2.js"
    badgetype="large-votes">      
</script>


Create a new module template called Yahoo Buzz. In the Entry template just after </MTEntryIfTagged> add <mt:Include module="Yahoo Buzz">.
lwriter
Great work! smile.gif

We owe you a lot of buzzing.

Can I put your template in the column, like I do with the ADD this button?

I like having the buttons outside the entry.

Thanks for all your work!

LW
http://www.wirelessandmobilenews.com/index.html

OtherNiceMan
Code for sidebar widget

CODE
<mt:If name="Entry">
<mt:SetVarBlock name="current"><mt:entryid></mt:SetVarBlock>
<mt:entries id="$current">
<script type="text/javascript">
    yahooBuzzArticleHeadline = "<mt:EntryTitle>";
    yahooBuzzArticleSummary = "<mt:EntryBody words="15">";
    yahooBuzzArticleCategory = "<mt:EntryCategory>";
<mt:EntryIfTagged tag="@text">
    yahooBuzzArticleType = "text";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@image">
    yahooBuzzArticleType = "image";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@video">
    yahooBuzzArticleType = "video";
</mt:EntryIfTagged>
    yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
    src="http://d.yimg.com/ds/badge2.js"
    badgetype="large-votes">      
</script>
</mt:entries>
</mt:If>
lwriter
Yahoo!

I tried following directions and it doesn't seem to working.

I created a template module Yahoo Buzz.

In my three column layout between the Add thus button and Newstext, I put <mt:Include module="Yahoo Buzz">.

When I look at my show code in the browser I get:[code][/code]


<div>
<script type="text/javascript">
&nbsp;&nbsp;&nbsp;&nbsp;yahooBuzzArticleHeadline = "m-Qube to Pay 500K for Unauthorized Billing";
&nbsp;&nbsp;&nbsp;&nbsp;yahooBuzzArticleSummary = "Florida’s Attorney General Bill McCollum announced that his office has reached a settlement with a";
&nbsp;&nbsp;&nbsp;&nbsp;yahooBuzzArticleCategory = "Wireless and the Law";



&nbsp;&nbsp;&nbsp;&nbsp;yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
&nbsp;&nbsp;&nbsp;&nbsp;src="http://d.yimg.com/ds/badge2.js"
&nbsp;&nbsp;&nbsp;&nbsp;badgetype="large-votes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</script>

</div>

All that shows in the browser is a nice space between the two buttons.

Mmmmnnn

Did I do something wrong?

I know I'm close to being totally "buzzed"
OtherNiceMan
Sounds like < and > are getting replaced by &lt; and &gt; and spaces as &nbsp;'s

Thry copying the text into notepad or other text editor first.
lwriter
QUOTE (OtherNiceMan @ Sep 3 2008, 10:39 PM) *
Sounds like < and > are getting replaced by &lt; and &gt; and spaces as &nbsp;'s

Thry copying the text into notepad or other text editor first.


I tried that and now I'm missing the "garbage text!"

However the Yahoo buzz tag written as

<div>
<mt:Include module="Yahoo Buzz">
</div> </p>

Although now in the 3 column template the Yahoo Buzz module is not showing on the page.

NOW what did I do wrong?


Sorry for the delay I've run into google indexing problems. I bad robots.txt knocked page views down 50%.

To test to see if the code was working I put in the text "Yahoo Buzz" and it showed.
Then I removed it because it looked funny.

Happy Buzzing!

Thanks again.
lwriter
YAY!

It's working now but only for indvidual entries not the index. just like it should!


Check these out:

http://www.wirelessandmobilenews.com/2008/...ne_htc_dre.html

http://www.wirelessandmobilenews.com/2008/..._teens_wat.html

To get it on every entry I'd probably have to republish.

THANK YOU FOR ALL YOUR SUPPORT!
OtherNiceMan
Yes, you'll need to republish.

What happens in indexes? You may need to use the first sample I posted.
aussie-mossie
Newbie here.

Did I do it correctly if I

1) create a new template
2) choose "include module" in the drop down menu
3) copy and paste OTHERNICEGUY provided code
4) save it as Yahoo Buzz
5) Goto Entry Template
6) Paste it there.


Problem : I cant find </MTEntryIfTagged> like OTHERNICEGUY described. Error message "Publish error: Publish error in template 'Entry': Error in <mtInclude> tag: error in module yahoo buzz: Publish error in template 'Yahoo buzz': Error in <mtInclude> tag: Can't find included template module '<script type="text/javascript"> yahooBuzzArticleHeadline = '"

what did I do wrong? Thank you in advance

Here is how my ENTRY TEmplate looks like

CODE
<$mt:Var name="page_layout" value="layout-wm"$>

<mt:SetVarBlock name="title"><$mt:EntryTitle encode_html="1"$> - <$mt:BlogName encode_html="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="html_head">
<mt:EntryPrevious><link rel="prev bookmark" href="<$mt:EntryPermalink$>" title="<$mt:EntryTitle encode_html="1"$>" /></mt:EntryPrevious>
<mt:EntryNext><link rel="next bookmark" href="<$mt:EntryPermalink$>" title="<$mt:EntryTitle encode_html="1"$>" /></mt:EntryNext>
<$mt:EntryTrackbackData$>
</mt:SetVarBlock>

<$mt:Include module="yahoo buzz"$>

<$mt:Include module="Header" body_class="mt-entry-archive"$>

<$mt:Include module="Entry Detail"$>

<$mt:Include module="TrackBacks"$>

<$mt:Include module="Comments"$>

<$mt:Include module="Footer"$>

OtherNiceMan
Can you post the content of you yahoo buzz module, looks like you are missing the last line.
aussie-mossie
QUOTE (OtherNiceMan @ Dec 5 2008, 11:01 PM) *
Can you post the content of you yahoo buzz module, looks like you are missing the last line.



hello mate

here it is

CODE
<$mt:Include module="<script type="text/javascript">
yahooBuzzArticleHeadline = "<mt:EntryTitle>";
yahooBuzzArticleSummary = "<mt:EntryBody words="15">";
yahooBuzzArticleCategory = "<mt:EntryCategory>";
<mt:EntryIfTagged tag="@text">
yahooBuzzArticleType = "text";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@image">
yahooBuzzArticleType = "image";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@video">
yahooBuzzArticleType = "video";
</mt:EntryIfTagged>
yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
src="http://d.yimg.com/ds/badge2.js"
badgetype="large-votes">
</script>
"$>
OtherNiceMan
There are a couple of things wrong, you have an additional include at the top and a stray $> at the bottom.

Here is the code again

CODE
<script type="text/javascript">
yahooBuzzArticleHeadline = "<mt:EntryTitle>";
yahooBuzzArticleSummary = "<mt:EntryBody words="15">";
yahooBuzzArticleCategory = "<mt:EntryCategory>";
<mt:EntryIfTagged tag="@text">
    yahooBuzzArticleType = "text";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@image">
    yahooBuzzArticleType = "image";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@video">
    yahooBuzzArticleType = "video";
</mt:EntryIfTagged>
    yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
    src="http://d.yimg.com/ds/badge2.js"
    badgetype="large-votes">      
</script>
aussie-mossie
Thanks OtherNiceMan! It works.

One more question : Now that I know how to created this dynamically driven buttons, how to I stack them nicely horizontally or vertically without looking like it stick to each other? I would like to see it nicely and evenly positioned.

Thanks
OtherNiceMan
You are going to have to play with the styles, do you have a link so I can have a look.
agentfive
Any idea on how to get this to work on the index page with the entry URL?
OtherNiceMan
If you place the code in the entry suimmary template you should get a buzz button for each entry on the index page.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.