Kod:
## EasyMod 0.0.7 compliant
##############################################################
## MOD Title: FIND - Forum Integrated News Delivery - Input
## MOD Author: netclectic < adrian@netclectic.com > (Adrian Cockburn) http://www.netclectic.com
## MOD Description: Delivers rss / xml newsfeeds direct to your forums.
## MOD Version: 0.9.6 BETA
##
## Installation Level: Moderate
## Installation Time: 15 Minutes
## Files To Edit: (2) constants.php, lang_main.php
## Included Files: (6) news_insert.php, functions_news.php, rss_parser.php, admin_newsfeeds.php,
## newsfeeds_body.tpl, lang_admin_find.php
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
##
## Easymod 0.0.7 Compliant.
## Requires you to be able to setup a script to run as a cron job (or similar).
## Includes addition of 1 table to your database and 1 insert into config table.
##
## IMPORTANT!!
## Step 1 : Follow the instructions below.
## Step 2 : Browse to your Admin Control Panel and configure the Newsfeeds.
## Step 3 : Perform news insert by clicking the 'Get News Now' button.
##
## Ensure everything works as expected before setting up the automation in step 4.
##
## If you do not have access to any automation tools then you will have to stop at
## this point and regularly run the news insert script manually from the newsfeed admin page.
##
## Step 4 : Finally, set up an automated task to run the news insert automatically.
##
## LINUX SYSTEMS
## -------------
## Set up a cron job (I use a quarter daily cron job) containing the following...
## (if anyone knows a better way of doing this, please let me know!)
##
## lynx -dump http://www.YOURDOMAIN.com/YOURFORUMS/news_insert.php > /dev/null
##
##
## WINDOWS SYSTEMS
## ---------------
## Create a batch (.bat) file containging the following...
##
## YOUR_PATH_TO_PHP -q YOUR_PATH_TO_NEWS_INSERT.php
##
## Set up a windows system task as follows...
##
## [*] open Windows Task Scheduler
## [*] create a new task
## [*] enter YOUR_PATH_BAT_FILE (with the quotes!)
## [*] give it a scheduled time to run
## [*] on the settings tab, check the Stop the task box and set the value to 0 hrs 1 minute
## (this should be plenty long enough and is probably longer than your php timeout setting).
##
##
## Change History:
## 0.9.6 BETA : Minor changes to admin page. Now Easymod 0.0.7 Compliant.
## 0.9.5 BETA : Changed layout of admin page. Added Limit per news feed. Added Get News Now button.
## 0.9.4 BETA : Tidied up the admin page, added explanations etc..
## 0.9.3 BETA : Changed the order of input so the posts appear most recent first.
## Added list of newsfeed sources to Admin page.
## 0.9.2 BETA : Fixed problem with user prefs (ie language etc.) not being set, which was
## causing the Read More link not to be shown.
## 0.9.1 BETA : Removed sessions stuff, now handle getting / updating user info manually.
## This fixes problems experienced when using from a cron job.
## 0.9.0 BETA : First BETA release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_newsfeeds (
feed_id smallint(5) unsigned NOT NULL auto_increment,
forum_id smallint(5) unsigned NOT NULL DEFAULT '0' ,
news_url varchar(255) NOT NULL DEFAULT '' ,
news_name varchar(60) ,
news_limit smallint(5) unsigned NOT NULL DEFAULT '0' ,
news_active tinyint(1) unsigned NOT NULL DEFAULT '1' ,
include_channel tinyint(1) unsigned NOT NULL DEFAULT '0' ,
include_image tinyint(1) unsigned NOT NULL DEFAULT '0' ,
PRIMARY KEY (feed_id),
KEY forum_id (forum_id)
);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('news_userid', '-1');
#
#-----[ COPY ]------------------------------------------
#
copy news_insert.php to news_insert.php
copy functions_news.php to includes/functions_news.php
copy rss_parser.php to includes/rss_parser.php
copy admin_newsfeeds.php to admin/admin_newsfeeds.php
copy newsfeeds_body.tpl to templates/subSilver/admin/newsfeeds_body.tpl
copy lang_admin_find.php to language/lang_english/lang_admin_find.php
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------
#
define('NEWSFEEDS_TABLE', $table_prefix.'newsfeeds');
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]-----------------------------------
#
$lang['News_Read_More'] = 'Read more...';
$lang['News_source'] = 'Source: ';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
a jak to zrobić?
nenros.ovh.org- dopiero pracuje