[ABD] News Forum

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

[ABD] News Forum

Post by Erik Frèrejean » Thu Nov 08, 2007 3:49 pm

Mod name: News forum
Mod description: Provides an easy way to create a news page (outside the board), which I created form specified fora.

This mod adds a extra option on the edit/create forum page. By setting this option on yes, this forum will be used as news forum (You can do this for every forum you have on the board.).
Image

In the package is also included a new class, which handles the news and a rss feed. See the example file (contrib/example.php), on how to use the class.

Mod version: 0.0.Beta 2
Mod download: https://sourceforge.net/project/showfil ... _id=271079
Many thanks to kateland for recovering this file :)
Mod format:
Image

NOTE: this mod requires some basic php knowledge to be used!!!
Last edited by Erik Frèrejean on Thu Jun 11, 2009 12:03 pm, edited 4 times in total.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

Mathijs1988
Registered User
Posts: 112
Joined: Wed Aug 08, 2007 9:54 am

Re: [BETA] News Forum

Post by Mathijs1988 » Thu Nov 08, 2007 6:32 pm

First ;). I will help you test this mod, however it might take some time before I can start. I just found out I have a hell of alot of work for school, darnit. Will be posting later on!

Edit: Love the work you've done so far, however a small & fast readme wouldn't hurt, for noobs like me. I have very basic knowledge to alter scripts and all that stuff, but to be honest I have no clue where to start with this :oops:.

moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: [BETA] News Forum

Post by moifest » Thu Nov 08, 2007 6:42 pm

Cant get download to work :cry:

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [BETA] News Forum

Post by Erik Frèrejean » Thu Nov 08, 2007 6:46 pm

Read me
What to do, to install this mod (in a nut shell):
  • Download the tar.gz archive.
  • Open news_forum.xml in your browser and follow the instructions
    After you done this, you have done the part which effects the board.
  • Create a new file, for example news.php
  • Put in this file the content of contrib/example.php
  • Open news.php in your browser et voila :). (if you put ?view=rss after news.php in your adress bar you come in the rss feed.
You now have a very basic news site without any markup. From this point you can start creating some markup for the news page.
moifest wrote:Cant get download to work :cry:
My fault, I just updated my site. I'll make a little change to the .htaccess, it will work in a very short while.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

leelo_x
Registered User
Posts: 59
Joined: Tue Oct 11, 2005 4:17 pm

Re: [BETA] News Forum

Post by leelo_x » Thu Nov 08, 2007 11:40 pm

Hi..
Thanks for this mod. I think I am ready to try and install. I just have a few questions :) ...
I am getting this error when I try to open the .xml page

Code: Select all

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

End tag 'find' does not match the start tag 'action'. Error processing resource 'http://www.mypage.com/forum/news_...

 //-- End News forum]]></find>
-------------------------^
Does anyone know what I am doing wrong?

Thank you!
-l.

RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] News Forum

Post by RedTrinity » Fri Nov 09, 2007 12:14 am

Sounds great, would love to see a demo!

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [BETA] News Forum

Post by ecwpa » Fri Nov 09, 2007 1:26 am

leelo_x wrote:Does anyone know what I am doing wrong?

Thank you!
-l.
i think there is a small error in that xml

check your line 101

replace

Code: Select all

    //-- End News forum]]></find> 
with

Code: Select all

	//-- End News forum]]></action>
by the way, the root folder is empty, at least in the tar.gz I just downloaded
Last edited by ecwpa on Fri Nov 09, 2007 6:14 pm, edited 1 time in total.
carefull, not english speaker native here

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [BETA] News Forum

Post by ecwpa » Fri Nov 09, 2007 1:44 am

// double post, any mod please delete this one
Last edited by ecwpa on Fri Nov 09, 2007 6:14 pm, edited 2 times in total.
carefull, not english speaker native here

Mathijs1988
Registered User
Posts: 112
Joined: Wed Aug 08, 2007 9:54 am

Re: [BETA] News Forum

Post by Mathijs1988 » Fri Nov 09, 2007 1:27 pm

Root folder indeed is empty.

leelo_x
Registered User
Posts: 59
Joined: Tue Oct 11, 2005 4:17 pm

Re: [BETA] News Forum

Post by leelo_x » Fri Nov 09, 2007 2:40 pm

Hi,
I cannot find the line in the code ...
//-- End News forum]]></find>
Here is my code:

Code: Select all

</header>
	<action-group>
		<copy>
			<file from="root/includes/news.php" to="includes/news.php" />
		</copy>
		<sql><![CDATA[ALTER TABLE `phpbb_forums` ADD `news_forum` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'Set value on 1 to use this forum in the news system.';]]></sql>
		<open src="includes/acp/acp_forums.php">
			<edit>
				<find><![CDATA['enable_icons'			=> request_var('enable_icons', false),]]></find>
				<action type="after-add"><![CDATA[						//-- News forum
							//-- Add
							'enable_news_forum'		=> request_var('enable_news_forum', false),
							//-- End News forum]]></action>
			</edit>
			<edit>
				<find><![CDATA['enable_icons'			=> false,]]></find>
				<action type="after-add"><![CDATA[							//-- News forum
							//-- Add
							'enable_news_forum'		=> true,
							//-- End News forum]]></action>
			</edit>
			<edit>
				<find><![CDATA['S_TOPIC_ICONS'				=> ($forum_data['enable_icons']) ? true : false,]]></find>
				<action type="after-add"><![CDATA[					//-- News forum
					//-- Add
					'S_NEWS_FORUM'			=> ($forum_data['news_forum']) ? true : false,
					//-- End News forum]]></action>
			</edit>
		</open>
		<open src="adm/style/acp_forums.html">
			<edit>
				<find><![CDATA[		<dl>
			<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
			<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
		</dl>]]></find>
				<action type="after-add"><![CDATA[		<!-- News forum -->
		<dl>
			<dt><label for="enable_news_forum">{L_ENABLE_NEWS_FORUM}:</label><br /><span>{L_ENABLE_NEWS_FORUM_EXPLAIN}</span></dt>
			<dd><label><input type="radio" class="radio" name="enable_news_forum" value="1"<!-- IF S_NEWS_FORUM --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
				 <label><input type="radio" class="radio" name="enable_news_forum" value="0"<!-- IF not S_NEWS_FORUM --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
		</dl>
		<!-- /News forum -->]]></action>
			</edit>
		</open>
		<open src="language/en/acp/forums.php">
			<edit>
				<find><![CDATA['FORUM_TOPICS_PAGE_EXPLAIN'			=> 'If non-zero this value will override the default topics per page setting.',]]></find>
				<action type="after-add"><![CDATA[	//-- News forum
	//-- Add
	'ENABLE_NEWS_FORUM'				=> 'Use as news forum',
	'ENABLE_NEWS_FORUM_EXPLAIN'		=> 'Use this forum for the news page and rss feed',
	//-- End News forum]]></action>
			</edit>
		</open>
		<diy-instructions lang="en-gb">Create a page on your website where you want to show the news items. See contrib/example.php.</diy-instructions>
	</action-group>
</mod>
:(

Mathijs1988
Registered User
Posts: 112
Joined: Wed Aug 08, 2007 9:54 am

Re: [BETA] News Forum

Post by Mathijs1988 » Fri Nov 09, 2007 3:09 pm

Are you sure you are opening news_forum.xml?

moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: [BETA] News Forum

Post by moifest » Fri Nov 09, 2007 4:29 pm

Having a bit of trouble getting this to work.

First off the news_forum.xml SQL info is wrong.

Code: Select all

ALTER TABLE `phpbb_forums` ADD `news_forum` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'Set value on 1 to use this forum in the news system.';
Needs to be

Code: Select all

ALTER TABLE `phpbb_forums` ADD `enable_news_forum` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'Set value on 1 to use this forum in the news system.';
Once that is done, I edited the example.php changing the phpBB root path to mine and ran the file but its saying includes/news.php is missing.

Is this file supposed to be in the download package as the example.php calls the news.php file from the includes folder as well.

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [BETA] News Forum

Post by ecwpa » Fri Nov 09, 2007 6:21 pm

here my news_forum.xml file, leelo_x

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--
	For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.
	Although MODs are checked before being allowed in the MODs Database there is no guarantee that there
	are no security problems within the MOD. No support will be given for MODs not found within the MODs
	Database which can be found at http://www.phpbb.com/mods/
-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
		<title lang="en-gb">News forum</title>
		<description lang="en-gb">Provides an easy way to create a news page (outside the board), which I created form specified fora.</description>
		<author-notes lang="en-gb"></author-notes>
		<author-group>
			<author>
				<realname>Erik Frerejean</realname>
				<email>erikfrerejean@yahoo.co.uk</email>
				<username>Erik Frerejean</username>
				<homepage>(N/A)</homepage>	
			</author>
		</author-group>
		<mod-version>
			<major>0</major>
			<minor>0</minor>
			<revision>B1</revision>
		</mod-version>
		<installation>
			<level>easy</level>
			<time>300</time>
			<target-version>
				<target-primary>3.RC7</target-primary>
				<target-major allow="exact">3</target-major>
				<target-minor allow="exact">0</target-minor>
			</target-version>
		</installation>
		<history>
			<entry>
				<date>2007-11-07</date>
				<rev-version>
					<major>0</major>
					<minor>0</minor>
					<revision>B1</revision>
				</rev-version>
				<changelog lang="en-gb">
					<change>First release of the mod</change>
				</changelog>
			</entry>
		</history>
	</header>
	<action-group>
		<copy>
			<file from="root/includes/news.php" to="includes/news.php" />
		</copy>
		<sql><![CDATA[ALTER TABLE `phpbb_forums` ADD `news_forum` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'Set value on 1 to use this forum in the news system.';]]></sql>
		<open src="includes/acp/acp_forums.php">
			<edit>
				<find><![CDATA['enable_icons'			=> request_var('enable_icons', false),]]></find>
				<action type="after-add"><![CDATA[						//-- News forum
							//-- Add
							'enable_news_forum'		=> request_var('enable_news_forum', false),
							//-- End News forum]]></action>
			</edit>
			<edit>
				<find><![CDATA['enable_icons'			=> false,]]></find>
				<action type="after-add"><![CDATA[							//-- News forum
							//-- Add
							'enable_news_forum'		=> true,
							//-- End News forum]]></action>
			</edit>
			<edit>
				<find><![CDATA['S_TOPIC_ICONS'				=> ($forum_data['enable_icons']) ? true : false,]]></find>
				<action type="after-add"><![CDATA[					//-- News forum
					//-- Add
					'S_NEWS_FORUM'			=> ($forum_data['news_forum']) ? true : false,
					//-- End News forum]]></action>
			</edit>
		</open>
		<open src="adm/style/acp_forums.html">
			<edit>
				<find><![CDATA[		<dl>
			<dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
			<dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
		</dl>]]></find>
				<action type="after-add"><![CDATA[		<!-- News forum -->
		<dl>
			<dt><label for="enable_news_forum">{L_ENABLE_NEWS_FORUM}:</label><br /><span>{L_ENABLE_NEWS_FORUM_EXPLAIN}</span></dt>
			<dd><label><input type="radio" class="radio" name="enable_news_forum" value="1"<!-- IF S_NEWS_FORUM --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
				 <label><input type="radio" class="radio" name="enable_news_forum" value="0"<!-- IF not S_NEWS_FORUM --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
		</dl>
		<!-- /News forum -->]]></action>
			</edit>
		</open>
		<open src="language/en/acp/forums.php">
			<edit>
				<find><![CDATA['FORUM_TOPICS_PAGE_EXPLAIN'			=> 'If non-zero this value will override the default topics per page setting.',]]></find>
				<action type="after-add"><![CDATA[	//-- News forum
				//-- Add
	'ENABLE_NEWS_FORUM'				=> 'Use as news forum',
	'ENABLE_NEWS_FORUM_EXPLAIN'		=> 'Use this forum for the news page and rss feed',
	//-- End News forum]]></action>
			</edit>
		</open>
		<diy-instructions lang="en-gb">Create a page on your website where you want to show the news items. See contrib/example.php.</diy-instructions>
	</action-group>
</mod>
carefull, not english speaker native here

leelo_x
Registered User
Posts: 59
Joined: Tue Oct 11, 2005 4:17 pm

Re: [BETA] News Forum

Post by leelo_x » Fri Nov 09, 2007 8:20 pm

all of a sudden..it works!!
I updated it and tried right after. looks like you need to wait a few hrs for the code to update.
thanks!
-l.
Mathijs1988 wrote:Are you sure you are opening news_forum.xml?

leelo_x
Registered User
Posts: 59
Joined: Tue Oct 11, 2005 4:17 pm

Re: [BETA] News Forum

Post by leelo_x » Fri Nov 09, 2007 8:50 pm

just realized i don't have 3.0 version.. :cry:
guess there's no mod in development for 2.0??

Locked

Return to “[3.0.x] Abandoned MODs”

cron