Seite 2 von 2

Verfasst: 02.11.2003 16:10
von Less
welche optionen soll ich bei dem dump machen im mysqladmin ?

Verfasst: 02.11.2003 16:16
von saerdnaer
struktur und daten
vollständige + erweiterte inserts

ah

Verfasst: 02.11.2003 16:23
von Less

Verfasst: 02.11.2003 16:40
von saerdnaer
ähm ich meinte die topic categories table...

ah

Verfasst: 02.11.2003 16:47
von Less

Verfasst: 02.11.2003 21:20
von saerdnaer
bitteschön:
viewforum.php
suchen:

Code: Alles auswählen

else
{
	$order_by = "t.topic_last_post_id DESC";
}
danach einfügen:

Code: Alles auswählen

$cat_sql = '';
if(isset($HTTP_GET_VARS['cat']) || isset($HTTP_POST_VARS['cat']))
{
	$cat = (isset($HTTP_POST_VARS['cat'])) ? $HTTP_POST_VARS['cat'] : $HTTP_GET_VARS['cat'];
	if ( !empty($cat) )
	{
		$cat_sql = "AND t.k_id = '$cat'";
	}
}
suchen:

Code: Alles auswählen

$select_sort_mode = "<select name=\"mode\">";
ersetzen druch:

Code: Alles auswählen

$select_sort_mode = '<select name="cat">';
$sql="SELECT * FROM " . TOPIC_KAT . " WHERE forum_id= '$forum_id'";
if ( !($result = $db->sql_query($sql)) )
{
        message_die(GENERAL_ERROR, "Couldn't get categories");
}
$topic_categories = array();
while ( $row = $db->sql_fetchrow($result) )
{
	$topic_categories[$row['k_id']] = $row['kategorie'];
	$selected = ( $cat == $row['k_id'] ) ? ' selected="selected"' : '';
	$select_sort_mode .= '<option value="' . $row['k_id'] . '"$selected>' . $row['kategorie'] . '</option>';
}
$select_sort_mode .= "</select> ";
$select_sort_mode .= "<select name=\"mode\">";
suche:

Code: Alles auswählen

	WHERE t.forum_id = $forum_id
		AND t.topic_poster = u.user_id
		AND p.post_id = t.topic_first_post_id
		AND p2.post_id = t.topic_last_post_id
		AND u2.user_id = p2.poster_id 
		AND t.topic_type <> " . POST_ANNOUNCE . " 
		$limit_topics_time
danach einfügen:

Code: Alles auswählen

		$cat_sql
suche:

Code: Alles auswählen

//kategorien
		if($topic_rowset[$i]['k_id'] !=0)
		{
			$sql="select kategorie FROM " . TOPIC_KAT ." where k_id=" . $topic_rowset[$i]['k_id'];
			
			if ( $result = $db->sql_query($sql) )
			{
			$kat = $db->sql_fetchrow($result);
			$topic_kat="[" .$kat['kategorie'] . "]";
			}
		}else{
			$topic_kat="";
		}
//kategorien
ersetzen durch

Code: Alles auswählen

//kategorien
		if ( !empty($topic_rowset[$i]['k_id']) && !empty($topic_categories[$topic_rowset[$i]['k_id']]) )
		{
			$topic_kat = '[' . $topic_categories[$topic_rowset[$i]['k_id']] . ']';
		}
		else
		{
			$topic_kat = '';
		}
//kategorien
ist zwar ungetestet sollte aber funktionieren...

ah

Verfasst: 02.11.2003 22:06
von Less
Hammergeil! BIG THX!

Das funktioniert sehr gut!
Ich freue mich richtig.

Thx nochmal! Echt klasse!

Viele Grüße

Less

Verfasst: 03.11.2003 15:53
von saerdnaer
Darf ich das ding mal in action sehn?

ah