[2.0.15] Latest active topics on index

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
80
54%
Very Good
41
28%
Good
14
10%
Fair
7
5%
Poor
5
3%
 
Total votes: 147

Lucky13MN
Registered User
Posts: 6
Joined: Wed Nov 22, 2006 3:07 pm

Post by Lucky13MN »

How hard would it be to add links for threads with more than one page so people can go directly to the last page without first clicking on the topic, then selecting page 3 for example?

Example:

Topic Tile 1,2,3,Last

NEO^AMiGA
Registered User
Posts: 2
Joined: Tue Jan 30, 2007 11:39 am

Post by NEO^AMiGA »

I have a problem that the threads in the scroll list doesn't get marked as read. Could I have missed something or added something in the wrong way?
/NEO

Kotek
Registered User
Posts: 45
Joined: Fri Nov 08, 2002 8:44 pm
Location: Prague/Lysá (CZ)
Contact:

Post by Kotek »

Krank: Just visited the topic today. I am gonna review the code and post it asap. A friend has done this for me.

Lucky13MN: I have now idea how hard it is. As for pure links to the last post in a topic, it has been discussed here before. Search within the previous posts here.

NEO^AMiGA Similar in my case. I did not find any fix for this. See again the previous posts within this topic. It has again been pointed out before, too.
"Dream as if you`ll live for ever, live as if you`ll die today."

Krank
Registered User
Posts: 179
Joined: Wed Sep 06, 2006 4:50 pm

Post by Krank »

Kotek wrote: Krank: Just visited the topic today. I am gonna review the code and post it asap. A friend has done this for me.

Lucky13MN: I have now idea how hard it is. As for pure links to the last post in a topic, it has been discussed here before. Search within the previous posts here.

NEO^AMiGA Similar in my case. I did not find any fix for this. See again the previous posts within this topic. It has again been pointed out before, too.

ok cool, waiting for the reply :D

Team Franchise
Registered User
Posts: 9
Joined: Sat Jan 13, 2007 12:22 am
Location: Derby, England
Contact:

Post by Team Franchise »

How can I get the bit at the top to stretch across to the length of the rest of the forum?

http://www.teamfranchise.co.uk/index.php

you can see what I mean here. (you'll need to maximise the window)

Team Franchise
Registered User
Posts: 9
Joined: Sat Jan 13, 2007 12:22 am
Location: Derby, England
Contact:

Post by Team Franchise »

Tiny bump for the above post.

Lucky13MN
Registered User
Posts: 6
Joined: Wed Nov 22, 2006 3:07 pm

Post by Lucky13MN »

It looks like you're missing some table tags to me. Just a quick glance made it look like a missing </tr> and extra <table>

If you add:
border="1" to the first table it might help show where the goof is.

Team Franchise
Registered User
Posts: 9
Joined: Sat Jan 13, 2007 12:22 am
Location: Derby, England
Contact:

Post by Team Franchise »

I'm just going to be straight, I know how easy that sounds, but i'm very very new to this game.

I wouldn't know where to start with those simple commands you've just given me.

Thankyou for helping though.

Kotek
Registered User
Posts: 45
Joined: Fri Nov 08, 2002 8:44 pm
Location: Prague/Lysá (CZ)
Contact:

MOD fix

Post by Kotek »

Krank: here is the code - as I told you before a friend did this for me. So I am just following his explanations. Be sure to backup everything prior to editting.
1. Number of topics

Code: Select all

index.php

Find:

ORDER BY t.topic_last_post_id DESC";
 
Replace with:

ORDER BY t.topic_last_post_id DESC limit 10"; 
Note: The number "10" above should be changed according to your needs. Also change it in the respective language file. Changing the number of topics via admin panel will not work.

2. New code

Code: Select all

index.php

Find:

ORDER BY t.topic_last_post_id DESC limit 10"; 

After, add:

$res = mysql_query($sql);
while ($r = mysql_fetch_array($res)) {
	$mar_title = $r["topic_title"]; 
	$mar_url = $phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$r["topic_id"]; 
	$mar_post_time = $r["post_time"];
	$mar_user = $r["username"]; 
	$pic = $images['folder_new'];

$template->assign_block_vars('marqueerow', array( 
	'FOLD_URL' => $pic, 
	'TOPIC_TITLE' => $r["topic_title"], 
  'TOPIC_URL' => append_sid('viewtopic.'.$phpEx.'?p='.$r['topic_last_post_id'].'#'.$r['topic_last_post_id']),
	'USERNAME' => $r["username"], 
	'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile&u='.$r["user_id"]), 
	'POST_DATE' => create_date($board_config['default_dateformat'], $r["post_time"], $board_config['board_timezone']))
	); 


}
3. Old code disabled (it should be right after the previous code)

Code: Select all

index.php

Find:

if ( !($result = $db->sql_query($sql)) ) 
{ 
	message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__, $sql); 
} 

if ($row = $db->sql_fetchrowset($result)) 
{ 
	$db->sql_freeresult($result); 
} 

if( count($row) <= $board_config['topics_on_index'] ) 
{ 
	$topics = count($row); 
} 
else 
{ 
	$topics = $board_config['topics_on_index']; 
} 

for($i = 0; $i < $topics; $i++) 
{ 
	$mar_title = $row[$i]["topic_title"]; 
	$mar_url = $phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"]; 
	$mar_user = $row[$i]["username"]; 
	if ( $row[$i]["topic_status"] == TOPIC_LOCKED )
	{
		if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
		{
			$pic = $images['folder_locked_new'];
		}
		else
		{
			$pic = $images['folder_locked'];
		}
	}
	else
	{
		if ( $row[$i]["topic_type"] == POST_GLOBAL_ANNOUNCE )
		{
			if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
			{
				$pic = $images['folder_global_announce_new'];
			}
			else
			{
				$pic = $images['folder_global_announce'];
			}
		} 
		else if ( $row[$i]["topic_type"] == POST_ANNOUNCE )
		{
			if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
			{
				$pic = $images['folder_announce_new'];
			}
			else
			{
				$pic = $images['folder_announce'];
			}
		} 
		else if ( $row[$i]["topic_type"] == POST_STICKY )
		{
			if ( $row[$i]["post_time"] > $row[$i]["user_lastvisit"] )
			{
				$pic = $images['folder_sticky_new'];
			}
			else
			{
			$pic = $images['folder_sticky'];
			}
		} 
		else { if ( $row[$i]["post_time"] > $userdata['user_lastvisit'] )
		{
			$pic = $images['folder_new']; }else{ $pic = $images['folder'];
		}
	}
}
$template->assign_block_vars('marqueerow', array( 
	'FOLD_URL' => $pic, 
	'TOPIC_TITLE' => $row[$i]["topic_title"], 
  'TOPIC_URL' => append_sid('viewtopic.'.$phpEx.'?p='.$row[$i]['topic_last_post_id'].'#'.$row[$i]['topic_last_post_id']),
	'USERNAME' => $row[$i]["username"], 
	'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile$amp;u='.$row[$i]["user_id"]), 
	'POST_DATE' => create_date($board_config['default_dateformat'], $row[$i]["post_time"], $board_config['board_timezone']))
	); 
} 

Before, add:

/*

After, add:

*/
4. And now the language file lang_main.php (Set a fix number of topics there in the explanation.)

Code: Select all

lang_main.php

Find:
$lang['marquee_topic']

In the same line find
 = 'xxx';

Replace the text xxx with your own explanation and also mention the number of topics.

e.g. 

$lang['marquee_topic'] = 'Last 10 active topics. You can get to the latest post by clicking on the topic. You can stop the list by moving the mouse over a link.';
Let me know if it works for you. :)
"Dream as if you`ll live for ever, live as if you`ll die today."

Krank
Registered User
Posts: 179
Joined: Wed Sep 06, 2006 4:50 pm

Post by Krank »

thanks Kotek :)

Team Franchise
Registered User
Posts: 9
Joined: Sat Jan 13, 2007 12:22 am
Location: Derby, England
Contact:

Post by Team Franchise »

How do I remove all traces of this mod from my profile?

Or, if someone can help me with the problem, take a look at my site quickly and you can see that the box is there but there are no active posts being reported, but they're being posted in.

I have just had to change another mod so I think it might have been tinkered with by accident.

http://www.teamfranchise.co.uk

Montana
Registered User
Posts: 93
Joined: Sun Jun 20, 2004 7:43 pm
Contact:

Post by Montana »

i would like to use this mod on a blank template page and make it the index anyone knows what code i have to put there to make it work ?

tnx :roll:
Sorry for my bad english :?
montanas-corner

egkinser
Registered User
Posts: 7
Joined: Wed Jan 24, 2007 8:40 am
Location: California
Contact:

UserID in scrolling window links back to Index page

Post by egkinser »

Excuse me if this has already been covered in the 52 pages of the topic, but here is the problem:
When clicking on the Posters UserID in the scrolling window it links me back to the Index page. Shouldn't it take me to the users profile?
I have loaded the mod on two seperate forums and both do the same thing.

Any information would be appreciated and again excuse me if this has already been covered.

etingwall
Registered User
Posts: 10
Joined: Fri Feb 16, 2007 7:25 pm

Post by etingwall »

Can someone please give me a link to a screenshot or a forum that is running this MOD. The original screenshots don't appear to be working.

rohit4all
Registered User
Posts: 28
Joined: Mon Apr 17, 2006 1:32 pm

I am just wondering why this happened

Post by rohit4all »

I was using"" Last 10 Active Topics "" mod from last three days. I was more than happy from its working. But yesterday I was changing an users permission. after that I realised that my " Last Active Topics" is showing nothing.

I also realised that when I tried to change the password of myself using ACP. I am getting this erroer.

::::Warning: Cannot modify header information - headers already sent by (output started at /home/testfeve/public_html/includes/template.php(127) : eval()'d code:1) in /home/testfeve/public_html/includes/sessions.php on line 552"""

I am just wondering why this happened ? Any kind of help will highly appreciated.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”