MyBB Community Forums

Full Version: Displaying News on your homepage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Wow! Nice code, works pretty good. Is there any way change the replies code so if there is only 1 reply, it'll say 1 Reply instead of 1 Replies (even if you change the echo code). And can I use multple forum IDs and how? It only allows me to use only one forum for the news.

Bugs: If you have a title/post with this apostrophie or quotes, it will turn into weird characters.
Like "What’s really" shows as "What’s"

*Solved*
That aint bugs ... it are personal needs.
I forgot to add my bugs list. I've added it, can anyone check it out? Toungue
You probably have an UTF-8 encoding issue. See this.

Multiple forum IDs.

Reply/Replies:
echo("(<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['replies']}</a> ");
if($row['replies'] == 1)
{
	echo("Reply)");
}
else
{
	echo("Replies)");
}


Avatars (Untested)
$query3 = $db->simple_select(TABLE_PREFIX."users", "avatar", "uid = '{$row2['uid']}'");
$avatar = $db->fetch_field($query3, "avatar");

if($avatar{0} == '.')
{
	echo("<img src=\"{$forumpath}{$avatar}\" alt=\"\" />");
}
else
{
	echo("<img src=\"{$avatar}\" alt=\"\" />");
}
MrDoom Wrote:You probably have an UTF-8 encoding issue. See this.

Multiple forum IDs.

Reply/Replies:

Avatars (Untested)

Wow, it really works. I guess I didn't see your post in the past pages, although everything works fine! Nice work. Thanks.
Is there any way to integrate the multi-page with Joomla? I've tried a couple ways, probably the easiest, but had no success.
Theres also weird characters for me if say theres some East Asian characters.
ahero4heor Wrote:Is there any way to integrate the multi-page with Joomla? I've tried a couple ways, probably the easiest, but had no success.
Not sure, ask LeX- since he did the pagination code.

xiaozhu Wrote:Theres also weird characters for me if say theres some East Asian characters.
Have you tried?
Quote:Tiki says to try adding this inside your pages <head></head> tags:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


He also says that if that alone won't fix it, you'll have to wait for MyBB 1.2.10 which can fix the encoding back to UTF-8.
I found a solution, but I'm getting errors.
I get:
Fatal error: Call to a member function on a non-object in /home/lastmach/public_html/forum/news.php on line 4

Is there any reason or woe to these?
Can I fix it? How?

Thanks in advance.
What's on line 4?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33