MyBB Community Forums

Full Version: Displaying News on 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
It should be in the tutorials forum: http://community.mybboard.net/forumdisplay.php?fid=38
Tikitiki Wrote:Just for all of you that wanted to know, I've created a plugin that will allow you to show your news on the home page, with options like, what forum(s) to fetch it from, and how many to show. It will be release when MyBB 1.2 comes out
Awesome, I am REALLY looking forward to this. Thanks in advance for the work, it's a great peice of news indeed.Smile
The code I stole from portal.php pre-1.2 is broke now, so im really awaiting this plugin Big Grin
Here is a beta of the Site News Plugin. Please test. Instructions are attached in the file.

Cheers Smile
Looking awesome! http://www.gameserverinformer.com/ Smile
Thanks so much!
hi! There is a way to show in thw news.php page only the first 150 characters on the topic?
I dont understand how to install this plugin. The ReadMe file isn't very helpful.
Where do I put the news.php
<?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 = ""; 

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

$plugins->run_hooks("site_news_plugin_run");

?>

and what do I have to change in the above code????
HELP!
Thanks.
bumpety bump
Lee69 Wrote:
<?php 
...
	$pattern = array(
		//[ul]
		'#\[list\](.*?)\[\/list\]#si',
		//[*]
		'#\[\*\](.*?)(\r\n|\r|\n|<br>|<br />|<br/>)#si',
....
?>
And the quote

//quote
'#\[quote](.*?)\[\/quote\]#si',
'#\[quote=(&quot;|"|\'|)(.*?)\\1\](.*?)\[\/quote\]#si',

//quote
'<div class="quote_header">Wrote:</div><div class="quote_body">$1</div>',
'<div class="quote_header">$2 Wrote:</div><div class="quote_body">$3</div>',
		

in file .css
div.quote_header {
....
}

div.quote_body {
...
}
Pages: 1 2 3 4 5 6 7 8 9 10 11 12