sivaganeshk
11-11-2012, 11:00 PM
Here are few modifications I made to vBulletin Facebook App. Hope it helps other users .
Important : Please backup all the files before making any changes.
Feature 1: Last Thread information on Forum Home
Default :
https://vborg.vbsupport.ru/external/2012/11/26.jpg
New Look :
https://vborg.vbsupport.ru/external/2012/11/27.jpg
Code changes :
1. Open Forums.php
2. Find the code
Code:
<?php echo timedisplay($forum['lastpostinfo']['lastposttime']); ?><br/>
3. Replace with
Code:
<?php // SG Change 1 ?>
<a href="<?php echo "https://apps.facebook.com/appname/category_item.php?category=Forum_Threads_".$forum['forumid']."&id=".$forum['lastpostinfo']['lastthreadid']."&goto=newpost"; ?>"><?php echo substr($forum['lastpostinfo']['lastthread'],0,40); ?></a> <br />
replace appname with your facebook app .
P.S: 41 characters of the thread title will be visible. Having more and more characters will look ugly.
Feature 2 : Post "Users reply" in facebook wall instead of Posted a reply on APP NAME
Default :
https://vborg.vbsupport.ru/external/2012/11/28.jpg
New Look :
https://vborg.vbsupport.ru/external/2012/11/29.jpg
https://vborg.vbsupport.ru/external/2012/11/30.jpg
1. Open editor.php
2. Find the code
Code:
public function wall($title, $message) {
$opt = array();
$opt['message'] = $this->wallMessage();
$opt['link'] = FACEBOOK_CANVAS_URL . $this->redirect;
$opt['name'] = ThreadInfo::get($this->thread_id)->getName();
$opt['caption'] = '';
$opt['description'] = '';
$this->send_to_wall($opt);
}
replace with
Code:
public function wall($title, $message) {
$opt = array();
$opt['message'] = $message;
$opt['link'] = FACEBOOK_CANVAS_URL . $this->redirect;
$opt['name'] = ThreadInfo::get($this->thread_id)->getName();
$opt['caption'] = '';
$opt['description'] = $message ;
$this->send_to_wall($opt);
}
Feature 3 : View the current thread on Forum Site
https://vborg.vbsupport.ru/external/2012/11/31.jpg
1. Open category_item.php
2. Find
Code:
public function renderItem($category, $id, $page) {
echo CategoryContentItem::get($category, $id, $page)->getHtml();
return time() + 3;
}
3. Replace with
Code:
public function renderItem($category, $id, $page) {
echo CategoryContentItem::get($category, $id, $page)->getHtml();
$threadShowThread = CategoryContentItem::getRedirect($category, $id, $page);
echo "<center><b><a href=\"http://collegers.net/{$threadShowThread}\"> View this article on Forum</a><br/> <br/>Similar Threads </b></center><br/>";
return time() + 3;
}
Don't forget to change FORUM URL.
Please donate - sivaganesh_sg@yahoo.com (PayPal) . That's the only reason I'm sharing this modification . "I want to save money to own a 13 inch Macbook Pro"
Edit(6 Dec) : Need only $200 more to buy it
If you find any bug while using it, please report it here. I'm college student and will update with more feature whenever I find time.
Important : Please backup all the files before making any changes.
Feature 1: Last Thread information on Forum Home
Default :
https://vborg.vbsupport.ru/external/2012/11/26.jpg
New Look :
https://vborg.vbsupport.ru/external/2012/11/27.jpg
Code changes :
1. Open Forums.php
2. Find the code
Code:
<?php echo timedisplay($forum['lastpostinfo']['lastposttime']); ?><br/>
3. Replace with
Code:
<?php // SG Change 1 ?>
<a href="<?php echo "https://apps.facebook.com/appname/category_item.php?category=Forum_Threads_".$forum['forumid']."&id=".$forum['lastpostinfo']['lastthreadid']."&goto=newpost"; ?>"><?php echo substr($forum['lastpostinfo']['lastthread'],0,40); ?></a> <br />
replace appname with your facebook app .
P.S: 41 characters of the thread title will be visible. Having more and more characters will look ugly.
Feature 2 : Post "Users reply" in facebook wall instead of Posted a reply on APP NAME
Default :
https://vborg.vbsupport.ru/external/2012/11/28.jpg
New Look :
https://vborg.vbsupport.ru/external/2012/11/29.jpg
https://vborg.vbsupport.ru/external/2012/11/30.jpg
1. Open editor.php
2. Find the code
Code:
public function wall($title, $message) {
$opt = array();
$opt['message'] = $this->wallMessage();
$opt['link'] = FACEBOOK_CANVAS_URL . $this->redirect;
$opt['name'] = ThreadInfo::get($this->thread_id)->getName();
$opt['caption'] = '';
$opt['description'] = '';
$this->send_to_wall($opt);
}
replace with
Code:
public function wall($title, $message) {
$opt = array();
$opt['message'] = $message;
$opt['link'] = FACEBOOK_CANVAS_URL . $this->redirect;
$opt['name'] = ThreadInfo::get($this->thread_id)->getName();
$opt['caption'] = '';
$opt['description'] = $message ;
$this->send_to_wall($opt);
}
Feature 3 : View the current thread on Forum Site
https://vborg.vbsupport.ru/external/2012/11/31.jpg
1. Open category_item.php
2. Find
Code:
public function renderItem($category, $id, $page) {
echo CategoryContentItem::get($category, $id, $page)->getHtml();
return time() + 3;
}
3. Replace with
Code:
public function renderItem($category, $id, $page) {
echo CategoryContentItem::get($category, $id, $page)->getHtml();
$threadShowThread = CategoryContentItem::getRedirect($category, $id, $page);
echo "<center><b><a href=\"http://collegers.net/{$threadShowThread}\"> View this article on Forum</a><br/> <br/>Similar Threads </b></center><br/>";
return time() + 3;
}
Don't forget to change FORUM URL.
Please donate - sivaganesh_sg@yahoo.com (PayPal) . That's the only reason I'm sharing this modification . "I want to save money to own a 13 inch Macbook Pro"
Edit(6 Dec) : Need only $200 more to buy it
If you find any bug while using it, please report it here. I'm college student and will update with more feature whenever I find time.