FAQ entries:



How do I create a Mention dynamically?

You can automatically create a new Mention without using the MochiMention.com site in just a few simple steps (For Wordpress integration instructions read this entry). This can be useful for rating your blog posts, photos, e-commerce goods, and other dynamically generated content. You can even use this method to create new Mentions if you just prefer working directly with the code.

Step 1: Go to the Create A New Mention page
Step 2: Go to the second step on that page and select the Mention Widget that you would like to use
Step 3: Copy Mention Code provided in step 3 of that page
Step 4: Take the code you just copied and paste it into your HTML or server side template.
Step 5: Replace the slug and title parameter values with your own information. Here is a breakdown of the anatomy of the Mention Widget:

Each Widget is created with the EMBED HTML element (as seen below):

Code:

<embed style="width:150px; height:45px;" bgcolor="#ffffff" src="http://www.mochimention.com/widgets/vote1.swf?base=mochimention.com&mkey=__KEY__&slug=__SLUG__&title=__TITLE__" wmode="" id="MochiMention" type="application/x-shockwave-flash" allowScriptAccess="never" quality="best"> </embed>

Within the element are several properties that describe the Widget. The ones that are important for you to know are the style, bgcolor, src, and wmode.

The style property is used to describe the width and height of the widget. Since all of the widgets are built with vector graphics you can resize them and they should still maintain their appearance quite nicely.

Code:

style="width:150px; height:45px;"

The bgcolor property sets the background color of the Widget. You can modify the background color by adjusting this property.

Code:

bgcolor="#ffffff"

The wmode property sets the transparency of the background. You can set the background to be transparent by replacing wmode="" with wmode="transparent"

Code:

wmode=""

The src property is the guts of the Widget. The src property contains the path to Widget that you chose to use and some parameters that help to uniquely identify itself. The parameters are what appear after http://www.mochimention.com/widgets/vote1.swf?. Here's a breakdown of the various parameters:
base - This is used to describe the domain that the votes and comments will be sent to. You should not change the value of this parameter.
mkey - This is the unique key that is assigned to you when you created a MochiMention account. You can manage your key at the Key Management page. Without a valid key your ratings and comments will not be saved. This value should be automatically populated for you but just in case it's not you can refer to the Key Management page to retrieve your key. For more information on keys please visit the FAQ on that topic.
slug - This is a unique identifier for your Mention. You can use whatever value you like here just so long as it's unique and is not shared by another one of your Mentions. If you use the same slug for two different Mentions then all of the ratings and comments will be listed under one Mention in your Dashboard. The slug cannot be longer than 32 characters and should not contain any special characters other than letters and numbers.
title - This is a descriptive name that will appear in your Dashboard when the Mention is first created. A Mention is created dynamically when it receives its first vote or comment. The title should be encoded (php | javascript) so that special characters do not corrupt the string. The title cannot be longer than 50 characters.

Code:

src="http://www.mochimention.com/widgets/vote1.swf?base=mochimention.com&mkey=__KEY__&slug=__SLUG__&title=__TITLE__"

What are keys and how are they used?

Keys are unique identifiers given to all MochiMention members so that they can create new Mentions. You can find your key by visiting the Key Management page in the Account Setting section of the website.

Keys are used in each Mention Widget to link ratings and comments to the key owner's account. Without a valid key votes and comments made by visitors will not be saved.

If you start seeing random Mentions on your Dashboard that you did not create then it may be due to someone else using your key. If that's the case then you can just generate a new key at the Key Management page.

Can I load a Mention Widget into my another Flash file?

You sure can! Just paste this code into your FLA or AS file and then follow the instructions in the comments.

Code:

// Replace vote1.swf with the Widget you would like to use
mentionPath = "http://www.mochimention.com/widgets/vote1.swf?";

// Replace __ENTER YOUR KEY HERE__ with your key from the Key Management page
mentionKey = "&mkey=__ENTER YOUR KEY HERE__";

// Replace __ENTER A SLUG__ with a unique identifier for this Mention
// (only letters and numbers no more than 32 characters long)
mentionSlug = "&slug=__ENTER A SLUG__";

// Replace __ENTER A TITLE HERE__ with a descriptive title of this Mention
// (no more than 50 characters)
mentionTitle = "&title=" + escape('__ENTER YOUR TITLE HERE__');

// Do not edit the block of code below
mentionBase = "base=mochimention.com";
mentionPath += mentionBase + mentionKey + mentionSlug + mentionTitle;
_root.createEmptyMovieClip("mochimention_mc", 0);
_root.mochimention_mc.loadMovie(mentionPath);

// Change the x and y coordinates to position the movieclip on your stage
_root.mochimention_mc._x = 0;
_root.mochimention_mc._y = 0;


How do I integrate MochiMention with Wordpress?

You can have a new MochiMention automatically added to each of your Wordpress posts by editing your template files. Your template files can be found in the folder "wp-content/themes" then whichever theme you're currently using. You can either edit the template file single.php or page.php depending on which one you have in your directory. In the template file look for the section starting with:

Code:

<div class="entrytext">

In that section add your MochiMention code. The code highlighted in blue will dynamically create a slug and title for your MochiMention. You must replace the code highlighted in red with your Mention key. Be sure to modify other parameters to fit your needs.

<embed style="width:150px; height:45px;" bgcolor="#ffffff" src="http://www.mochimention.com/widgets/vote1.swf?base=mochimention.com&mkey=YOUR_KEY_HERE&slug=<?php echo(urlencode($post->post_name)); ?>&title=<?php echo(urlencode($post->post_title)); ?>" wmode="" id="MochiMention" type="application/x-shockwave-flash" allowScriptAccess="never" quality="best"> </embed>