MyBB Community Forums

Full Version: Site News Plugin Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again, I installed and activated the plugin for the Site News and when I added the code from the news.php provided, any coding below it stops displaying and the plugin doesn't display the test topic I added on the forums.

The location of the test page is: http://www.ffskies.com/beta/index.php
The location of the test forum is: http://www.ffskies.com/beta-forums

In terms of what I modified is as below:
<?php

define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);

// The Directory to the forum you are using this on. 
// You do not need a beggining or trailing slash
$directory_to_forum = "/beta-forums"; 

require dirname(__FILE__)."/".$directory_to_forum."/global.php";

$plugins->run_hooks("site_news_plugin_run");

?>

I made sure that the forum to pull the news from is correct (which is 2).

Sorry about this, its probs something obvious but I just can't figure it out.

Thanks in advance.
test
$directory_to_forum = "../beta-forums"; 
still got the same problem.
mmmm ...
test in this mode

for a my site si OK
$directory_to_forum = "../beta-forums"; 
chdir("$directory_to_forum");
define("IN_MYBB", 1);
require "$directory_to_forum/global.php";
$plugins->run_hooks("site_news_plugin_run");
thanks, it all works now Big Grin.
sorry about double post here, but i have a new problem which relates to this.

when i try and add the login/register option on the same page only one feature works and not the other.

so for example if i put that code you provided at the top of the php file the news then doesnt appear, just shows the message
Quote:There are no announcements available at this time.

but then if i do it the way i currently have it (the news is an include), then the news appears but you can't login, just keeps the login box even though i am logged in.

do you have any idea what to do?
the URL for a Login (top page) not work, is wrong
i see in the HTML
<form action='/member.php' method='post'>
you need this
<form action='../beta-forums/member.php' method='post'>
right it logs in but when it doesnt keep you logged in on the page you logged in from, instead the log in box appears still.

have i placed the coding in the wrong places or something?
i was wondering is it possible to set a length limit on the site news plugin so for example instead of displaying the entire post it only displays say the first 2 lines or 200 words?

if so how do i do it as i have seen it being used using other community board systems.
anyone?