[ABD] Topic Extraction (news, latest topics etc) - 0.2.3

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
pacop2
Registered User
Posts: 31
Joined: Sat Sep 02, 2006 7:04 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by pacop2 » Tue Feb 05, 2008 4:36 pm

pacop2 wrote:ps. and the name of the last user that have replied? howto?
Answering myself:

Write {$topics[$i]['topic_last_poster_name']} instead of {$post['username']}

Thanks for the mod. With this slightly changes it appear to works perfect :D

pacop2
Registered User
Posts: 31
Joined: Sat Sep 02, 2006 7:04 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by pacop2 » Tue Feb 05, 2008 5:06 pm

And one trick more:

I want show phpbb recent posts in an html with a charset=iso-8859-1 . To show appropiate characters, I have to do a conversion:

$titulo=utf8_decode ($topics[$i]['topic_title']);
$autor=utf8_decode ($topics[$i]['topic_last_poster_name']);

Now it's working ok.

emoJRo
Registered User
Posts: 5
Joined: Tue Jan 29, 2008 8:42 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by emoJRo » Wed Feb 06, 2008 11:09 pm

Want to start out with a thank you. Awesome mod.

http://www.n2clan.com is the current website i have it working on.
The installation took me a while but i'm no php coder so i dont blame you. I am currently having a bit of trouble with the reply function. When ever i click on the replies link its supposed to send me to a page that allows me to reply to the thread. Im wondering if it has anything to do with permissions? If so shouldnt it direct you to the register page first then to the thread? Im kinda lost as to what im doing wrong. Can anyone offer me some insight?

here is the issue. When i click on Replies on my homepage it takes me to...
http://n2clan.com/forums/posting.php?mode=reply&t=20

When i click on reply directly from the forum's thread it takes me to...
http://n2clan.com/forums/posting.php?mo ... color]t=20
Where does the f=3& come from?

Here is my config file

Code: Select all

<?php
// Mod Title: Topic Extraction [PHPBB3]
// Version: 0.2.3
// There is a readme file, please read it! Please also signup on the forums http://www.altercoder.com !

if (!defined('IN_PHPBB'))
{
	exit;
}

$forum = '3';

$limit = '5';

$title_char = '70';

$post_char = '1000'; 

$show = 'full';

$date_time = 'short';

$topic_link_type = 'phpbb';

$comment = 'topic';

$phpbb_root_path = './forums/';

$phpbb_folder = '/forums/';

$smilies_path   = "{$phpbb_root_path}images/smilies";
?>
and here is my look file

Code: Select all

<<?php
// Mod Title: Topic Extraction [PHPBB3]
// Version: 0.2.3
// There is a readme file, please read it! Please also signup on the forums http://www.altercoder.com !

if (!defined('IN_PHPBB'))
{
	exit;
}

// Display just the title   
//if ($show != 'full' && !($show_topic))
//{
//	echo "<h1><a href='{$topic_link}'>{$topics[$i]['topic_title']}</a></h1><br />";
//}

// Display many topics - for news, shoutbox etc
if ($show == 'full')
{
	echo "<h1><a href='{$topic_link}'>{$topics[$i]['topic_title']}</a></h1>
	
	<p>{$post['post_text']}
	<br />
	<br />
	{$topics[$i]['topic_replies']} Replies :: <a href=\"{$comment_link}\">Reply</a></p>";
}
       
// Display the topic for when used with just display the title
//if ($show_topic)
//{
//	echo "<strong>{$topics[$i]['topic_title']}</strong> by <strong>{$post['username']}</strong> at <strong>{$topics[$i]['topic_time']}</strong><br />
//	<br />
//	{$post['post_text']}
//	<br />
//	<br />
//	<a href=\"{$comment_link}\">Comments {$topics[$i]['topic_replies']}</a>";
//}
?>


riots
Registered User
Posts: 8
Joined: Tue Dec 18, 2007 5:51 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by riots » Fri Feb 08, 2008 12:39 am

Ok im trying to put 2 topics on my index.html page i already got it working atm for 1 topic. here is my tetest.php for trying to get both topics to work

Code: Select all

<?php include('forums/topicGV_top.php'); ?>
<?php include('forums/topic_top.php'); ?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
Test news below<br />
<?php include('forums/topicGV_bottom.php'); ?>
<?php include('forums/topic_bottom.php'); ?>
</body>
</html>
and I can get both to work only 1 at a time though when ever i try both I get

Code: Select all

Fatal error: Cannot redeclare deregister_globals() (previously declared in /usr/home/riots/domains/graffintheno.com/public_html/forums/common.php:32) in /usr/home/riots/domains/graffintheno.com/public_html/forums/common.php on line 94
I seen on the altercode.com the forums a fix for this but the link for the tetest.php is broken.. well maybe someone can help me.

emoJRo
Registered User
Posts: 5
Joined: Tue Jan 29, 2008 8:42 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by emoJRo » Fri Feb 08, 2008 1:23 am

riots wrote:Ok im trying to put 2 topics on my index.html page i already got it working atm for 1 topic. here is my tetest.php for trying to get both topics to work

Code: Select all

<?php include('forums/topicGV_top.php'); ?>
<?php include('forums/topic_top.php'); ?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
Test news below<br />
<?php include('forums/topicGV_bottom.php'); ?>
<?php include('forums/topic_bottom.php'); ?>
</body>
</html>
and I can get both to work only 1 at a time though when ever i try both I get

Code: Select all

Fatal error: Cannot redeclare deregister_globals() (previously declared in /usr/home/riots/domains/graffintheno.com/public_html/forums/common.php:32) in /usr/home/riots/domains/graffintheno.com/public_html/forums/common.php on line 94
I seen on the altercode.com the forums a fix for this but the link for the tetest.php is broken.. well maybe someone can help me.
i think you are supposed to change the settings in the topic.config.php file.

Code: Select all

$forum = '#';
change to

Code: Select all

$forum = '#,#';
hope this helps

riots
Registered User
Posts: 8
Joined: Tue Dec 18, 2007 5:51 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by riots » Fri Feb 08, 2008 1:45 am

no that dose not work :(

emoJRo
Registered User
Posts: 5
Joined: Tue Jan 29, 2008 8:42 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by emoJRo » Fri Feb 08, 2008 2:11 am

riots wrote:no that dose not work :(
so you are just trying to take posts from two different threads on ur forum correct?

this is straight out of the readme

Code: Select all

$forum - This is the forum ID where you wish to take Topics from.
This can be a number, a few numbers seperated by commas or the word 'all' to use all forums.
ive never tried it so i wouldnt know but i guess i could try it out now and let u know how it turns out.

On another note. I dont know if this was already covered but i ran into the header problem. It posts my news on the homepage but on top of all of that i would see this...

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
When I go straight to my homepage the errors are there. When I visit my forum first then go to my homepage they are gone...
Any ideas?
http://www.peppermillcrew.com is my website so you can see what im talking about.

Manoz
Registered User
Posts: 3
Joined: Fri Feb 08, 2008 11:59 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by Manoz » Sat Feb 09, 2008 12:04 am

emoJRo wrote: On another note. I dont know if this was already covered but i ran into the header problem. It posts my news on the homepage but on top of all of that i would see this...

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /home/peppermi/public_html/index.php:7)
When I go straight to my homepage the errors are there. When I visit my forum first then go to my homepage they are gone...
Any ideas?
http://www.peppermillcrew.com is my website so you can see what im talking about.
I have the EXACT same problem (my website: http://www.dsfans.net).

Any help is appreciated!

emoJRo
Registered User
Posts: 5
Joined: Tue Jan 29, 2008 8:42 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by emoJRo » Sat Feb 09, 2008 3:22 am

Well i went into the sessions.php file and deleted this...

Code: Select all

		header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
BOOM :!: NO more errorz :mrgreen:

riots
Registered User
Posts: 8
Joined: Tue Dec 18, 2007 5:51 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by riots » Sat Feb 09, 2008 6:25 am

ok i get it working using

Code: Select all

$forum = '13,14';
but I want to display number 13 on one place on the home page and number 14 somewhere else on the home page. right now it list them both in the same list. check out http://www.graffintheno.com so you can see what im saying.. I want the video thread to display under videos and news under new.. and help apppreciated..

Manoz
Registered User
Posts: 3
Joined: Fri Feb 08, 2008 11:59 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by Manoz » Sat Feb 09, 2008 5:40 pm

emoJRo wrote:Well i went into the sessions.php file and deleted this...

Code: Select all

		header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
BOOM :!: NO more errorz :mrgreen:

Done the same. Hope it doesn't screw anything else up! :p

Manoz
Registered User
Posts: 3
Joined: Fri Feb 08, 2008 11:59 pm

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by Manoz » Sat Feb 09, 2008 6:14 pm

Sorry to double post, but where deleting:

Code: Select all

  header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
was a solution to the above problem, it caused a major problem in my forum in the way that it would not allow you to remain logged in (when you type in your username/pass you just get return to the index).

Once again, any help is appreciated, many thanks!

dnb
Registered User
Posts: 221
Joined: Fri Sep 07, 2007 9:19 am
Contact:

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by dnb » Sun Feb 10, 2008 4:03 am

I would love an answer to this question.....

Has anyone managed to get this mod working by adding it to the overall_header.html file ?

I have created a second overall_header file which redirects to my index.php file, when i try to use the mod i get a blank page, when i point my broswer to the source file, it works perfect.

is there no other way than using a iframe include ?

dnb
Registered User
Posts: 221
Joined: Fri Sep 07, 2007 9:19 am
Contact:

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by dnb » Mon Feb 11, 2008 8:12 am

How do i set this mod to redirect to the forum post once someone clicks on the topic, Also i would like to add the day/month/date before the topic, Example below...

Mon Feb/11 - topic details.

Hope someone can help.

User avatar
Andrew Clarkson
Registered User
Posts: 244
Joined: Wed Dec 10, 2003 6:05 pm
Location: Morecambe, England, UK
Contact:

Re: [ALPHA] Topic Extraction (news, latest topics etc) - 0.2.3

Post by Andrew Clarkson » Tue Feb 12, 2008 7:44 pm

Hey, great mod, much better than previous versions, however, I'd like to ask if it's possible to limit by number the actual amount of topics shown?

Here's mine !

http://www.titanic-titanic.com/index_news.shtml
Andrew Clarkson

Titanic Titanic

Locked

Return to “[3.0.x] Abandoned MODs”