MyBB Community Forums

Full Version: Help with site news plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I've installed the Site News plugin for MyBB and did all the things that were posted in the readme (very short readme!!)

Quote:1) Upload inc/plugins/newsplugins.php to your plugins directory (usually inc/plugins/)
2) Use the code in news.php in your site, and change the $directory_to_forum variable to the directory to the forum you are using this plugin on.
3) Activate the plugin
But I can't seem to get it to work. I used same kind of plugins for phpBB3 but with those plugins I could easily define everything but somehow I can't get it done with this plugin (I don't get messages shown in my website at all).

Can someone please help me with getting this thing to work? Any help is appreciated!
Can you elaborate on how it didn't work?

Did you set a forum id in the news plugin settings?
Tikitiki Wrote:Can you elaborate on how it didn't work?

Did you set a forum id in the news plugin settings?
I've installed and activated the plugin. I set forum ID 2 as the news forum and posted some test messages in the forum (with id 2). I uploaded news.php to test it, and added the directory where my forum is in the code like this (I made the code a bit shorter with [...] for the quote):

Quote:<?php
[...]
// The Directory to the forum you are using this on.
// You do not need a beggining or trailing slash
$directory_to_forum = "forum";

require dirname(__FILE__)."/".$directory_to_forum."/global.php";
[....]
?>

Now when I go to the news.php, which is in the root of my domain I get a blank page. When I view the source it's also completely blank. Could have something to be with my host's PHP settings?
*bump* Any ideas that might help to fix the problem?
The setting for the plugin is turned "on" right?
Tikitiki Wrote:The setting for the plugin is turned "on" right?
Yes, it's turned on Smile

I think it might be my host because with some other php script I also had problems because it was also showing a blank page. But most php scripts always worked for me Sad
Here is some extra info, I asked the host if they use different settings for PHP compared to most other hosting companies. The following list is what they think deviates from regular hosts:
Quote:* safe_mode = Off
* display_errors = Off
* register_globals = Off
* register_long_arrays = Off
* register_argc_argv = Off
* magic_quotes_gpc = Off
* enable_dl = Off
Does anybody know if this could have something to do with the fact that I only get a blank page when I load up news.php?

Thanks for any input, I really would like this plugin to work! But I don't know what to do anymore.
Zoog,
You've probably sorted the problem now, but I'll post this anyway in case other folk want to use this useful plug-in.

You can get the posts to appear by doing the following 2 things:

1. In newsplugin.php change:

if($mybb->settings['newsplugin_off'] != "off")
to
if($mybb->settings['newsplugin_off'] != "off")

2. In the same file change:

$fid = " t.fid='".intval($mybb->settings['newsplugin_fid'])."' AND";
to
$fid = " t.fid='4' AND";

This is a blatant hack but it does show you where the problem lies.

- Jim
(2008-11-04, 07:45 PM)whippet Wrote: [ -> ]1. In newsplugin.php change:

if($mybb->settings['newsplugin_off'] != "off")
to
if($mybb->settings['newsplugin_off'] != "off")

do you mean:
if($mybb->settings['newsplugin_off'] != "off")
to
if($mybb->settings['newsplugin_off'] != "0")
???