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
i have 3frams on the main page
there are any broblem that i Can't use this code?
FYI: There are two bugs with this system right now.

- If you click Save Draft in the forum that you are pulling the news from, it will post the draft to the main site.
>> Fix for it was to add :: AND visible = '1' :: in at $query = $db->simple_select(TABLE_PREFIX."threads", "*", "fid='{$fid}' ORDER BY tid DESC LIMIT $start,$perpage ");
>> So it would in turn look like:: $query = $db->simple_select(TABLE_PREFIX."threads", "*", "fid='{$fid}' AND visible = '1' ORDER BY tid DESC LIMIT $start,$perpage ");


- If a guest replies to a topic posted, it will make the guest post a new news topic.

I am sure both are pretty easy to fix up. Smile
Thanks for this tutorial
The MyCode doesn't seems to work for me.

The documents didn't parse out codes with images but parse out the original codes like [*img].
yea and html too.. the options look doesnt work now .. anyones have an idea?
Try replacing 'no' and 'yes' with 0 and 1. I can't remember if it was changed to work like that or not, I'd have to ask a developer and I have very limited Internet access to do that at the minute (it's why I've not been around much recently).
(2008-09-13, 10:01 PM)MrDoom Wrote: [ -> ]Try replacing 'no' and 'yes' with 0 and 1. I can't remember if it was changed to work like that or not, I'd have to ask a developer and I have very limited Internet access to do that at the minute (it's why I've not been around much recently).

Tried...didn't work...=( Confused
Right, you'll have to bear with me then since I don't have 1.4 on my laptop and can't download it at the minute. It'll be at least until next weekend.
Hi MrDoom,

When I use this script with 1.4 (dunno if it is optimized for it yet) I get this SQL error:

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'manne_mybb.mybb_mybb_threads' doesn't exist
Query:
SELECT * FROM mybb_mybb_threads WHERE fid='2' ORDER BY tid DESC LIMIT 5
Now, I've looked in PHPMyAdmin and mybb_threads does exist but it seems that it's trying to fetch something using a double prefix like mybb_mybb_threads . I see in the code that it doesn't ask for 2 prefix's in a row, Is this a know issue or simple to fix? Smile
Like I said before (I think) you'd need to remove the TABLE_PREFIX macro from the database queries.
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