There are many different ways to create a shoutbox. (or Tagboard, or whatever you may want to call it. I call it a shoutbox because of DA) You can use a service like Zonkboard or a php script like tagboard. You can also create one using EE’s own abilities! Let me show you how I did it.
I will attempt to make it as step-by-step as possible:
- Create a new weblog. Call it shoutbox or whatever you would like to call it. (Admin=>Weblog Management=>Create a New Weblog)
- Edit the preferences for your new weblog. I used these settings (i’ll only touch on those that I changed):
- weblog URL: I just used my normal site URL. Odds are you won’t need this.
- Check “Allow Comments” by default: Yes
- Check “Allow Trackbacks” by default: No
- Add Trackback Auto-discovery: No
- Allow Comments in this weblog: Yes
- Require Membership to post comments: No
- Enable CAPTCHA: No
- Require E-mail address to Post Comments: No (you can set this to yes if you’d like.)
- Moderate Comments: No.
- Maximum number of characters per comment: 256 (set this to what you want, I thought 256 characters was plenty for a shout.
- Allow Image URL’s in comments: No
- Automatically convert URL’s and email addresses into links? No.
- Now, post a dummy entry into your shoutbox weblog. It can be anything, no one will ever see it.
- Now to create a new template. I called mine shoutbox. Here’s my shoutbox template:
{exp:comment:entries sort=”desc” limit=”15″}
{if url == ”}{name}{/if}{if url != “”}<a href=”{url}” target=”_blank”>{name}</a>{/if}: {comment}<br />
{/exp:comment:entries}
{exp:comment:form}
<div class=”leavecommentbox”>
{if not_logged_in}
<table border=0>
<tr>
<td class=”tdhighlight”>
Name:
</td>
<td class=”tdnormal”>
<input type=”text” name=”name” class=”input” size=”15″ maxlength=”60″ value=”{name}” />
</td>
</tr>
<tr>
<td class=”tdhighlight”>
E-mail:*
</td>
<td class=”tdnormal”>
<input type=”text” name=”email” class=”input” size=”15″ maxlength=”60″ value=”{email}” />
</td>
</tr>
<tr>
<td class=”tdhighlight”>
Location:
</td>
<td class=”tdnormal”>
<input type=”text” name=”location” class=”input” size=”15″ maxlength=”60″ value=”{location}” />
</td>
</tr>
<tr>
<td class=”tdhighlight”>
Homepage (if any):
</td>
<td class=”tdnormal”>
<input type=”text” name=”url” class=”input” size=”15″ maxlength=”60″ value=”{url}” />
</td>
</tr>
</table>
{/if}
Shout: <input type=”text” name=”comment” maxlength=”255″ size=”15″ />
<br /><br />
{if not_logged_in}
Remember me: <input type=”checkbox” name=”save_info” value=”yes” {save_info} />
<br />
* E-mail Address Required (never shown)
<br /><br />
{/if}
<input type=”submit” name=”submit” value=”Submit”>
</div>
{/exp:comment:form}
- Essentially, it’s just like any other comment form. Just a little stripped down.
- Now after saving your shoutbox, you will need to put it into another template. I used an iframe to accomplish this.
<iframe src=”http://www.yoursite.com/index.php/weblog/shoutbox/123″ width=”90%” height=”200″></iframe>
Feel free to change the formatting of the iframe to suit your needs.
- Alternatively, you can use Lynda’s method of PHP including it. (actually I recommend this method:
<?php include (“http://www.yoursite.com/index.php/weblog/shoutbox/123″); ?>
- IMPORTANT NOTE: The 123 that follows the URL’s above is the entry_id of the entry you made to your shoutbox. Because you only need 1 entry and never have to enter another one again (the shoutbox feeds off of comments), this number should never change.
- That’s it. Now people should be able to add shouts!
- Excited
- Fascinated
- Amused
- Bored
- Sad
- Angry
Cool! Do you have a working example somewhere?
I just put one up here. : ) it’s the one I had running on my main site.
test
Just checking. Not sure Yoshi will see this, but quick question. You do create the new template as part of the template set for the new weblog, right?
Looks great Yoshi – just testing!
Yoshi, brilliant idea! I’ve implemented it and it works.
I read that you were going to make it an extension? How’s that coming along…?
It?looks good to me. Great work.