I have a forum for my local area. I'd like to add a Facebook Likes page to it.
kinda like this site:
http://likeabuzz.info/
Each "Like" quote can be the thread title. I can use the blank message hack of xthreads (sorta like RateU did for the link directory) to remove the message from the threads. replies to the threads can be the comments to the quote...or I can add the facebook comments api.
The Like button and comments api isn't a problem, I know I can add those. The problem is laying everything out. I suck at all the template stuff. I've already tried editing the link directory tutorial and failed miserably.
Anyone willing to give it a try?
Here's a breakdown of what I need...
Forum display -> show the quotes only (threads)
Showthread ->When someone clicks on a thread,it takes them to the quote and facebook comments api (includes the facebook like button)
Newthread -> Layout much like link directory showing only the quote (title of thread)...nothing else
Any attempts at this is much appreciated.
Links to facebook codes:
Like button -
http://developers.facebook.com/docs/refe...http://developers.facebook.com/docs/reference/pl
Comments -
http://developers.facebook.com/docs/refe...http://developers.facebook.com/docs/reference/plugin
(11-07-2010 06:32 AM)x-Treme Wrote: [ -> ]Forum display -> show the quotes only (threads)
So, do you want a thread title list layout in forumdisplay (displaying thread title only)?
No thread rating, views, author and etc there?
Just the title and author
Like this?
[
attachment=277]
The Newthread button on the right side of each thread should be replaced with the like button.
Exactly
And when I click on a thread title, I will be taken to the actual post which will contain just the thread title and the facebook comments box.
Here is for the forum display template.
I use xtfblp_ template prefix for this example:
xtfblp_forumdisplay_threadlist
HTML Code
<div class="float_left">
{$multipage}
</div>
<div class="float_right">
{$newthread}
</div>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="thead" colspan="9">
<div style="float: right;">
<span class="smalltext"><strong><a href="misc.php?action=markread&fid={$fid}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&type=forum&fid={$fid}&my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
</div>
<div>
<strong>{$foruminfo['name']}</strong>
</div>
</td>
</tr>
<tr>
<td class="tcat" colspan="8">
<span class="smalltext"><strong>
<a href="{$sorturl}&sortby=subject&order=asc">{$lang->thread}</a> {$orderarrow['subject']} |
<a href="{$sorturl}&sortby=starter&order=asc">{$lang->author}</a> {$orderarrow['starter']}
</strong></span>
</td>
{$inlinemodcol}
</tr>
{$selectall}
{$threads}{$nullthreads}
<tr>
<td class="tfoot" align="right" colspan="9">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="selectall" value="{$allselected}" />
<input type="hidden" name="fid" value="{$fid}" />
<select name="sortby">
<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
{$ratingsort}
<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
</select>
<select name="order">
<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
</select>
<select name="datecut">
<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
</select>
{$gobutton}
</form>
</td>
</tr>
</table>
<div class="float_left">
{$multipage}
</div>
<div class="float_right" style="margin-top: 4px;">
{$newthread}
</div>
<br style="clear: both;" />
<br />
<div class="float_left">
<div class="float_left">
<dl class="thread_legend smalltext">
<dd><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</dd>
<dd><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</dd>
<dd><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</dd>
</dl>
</div>
<div class="float_left">
<dl class="thread_legend smalltext">
<dd><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</dd>
<dd><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</dd>
<dd><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</dd>
</dl>
</div>
<br style="clear: both" />
</div>
<div class="float_right" style="text-align: right;">
{$inlinemod}
{$searchforum}
{$forumjump}
</div>
<br style="clear: both" />
{$inline_edit_js}
|
Modify it as your needs.
xtfblp_forumdisplay_thread
HTML Code
<tr>
<td class="{$bgcolor}{$thread_type_class}" colspan="{$colspan}">
<div class="largetext">
<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>
<div class="author smalltext">{$thread['profilelink']}</div>
</div>
</td>
<td class="{$bgcolor}" valign="middle" align="center" width="150">
<img src="images/english/newthread.gif" alt="" title="" />
</td>
{$modbit}
</tr>
|
Look at the image tags in line #9. Replace it with the Facebook Like button.
xtfblp_newthread
HTML Code
<html>
<head>
<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$thread_errors}
<form action="newthread.php?fid={$fid}&processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<div style="width: 600px; margin: auto auto;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->post_new_thread}</strong></td>
</tr>
<tr>
<td class="trow2" width="20%">
<strong>{$lang->thread_subject}</strong>
</td>
<td class="trow2">
<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
</td>
</tr>
{$extra_threadfields}
<tr style="display: none;">
<td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}</td>
<td class="trow2">
<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
{$codebuttons}
{$multiquote_external}
</td>
</tr>
{$modoptions}
{$captcha}
</table>
<br />
<div style="text-align:center">
<input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />
</div>
<input type="hidden" name="action" value="do_newthread" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}
</div>
</form>
{$forumrules}
{$footer}
</body>
</html>
|
Screenshot for newthread. Edit post should be similar to this:
[attachment=278]
xtfblp_editpost_first
HTML Code
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$post_errors}
<form action="editpost.php?pid={$pid}&processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<div style="width: 600px; margin: auto auto;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->edit_post}</strong></td>
</tr>
<tr>
<td class="trow2">
<strong>{$lang->subject}</strong>
</td>
<td class="trow2">
<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
</td>
</tr>
{$extra_threadfields}
<tr style="display: none;">
<td class="trow2" valign="top">
<strong>{$lang->your_message}:</strong><br /><div style="text-align: center;">{$smilieinserter}</div>
</td>
<td class="trow2">
<textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
{$codebuttons}
</td>
</tr>
</table>
<br />
<div align="center">
<input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" accesskey="s" />
</div>
<input type="hidden" name="action" value="do_editpost" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
</div>
</form>
<br />
<form action="editpost.php" method="post" name="editpost">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3"><strong>{$lang->delete_post}</strong></td>
</tr>
<tr>
<td class="trow1" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /> <strong>{$lang->delete_q}</strong></td>
<td class="trow1" width="100%">{$lang->delete_1}<br /><span class="smalltext">{$lang->delete_2}</span></td>
<td class="trow1"><input type="submit" class="button" name="submit" value="{$lang->delete_now}" tabindex="10" /></td>
</tr>
</table>
<input type="hidden" name="action" value="deletepost" />
<input type="hidden" name="pid" value="{$pid}" />
</form>
{$footer}
</body>
</html>
|
Next to showthread?
EDIT: The templates above based on MyBB 1.6
Looks exactly as I want it.
So I wouldn't need any custom thread fields?
(11-07-2010 07:56 AM)x-Treme Wrote: [ -> ]So I wouldn't need any custom thread fields?
Unfortunately, I don't know how the Facebook Like Button works (I'm not familiar with Facebook. Even I don't know when the last time I log in to my account there
).
So, I don't know whatever info needed to make it works.
For showthread, what information you want to display?
Only thread subject and author Username?
Yes, and I'll add the comments in myself.
Thank you so much for this, You are truly the master of the xthreads (along with zinga that is)
I'm still learning
For showthread, something like this?
[
attachment=279]
Ignore the comments if you want to use the Facebook comments.