Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying News on Homepage
It should be in the tutorials forum: http://community.mybboard.net/forumdisplay.php?fid=38
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Reply
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
Reply
The code I stole from portal.php pre-1.2 is broke now, so im really awaiting this plugin Big Grin
Reply
Here is a beta of the Site News Plugin. Please test. Instructions are attached in the file.

Cheers Smile


Attached Files
.zip   site_news.zip (Size: 3.94 KB / Downloads: 276)
Reply
Looking awesome! http://www.gameserverinformer.com/ Smile
Thanks so much!
Reply
hi! There is a way to show in thw news.php page only the first 150 characters on the topic?
Reply
I dont understand how to install this plugin. The ReadMe file isn't very helpful.
Where do I put the news.php
Code:
<?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.
Reply
bumpety bump
Reply
Lee69 Wrote:
PHP Code:
<?php 
...
    
$pattern = array(
        
//[ul]
        
'#\[list\](.*?)\[\/list\]#si',
        
//[*]
        
'#\[\*\](.*?)(\r\n|\r|\n|<br>|<br />|<br/>)#si',
....
?>
And the quote

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

PHP Code:
//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
Code:
div.quote_header {
....
}

div.quote_body {
...
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)