Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to display forum names on portal page
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #8
RE: How to display forum names on portal page
pepotiger Wrote:as useal u read my mind Tongue
I was looking for it too, thanks mate for sharing it..
ُEdit: the {$announcement['forumname']} not working, I tryed to add

PHP Code:
<a href="{$mybb->settings['bburl']}/forum-{$announcement['fid']}.html">{$announcement['forumname']}</a>

the forum fid working good whene I view the page source, but there is no input replaced with {$announcement['forumname']}

Note: I applyed the changes in this topic http://mybbhacks.zingaburga.com/showthread.php?tid=54

Oh yes, there will be a conflict if you copy the code exactly...
If you're using pagination on portal as well, instead of using the replacement in the first post, use this replacement:

PHP Code:
1
2
3
4
5
6
7
8
9
$query = $db->query("
	SELECT t.*, t.username AS threadusername, u.username, u.avatar, f.name AS forumname
	FROM ".TABLE_PREFIX."threads t
	LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
	LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid = t.fid)
	WHERE t.fid IN (".$mybb->settings['portal_announcementsfid'].") AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
	ORDER BY t.dateline DESC
	LIMIT ".(($page-1)*$perpage).", ".$perpage
);


My Blog
01-28-2008 06:40 PM
Find all posts by this user

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to display forum names on portal page - ZiNgA BuRgA - 01-28-2008 06:40 PM

 Standard Tools
Forum Jump: