NovaArgon Posted November 23, 2007 Share Posted November 23, 2007 Sorry if this double posts it kept saying I had already posted it but not showed up. Sup mate's I have been trying to get my page working for a while now and a friend told me you guys might be able to help me out or at least point me in the right direction. I have a web page and a forum http://www.adviceforums.org & http://www.adviceforums.org/phpBB3 I am trying to get the recent post from the forums to show up on the webpage. using the mod attatched. I have followed all the instructions as far as I can tell but its still not working. I am getting this error on my homepage where the topics should be displayed. include($phpbb_root_path . 'includes/functions_display.' . $phpEx); include($phpbb_root_path . 'includes/functions_posts_anywhere.' . $phpEx); $forum_id = 0;//forum id to display recent posts from $limit = 10;//number of posts to show on the page $char_limit = 500;//character limit for each post (more button will show for posts over this size) $unique = true; //display only 1 post per topic? true or false $recursive = false; //view new posts in the forum selected and any subforums? true or false display_posts($forum_id, $limit, $char_limit, $unique, $recursive); I have already tried to get help where I got the mod but there page is now being updated. The last thing the guy said to me was that everything was setup right but my index.html file does not work the the post.php or something to that effect. I am hoping you guys might know what he ment by that or be able to help me in some way. Thanks so much for taking the time to look at this. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/ Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 HTML files will not parse PHP. Try renaming your INDEX.HTML to INDEX.PHP Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397726 Share on other sites More sharing options...
NovaArgon Posted November 23, 2007 Author Share Posted November 23, 2007 http://www.adviceforums.org/index.php http://www.adviceforums.org/index.html Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397728 Share on other sites More sharing options...
wsantos Posted November 23, 2007 Share Posted November 23, 2007 Do you have the php tags? <?php include($phpbb_root_path . 'includes/functions_display.' . $phpEx); include($phpbb_root_path . 'includes/functions_posts_anywhere.' . $phpEx); $forum_id = 0;//forum id to display recent posts from $limit = 10;//number of posts to show on the page $char_limit = 500;//character limit for each post (more button will show for posts over this size) $unique = true; //display only 1 post per topic? true or false $recursive = false; //view new posts in the forum selected and any subforums? true or false display_posts($forum_id, $limit, $char_limit, $unique, $recursive); ?> Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397729 Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 You need <?PHP ?> around your PHP code Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397730 Share on other sites More sharing options...
NovaArgon Posted November 23, 2007 Author Share Posted November 23, 2007 Thank you guys so much for helping me. This is the new error message after the update Warning: include(includes/functions_display.) [function.include]: failed to open stream: No such file or directory in /home/advisorg/public_html/index.php on line 52 Warning: include() [function.include]: Failed opening 'includes/functions_display.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/advisorg/public_html/index.php on line 52 Warning: include(includes/functions_posts_anywhere.) [function.include]: failed to open stream: No such file or directory in /home/advisorg/public_html/index.php on line 53 Warning: include() [function.include]: Failed opening 'includes/functions_posts_anywhere.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/advisorg/public_html/index.php on line 53 Fatal error: Call to undefined function display_posts() in /home/advisorg/public Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397732 Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 You need to adjust the code to point to the path where your includes folder resides. Probably here /home/advisorg/public_html/phpBB3/includes Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397733 Share on other sites More sharing options...
NovaArgon Posted November 24, 2007 Author Share Posted November 24, 2007 Where do i need to make that change? In the index.php? Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397854 Share on other sites More sharing options...
trq Posted November 24, 2007 Share Posted November 24, 2007 Yes. Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397856 Share on other sites More sharing options...
NovaArgon Posted November 24, 2007 Author Share Posted November 24, 2007 I may have not done this right. I changed it and now i'm getting this error message. Warning: include(/home/advisorg/public_html/phpBB3/includes/functions_display.) [function.include]: failed to open stream: No such file or directory in /home/advisorg/public_html/index.php on line 52 Warning: include() [function.include]: Failed opening '/home/advisorg/public_html/phpBB3/includes/functions_display.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/advisorg/public_html/index.php on line 52 Warning: include(/home/advisorg/public_html/phpBB3/includes/functions_posts_anywhere.) [function.include]: failed to open stream: No such file or directory in /home/advisorg/public_html/index.php on line 53 Warning: include() [function.include]: Failed opening '/home/advisorg/public_html/phpBB3/includes/functions_posts_anywhere.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/advisorg/public_html/index.php on line 53 Fatal error: Call to undefined function display_posts() in /home/advisorg/public_html/index.php on line 60 This is the part of the file that I changed <?php include($phpbb_root_path . '/home/advisorg/public_html/phpBB3/includes/functions_display.' . $phpEx); include($phpbb_root_path . '/home/advisorg/public_html/phpBB3/includes/functions_posts_anywhere.' . $phpEx); $forum_id = 0;//forum id to display recent posts from $limit = 10;//number of posts to show on the page $char_limit = 500;//character limit for each post (more button will show for posts over this size) $unique = true; //display only 1 post per topic? true or false $recursive = false; //view new posts in the forum selected and any subforums? true or false display_posts($forum_id, $limit, $char_limit, $unique, $recursive); ?> Thank you guys so much for your help I really appreciate it Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397865 Share on other sites More sharing options...
NovaArgon Posted November 24, 2007 Author Share Posted November 24, 2007 I added the file ext on the end of the functions_posts_anywhere.php functions_display.php The error message went away but its still not showing the posts Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-397878 Share on other sites More sharing options...
wsantos Posted November 24, 2007 Share Posted November 24, 2007 It seemed to me that you have parse errors somewhere that is why it if you look at the later part of the source the last entry is just the header. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <title>Advice Forums Home</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org" /> <meta name="keywords" content="Advice Forums, Money Advice Forums, Relationship Advice Forums, Parenting Advice Forums, Pet Advice Forums" /> <meta name="description" content="Advice Forums is based on the idea that you can learn how to do anything with alittle advice. It's about helping people and sharing knowledge. I hope you enjoy your time here and spend it helping yourself and others. Welcome to our community." /> <meta name="robots" content="index, follow" /> <link href="style2.css" rel="stylesheet" type="text/css" /> </head> <script type="text/javascript" src="http://shots.snap.com/ss/09c6f7d6c2bd3571d2bd4d2cec8b013c/snap_shots.js"></script> <body> <div id="wrapper"> <div id="header"><a href="index.php"> <img src="Img/logo.jpg" class="logo" alt="Advice Forums" title="Advice Forums" /> </a> <div id="nav"> <ul> <li><a href="index.php" class="selected">Home</a></li> <li><a href="phpBB3">Forums</a></li> <li><a href="blank.php">Comming Soon</a></li> <li><a href="contact.php">Contact</a></li> </ul> </div> <!-- END NAV --> </div> <!-- END HEADER --> <div id="content"> <div id="col1"> <h1>Welcome</h1> <p class="quote"><img src="Img/quote.jpg" alt="quote" class="quote" />The happiness of your life depends upon the quaility of your thoughts.</p> <p>Advice Forums is based on the idea that you can learn how to do anything with alittle advice. It's about helping people and sharing knowledge. I hope you enjoy your time here and spend it helping yourself and others.</p> <p>Welcome to our community.</p> </div> <!--END COL1--> <div id="col2"> <h1>Recent Post</h1> Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-398140 Share on other sites More sharing options...
NovaArgon Posted November 24, 2007 Author Share Posted November 24, 2007 I don't really understand how to fix the parse or what it is. I can delete my page and forums and do a fresh install or maybe use a different template on my homepage. I just need some help or something to read that will explain the problem to me. I don't know if there is just some code that I have typed in wrong or if it's a compatibility issue with my host I just would like to get it working and I don't know what to do next. Thanks so much for helping me out with this. Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-398266 Share on other sites More sharing options...
silver9990 Posted November 25, 2007 Share Posted November 25, 2007 Looks like your missing .php: Warning: include(/home/advisorg/public_html/phpBB3/includes/functions_display.) Replace include($phpbb_root_path . 'includes/functions_display.' . $phpEx); include($phpbb_root_path . 'includes/functions_posts_anywhere.' . $phpEx); With include($phpbb_root_path . 'includes/functions_display.php'); include($phpbb_root_path . 'includes/functions_posts_anywhere.php'); Quote Link to comment https://forums.phpfreaks.com/topic/78605-solved-php-and-indexhtml-not-playing-nice/#findComment-398599 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.