keep unread flags

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
72
75%
Very Good
16
17%
Good
4
4%
Fair
0
No votes
Poor
4
4%
 
Total votes: 96

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Post by Merlin Sythove » Thu Feb 01, 2007 9:26 am

Just paste them here. And yes, users can translate. Sometimes.
But sometimes the Admin installs a language they don't speak themselves. It is easier if the translation is already present :D
Need custom work done? Pimp My Forum!

wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo » Thu Feb 01, 2007 10:35 am

Just paste them here.
Here goes:

Code: Select all

Language lines for German:

OPEN language/lang_german/lang_main

FIND

//
// That's all, Folks!
// --------------------------------------------------

BEFORE add

$lang['keep_post_unread_explain'] = 'Beitrag als ungelesen markieren';
$lang['keep_unread_done'] = 'Beitrag als ungelesen markiert';
$lang['View_unread_posts'] = 'Ungelesene Beiträge lesen';
$lang[No_unread_posts'] = 'Keine ungelesenen Beiträge';

DONE
I have spelled the German "umlaut" in the HTML notation because there are people who run their board in ISO-8859-1 and people who run it in utf-8. This way the special chars are displayed correctly in both cases - unfortunately the phpBB translators did not think about that and I had to 'sed' all hundreds of characters in the German language files :(

wobo

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Post by Merlin Sythove » Thu Feb 01, 2007 11:11 am

Thanks, I'm sure asinshesq will add it to the main mod.

And would a simple search and replace not have done the trick with the umlaut? I don't have German installed on my forum but will pretty soon, so I'm interested in a tidied up version, you can mail it to me privately if you like! (I have far more gripes with all the language files, like all the rediculous capitals all over etc. but that is another story :D)
Need custom work done? Pimp My Forum!

wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo » Thu Feb 01, 2007 12:43 pm

Merlin Sythove wrote: And would a simple search and replace not have done the trick with the umlaut?

Hmm, what do you think sed is for? :)

Code: Select all

$ man sed
sed - stream editor for filtering and transforming text
I can send you the whole bunch if you want as a tarball. Send your mailto as pm

wobo
Last edited by wobo on Thu Feb 01, 2007 1:25 pm, edited 1 time in total.

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Post by Merlin Sythove » Thu Feb 01, 2007 1:03 pm

wobo wrote:

Code: Select all

$ man sed
sed - stream editor for filtering and transforming text


OK, that is new to me, I work with windows.
I can send you the whole bunch if you want as a tarball.


Zip or even unzipped is fine thanks.
Need custom work done? Pimp My Forum!

wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo » Thu Feb 01, 2007 1:28 pm

Merlin Sythove wrote: I work with windows.

Ah, a contradiction! :) SCNR!
Zip or even unzipped is fine thanks.

Will do, see my private message

wobo

Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Post by Merlin Sythove » Thu Feb 01, 2007 1:32 pm

wobo wrote:
Merlin Sythove wrote:I work with windows.

Ah, a contradiction! :) SCNR!


Well, you need SOME way to pass the time... :lol:
Need custom work done? Pimp My Forum!

wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo » Thu Feb 01, 2007 1:43 pm

Merlin Sythove wrote: Zip or even unzipped is fine thanks.

Done - learn German! :)

wobo

wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo » Fri Feb 02, 2007 10:13 am

Another thumbs-up for the simple subforum mod. I post it here because it is somehow related with the unread mod.
Installation was a drag and is not possible without reading the README, especially if the unread mod is already installed. :)

But it works! :)

wobo

PaNtheris
Registered User
Posts: 19
Joined: Thu Nov 30, 2006 10:41 am

Post by PaNtheris » Sun Feb 04, 2007 8:07 pm

I am experiencing problems installing this mod, all my templates accepts this mod, expect Softblue, who could help me?

asavage
Registered User
Posts: 32
Joined: Sun Dec 04, 2005 8:50 pm
Location: Duvall, Wash.
Name: Al Savage
Contact:

Post by asavage » Thu Feb 08, 2007 4:06 am

I, too, have the "Save posts as Drafts" mod, and EM isn't finding the correct match in this section:

Code: Select all

#
#-----[ FIND ]------------------------------------------------
#
			if ( $search_id == 'newposts' )
			{
				if ( $userdata['session_logged_in'] )
				{
					$sql = "SELECT post_id
						FROM " . POSTS_TABLE . "
						WHERE post_time >= " . $userdata['user_lastvisit'];
				}
				else
				{
					redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=newposts", true));
				}

				$show_results = 'topics';
				$sort_by = 0;
				$sort_dir = 'DESC';
			}
because the SPAD mod adds a bit to this section:

Code: Select all

[ . . . ]
						WHERE post_time >= " . $userdata['user_lastvisit'] . " AND post_draft = 0";

						// start mod save posts as drafts (and end mod too)...added constraint in the preceding line that post_draft be 0 so that draftws wouldn't get included
[. . . ]
Are there harder and easier ways of dealing with this?
Regards,
Al S.

djingo
Registered User
Posts: 58
Joined: Thu Mar 30, 2006 1:15 am

Post by djingo » Sat Feb 10, 2007 12:35 pm

I have made a slight modification of the last topics on index mod and it now produces an empty marquee for me after installing unread. Could anyone take a quick look on the code and tell me why the index_body.tpl produces blank...

(Install history: Latest version of simple subforums + Wichers mod + unread mod). Wichers mod are designed for earlier versions but no errors during install so it ought to be good. Funny thing latest topics on index works on my test forum with same combination of simple subforums + Wicher + unread.

index.php

Code: Select all

// 
// Obtain new post information for marquee 
// of new posts 
// 
// 
// Get Viewable Forums 
// 
// function to merge two auth arrays to one 
function array_merge_replace($array, $newValues)
{ 
	foreach ($newValues as $key => $value)
		{ 
		if ( is_array($value) )
		{ 
			if ( !isset($array[$key]) )
			{ 
				$array[$key] = array(); 
			} 
			$array[$key] = array_merge_replace($array[$key], $value); 
		}
		else
		{ 
			if ( isset($array[$key]) && is_array($array[$key]) )
			{ 
				$array[$key][0] = $value; 
			}
			else
			{ 
				if ( isset($array) && !is_array($array) )
				{ 
					$temp = $array; 
					$array = array(); 
					$array[0] = $temp; 
				} 
				$array[$key] = $value; 
			} 
		} 
	} 
	return $array; 
} 
$ary = array(); 
$ary2 = array(); 
$ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data); 
$ary2 = auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data); 
$is_auth_ary = array_merge_replace($ary, $ary2); 
$auth_view_forum_sql = ''; 
for($i = 0; $i < $total_categories; $i++) 
{ 
	$cat_id = $category_rows[$i]['cat_id']; 
	$display_forums = false; 
	for($j = 0; $j < $total_forums; $j++) 
	{ 
		if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $is_auth_ary[$forum_data[$j]['forum_id']]['auth_read'] && $forum_data[$j]['cat_id'] == $cat_id ) 
		{ 
			$display_forums = true; 
			$auth_view_forum_sql .= ($auth_view_forum_sql == '' ? '' : ', ' ) . $forum_data[$j]['forum_id']; 
		} 
	} 
} 
$auth_view_forum_sql = ($auth_view_forum_sql == '' ? '(0)' : '(' . $auth_view_forum_sql . ')'); 

// 
// Get The Data AND f.forum_id != 93 AND f.forum_id != 36
// 
$template->assign_vars(array(
	'MARQUEE_TOPIC' => str_replace("%s",$board_config['topics_on_index'],$lang['marquee_topic']) ) 
);

$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_type, t.topic_status, p.post_id, p.poster_id, 
	p.post_time, u.user_id, u.username, u.user_lastvisit, f.forum_name, t.topic_replies  
	FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u 
	WHERE t.forum_id IN " . $auth_view_forum_sql . " AND t.topic_id = p.topic_id 
	AND f.forum_id = t.forum_id 
	AND t.topic_status <> 2 
	AND p.post_id = t.topic_last_post_id 
	AND p.poster_id = u.user_id
	AND f.forum_id != 93 
	AND f.forum_id != 36
	ORDER BY t.topic_last_post_id DESC"; 

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"];
   $topic_unread = ($row[$i]['post_time'] > topic_last_read($row[$i]['forum_id'], $row[$i]['topic_id']));
    $new = $topic_unread ? "_new" : "";
    if ( $row[$i]["topic_status"] == TOPIC_LOCKED )
   {
     $pic = $images["folder_locked$new"];
   }
   else
   {
      switch ($row[$i]["topic_type"])
         {
         case POST_GLOBAL_ANNOUNCE:
        $pic = $images["folder_global_announce$new"];
        break;
      case POST_ANNOUNCE:
        $pic = $images["folder_announce$new"];
        break;
         case POST_STICKY:
        $pic = $images["folder_sticky$new"];
        break;
         default:
        $pic = $images["folder$new"];
      }
    }

	
$template->assign_block_vars('marqueerow', array( 
	'FOLD_URL' => $pic, 
	'TOPIC_TITLE' => $row[$i]["topic_title"], 
	'TOPIC_URL' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?'.POST_TOPIC_URL.'='.$row[$i]["topic_id"]), 
'POST_URL' => $phpbb_root_path . 'viewtopic.'.$phpEx.'?p=' . $row[$i]["post_id"] . '#' . $row[$i]["post_id"], 
	'POST_URL1' => append_sid($phpbb_root_path . 'viewtopic.'.$phpEx.'?p=' . $row[$i]["post_id"] . '#' . $row[$i]["post_id"]), 
'FORUM_NAME1' => $row[$i]["forum_name"], 
'TOPIC_REPLIES1' => $row[$i]["topic_replies"], 
'USERNAME' => $row[$i]["username"], 
	'USER_PROF1' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile$amp;u='.$row[$i]["user_id"]), 
'USER_PROF' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile&u='.$row[$i]["user_id"]), 
	'POST_DATE' => create_date($board_config['default_dateformat'], $row[$i]["post_time"], $board_config['board_timezone']))
	); 
} 
index_body.tpl:

Code: Select all


			<table cellpadding="4" cellSpacing="1" bgcolor="#FFFFFF" width="100%"> 

<!-- BEGIN marqueerow --></span><tr> 
<td class="row1" vAlign="center" align="middle" width="1%"><img src="{marqueerow.FOLD_URL}"></td> 
<td class="row1" vAlign="center" width="600" nowrap> 
<span class="gensmall1"><a href="{marqueerow.TOPIC_URL}">{marqueerow.TOPIC_TITLE}</a> - {marqueerow.FORUM_NAME1} - ({marqueerow.TOPIC_REPLIES1})</span> 
</td> 
<td class="row1" width="1%" nowrap> 
<span class="gensmall1"><a href="{marqueerow.POST_URL}"><img src="templates/subSilver/images/icon_latest_reply.gif" border="0" title="Jump to latest reply" /></a></span> 
</td> 
<td class="row1" vAlign="center" align="middle" nowrap> 
<span class="gensmall1"><a href="{marqueerow.USER_PROF}" >{marqueerow.USERNAME}</a></span> 
</td> 
<td class="row1" vAlign="center" align="middle" nowrap> 
<span class="gensmall1">{marqueerow.POST_DATE}</span> 
</td> 
</tr> 


<!-- END marqueerow --> 
			</table> 
Last edited by djingo on Sat Feb 10, 2007 3:22 pm, edited 2 times in total.

djingo
Registered User
Posts: 58
Joined: Thu Mar 30, 2006 1:15 am

Post by djingo » Sat Feb 10, 2007 2:48 pm

Also with the original code from last topics on index it produces an empty result.

djingo
Registered User
Posts: 58
Joined: Thu Mar 30, 2006 1:15 am

Post by djingo » Sat Feb 10, 2007 3:07 pm

Another thing wrong is that on the index page icons for forums with subforums are /subSilver/images/folder_big.gif NOT /subSilver/images/folders_big.gif (the "+" is missing from the icon)

Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Post by Mickey14 » Sat Feb 10, 2007 4:50 pm

Hi,

I installed the Mod 1 year ago now (version 2.0.3c), and from 2 days, several users, including me, began to get some strange behaviour...

When I open a browser to my forum after having left it for some minutes, all the not already read forums/topics are not marked as such anymore :( In fact, even the messages posted between leaving the forum and entering again it are not marked as "new" :(

I did not change anything recently, so I ask myself if others have similar problems (maybe related to the time in seconds having reached some edge ???)

Thanks in advance for any clues/remarks...
Last edited by Mickey14 on Sat Feb 10, 2007 5:34 pm, edited 2 times in total.

Post Reply

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