MyBB Community Forums

Full Version: How to add same text in forum list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
That's my first plugin, so I don't have enough knowledge about it.

How to add string in forums list and topics list?

I want to add an user avatar on that pages, near the "last post title/user" text. Just like on this forum http://www.gamesboard.pl/

I made same core of that plugin:

<?php
 
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("build_forumbits_forum", "lastPosterAvatar_add");

function lastPosterAvatar_info()
{
	return array(
		"name"			=> "Last Poster Avatar",
		"description"	=> "A sample plugin that show a avatar of last poster - on forum index and threds list.",
		"website"		=> "http://www.mybboard.pl",
		"author"		=> "BlueMan",
		"authorsite"	=> "http://www.blueman.pl",
		"version"		=> "0.0001",
		"guid" 			=> "",
		"compatibility" => "*"
	);
}

function lastPosterAvatar_activate()
{
}

function lastPosterAvatar_deactivate()
{
}

function lastPosterAvatar_add($forum)
{
  $forum['lastAvatar'] = 'Test->';
  //eval("\{$forum['lastAvatar']} .= \"adfadfad\";");
}

?>
And in forumbit_depth1_forum_lastpost template I have add {$forum['lastAvatar']}.

But nothing is showing.
What do I do wrong?