[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
jimmy6154
Registered User
Posts: 8
Joined: Sat Feb 02, 2008 1:44 am

Re: [BETA] News Forum

Post by jimmy6154 »

WooT!!! its working now, anyways I'm not sure what happened but I had to see if the page was actually loading or something. So at the very bottom of the example.php page, I just typed a fe text words.

I reloaded the page and whamo! it worked....

lol weird I think... anyways thanks for your help.

oh and here is the page

http://thewarcouncil.net/default2.htm

I still have some tweaking to do with the css so view it in IE. but it will give you the gist...

thanks again

Taddeo
Registered User
Posts: 1
Joined: Thu Feb 07, 2008 10:32 am

Re: [BETA] News Forum

Post by Taddeo »

whenever I click the radio button to yes to use as a news forum it comes up as no when I visit the edit page again. However if I look at it in the SQL using phpmyadmin it comes up as 1 (active).

While it would be nice to just be able to use the radio buttons it should be currently working, however when I visit my example.php it turns up completely blank --> example.php

and this is what it looks like

Code: Select all

<?php

// Start the phpbb 3 session
define( 'IN_PHPBB', true );
$phpbb_root_path = './'; // change in your own root path.
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

$user->session_begin();
$auth->acl( $user->data );
$user->setup();

// Include the needed files
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include($phpbb_root_path . 'includes/news.' . $phpEx);

// Instance the needed classes
$bbcode	= new bbcode();
$news		= new news();

// Is the rss feed called?
$rss = request_var ('view', 'news'); // $_GET['view']
if( strtolower($rss) === 'rss' )
{
	// Build the rss page
	$news->build_rss ();
}
else
{
	// Get the array with news data
	$news_data = $data = $news->get_news();
	
	/*
	echo'<pre>';
	print_r($news_data);
	echo'</pre>';
	*/
}
?>

corund
Registered User
Posts: 2
Joined: Mon Feb 11, 2008 1:39 pm

Re: [BETA] News Forum

Post by corund »

to Erik Frèrejean
SQL query works unstable, posts grouped by topics but not sorted. I randomly get last post or first post of the news. (using MySQL).

I suggest to change SQL query from this:

Code: Select all

$sql = "
			SELECT f.forum_id, f.forum_name
				, news.post_id, news.post_subject, news.post_text, news.bbcode_bitfield, news.bbcode_uid, news.post_time
					, news_topic.topic_id#, news_topic.topic_replies_real
						, creator.username, creator.user_colour
			
			FROM " . POSTS_TABLE . " AS news, " . TOPICS_TABLE . " AS news_topic, " . USERS_TABLE . " AS creator, " . FORUMS_TABLE . " AS f
				WHERE f.enable_news_forum = 1
					AND news.forum_id = f.forum_id
					AND news.post_approved = 1
					AND news_topic.forum_id = f.forum_id
					AND creator.user_id = news.poster_id
			
			GROUP BY news.topic_id
			ORDER BY news.post_time DESC
		";
to this:

Code: Select all

$number_of_topics=3; //probably it is a good idea to make this variable configurable
		$sql = "
			SELECT f.forum_id, f.forum_name
				, news.post_id, news.post_subject, news.post_text, news.bbcode_bitfield, news.bbcode_uid, news.post_time
					, news_topic.topic_id, news_topic.topic_replies_real
						, creator.username, creator.user_colour
			
			FROM " . POSTS_TABLE . " AS news, " . TOPICS_TABLE . " AS news_topic, " . USERS_TABLE . " AS creator, " . FORUMS_TABLE . " AS f
				WHERE 
					f.enable_news_forum = 1
					AND news.post_approved = 1
					AND news_topic.forum_id = f.forum_id
					AND news.post_id=news_topic.topic_first_post_id
					AND creator.user_id = news.poster_id
			ORDER BY news_topic.topic_first_post_id DESC LIMIT $number_of_topics
		";
I removed group by clause, made only first posts to be displayed and limited number of topics by variable.

The second problem is that RSS feed creates duplicates. Each time when i press refresh i get rss posts. If i press 3 times refresh i will get news * 3. I have no idea how to fix that.

Thanks!

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 »

Thanks for your suggestion :). I still have plans to change the complete working of the news class but will keep this in mind.
But your query isn't allowed :wink:, this is due to the LIMIT clause but there are work arounds for this.
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!)

corund
Registered User
Posts: 2
Joined: Mon Feb 11, 2008 1:39 pm

Re: [BETA] News Forum

Post by corund »

Erik Frèrejean wrote:Thanks for your suggestion :). I still have plans to change the complete working of the news class but will keep this in mind.
But your query isn't allowed :wink:, this is due to the LIMIT clause but there are work arounds for this.
Thank you for this mod! It has some nice features and should be useful for many boards. ;)
Right now i'm looking forward for an update and fix for all bugs and typos listed in this topic on 13 pages.

My opinion: mod requires config file and ability to set the number of topics displayed, to show or not to show images/smilies/BBcodes, options for RSS and so on.

Thank you! Keep on working! :)

herbie_popnecker
Registered User
Posts: 26
Joined: Sun Dec 11, 2005 5:56 am

Re: [BETA] News Forum

Post by herbie_popnecker »

Where's the download link for this mod? The link on page 1 of the thread is dead....
I'd love to give it a try.

User avatar
davaguco
Registered User
Posts: 179
Joined: Thu Jul 28, 2005 5:57 pm
Location: España
Name: DAVID AGULLO
Contact:

Re: [BETA] News Forum

Post by davaguco »

Download link not working :(
David.
English-Spanish Mod Translator. Send me a PM if you need anything translated (usually free unless you need a fixed finishing date).

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 »

I'll put on a new donload this afternoon :).
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!)

-JoshC-
Registered User
Posts: 23
Joined: Tue Jul 25, 2006 6:04 pm

Re: [BETA] News Forum

Post by -JoshC- »

Any update on the download link?

Korupt
Registered User
Posts: 5
Joined: Mon Mar 28, 2005 11:27 pm
Location: Altoona, PA

Re: [BETA] News Forum

Post by Korupt »

I pm'ed him yesterday about this and he said he would have a new link up in a few hours.

Please update the link. Thanks!

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 »

It seems like I have deleted this mod from my pc :oops:, and have to go through my backups to see if I can find it back. If you realy need it, you can use the code posted in this thread to show the posts. This way it will not intergrate in the ACP but it will work.
Next week I'm away, so I don't think I have time to fix this in the comming two weeks. Sorry about this, but I come back to you on this one.
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!)

-JoshC-
Registered User
Posts: 23
Joined: Tue Jul 25, 2006 6:04 pm

Re: [BETA] News Forum

Post by -JoshC- »

Anyone else have the latest release they could forward to Erik and maybe send me a PM about getting a copy?

pitas
Registered User
Posts: 23
Joined: Mon Jan 21, 2008 7:20 pm

Re: [BETA] News Forum

Post by pitas »

Nobody has download it ? :cry:

User avatar
Hippie459MN
Registered User
Posts: 937
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: [BETA] News Forum

Post by Hippie459MN »

I would really like this as well so if anyone has it that would be great. :D

-JoshC-
Registered User
Posts: 23
Joined: Tue Jul 25, 2006 6:04 pm

Re: [BETA] News Forum

Post by -JoshC- »

Any luck with the download Erik?

Locked

Return to “[3.0.x] Abandoned MODs”