Current time: 05-24-2012, 11:02 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forum Integration - Recent Posts on Main Site
07-18-2010, 11:17 PM
Post: #31
RE: Forum Integration - Recent Posts on Main Site
(05-19-2010 05:40 PM)MaTaX Wrote:  have an error...


Fatal error: Cannot redeclare get_attachment_icon() (previously declared in /home/veteranc/public_html/test/wp-includes/post-template.php:1027) in /home/veteranc/public_html/test/forums/inc/functions.php on line 2723

Here is what I have in my code...

Code:
<!--recent posts-->
<?php
chdir("forums/"); // path to MyBB
define("IN_MYBB", 1);
require("./global.php");
?>
<!--/recent posts-->
That is at the very top of my header.php file (I'm using wordpress btw)

Here is my site...

http://www.veterancompany.sitefrost.com/test

when you go there it reads from index.php, which sends it to a series of folders until it reaches the folder where the theme I am using is located and that is the index.php it reads from

now my forums are located in "test/forums" so I put "forums/" in there, is there a problem somewhere that I'm not seeing?

i got the same exact error. :|

Josh X | OWXD - OddWorld XD
Visit this user's website Find all posts by this user
Quote this message in a reply
08-15-2010, 07:52 PM
Post: #32
RE: Forum Integration - Recent Posts on Main Site
(07-18-2010 11:17 PM)The Grinch Wrote:  
(05-19-2010 05:40 PM)MaTaX Wrote:  have an error...


Fatal error: Cannot redeclare get_attachment_icon() (previously declared in /home/veteranc/public_html/test/wp-includes/post-template.php:1027) in /home/veteranc/public_html/test/forums/inc/functions.php on line 2723

Here is what I have in my code...

Code:
<!--recent posts-->
<?php
chdir("forums/"); // path to MyBB
define("IN_MYBB", 1);
require("./global.php");
?>
<!--/recent posts-->
That is at the very top of my header.php file (I'm using wordpress btw)

Here is my site...

http://www.veterancompany.sitefrost.com/test

when you go there it reads from index.php, which sends it to a series of folders until it reaches the folder where the theme I am using is located and that is the index.php it reads from

now my forums are located in "test/forums" so I put "forums/" in there, is there a problem somewhere that I'm not seeing?

i got the same exact error. :|

I also am using WP and receive this error. have not figured out how to correct this yet.

I was hoping that this works, because I would rather use this method then using the RSS that I am currently using.

Thank you for anyone who is able to fix this for us WP users.

Derrick[at]
MyPriceSavings.com
Find all posts by this user
Quote this message in a reply
08-16-2010, 10:21 PM
Post: #33
RE: Forum Integration - Recent Posts on Main Site
Thanks for this.

Hello!
Visit this user's website Find all posts by this user
Quote this message in a reply
10-09-2010, 02:54 AM
Post: #34
RE: Forum Integration - Recent Posts on Main Site
Try including the latest posts in a separate page like latest-posts.php, and then call to it in your layout as a iframe
Find all posts by this user
Quote this message in a reply
10-14-2010, 02:21 PM (This post was last modified: 10-14-2010 02:22 PM by zohair.)
Post: #35
RE: Forum Integration - Recent Posts on Main Site
thanks for this ...
i have a question :
if my forum is in root and my portal ( for example wp) is in subdomain , then what should i place in line 2 for path of forum? i say this : chdir("forums/"); // path to MyBB

my forum url : http://www.85ohm.ir
my portal url : download.85ohm.ir

Find all posts by this user
Quote this message in a reply
02-21-2011, 08:53 AM
Post: #36
RE: Forum Integration - Recent Posts on Main Site
PHP Code:
".htmlspecialchars_uni($fetch['subject'])."
"; 
$poster = "{$fetch['username']}"; $list .= "" .$fetch['replies']. " Replies"; $list .= " " .$fetch['views']. " Views
"; $list .= " (Last post by" .$fetch['lastposter']. ")

"; } //output echo $list; ?>
Find all posts by this user
Quote this message in a reply
02-23-2011, 01:56 AM
Post: #37
RE: Forum Integration - Recent Posts on Main Site
Thanks! Is there a way to use this as a wordpress widget?
Find all posts by this user
Quote this message in a reply
04-01-2011, 10:01 PM
Post: #38
RE: Forum Integration - Recent Posts on Main Site
What about if we just want to show the recent threads from a specific forum id?

<snip - warez>
Find all posts by this user
Quote this message in a reply
07-21-2011, 02:15 PM
Post: #39
RE: Forum Integration - Recent Posts on Main Site
This user has been denied support. This user has been denied support.
How to add this in a widget on wordpress ?

Simply the Best!
Visit this user's website Find all posts by this user
Quote this message in a reply
02-12-2012, 12:28 AM
Post: #40
RE: Forum Integration - Recent Posts on Main Site
I cut and pasted what the OP said and nothing appears on my site. I put this before the <head>

Quote:<?php
chdir("http://theripetomato.ca/forums//"); // path to MyBB
define("IN_MYBB", 1);
require("./global.php");
?>

Then I put this:

Quote:$query = mysql_query("
SELECT t.*, u.username
FROM mybb_threads t
LEFT JOIN mybb_users u ON (u.uid=t.uid)
WHERE 1=1 AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, 6" // Change the last digit to how many recent post you want to be shown
);


Nothing happens.

The Ripe Tomato
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication