Seite 1 von 1

[MOD] Word Cloud ändern

Verfasst: 09.02.2008 20:14
von mücheln
Hey,
ich habe mir den Word Cloud MOD von
HIER Installiert.
Dieser funktioniert super.
Ich möchte nun folgendes verändern.
Die viel genutzten Worte werden so angezeigt

WORT1WORT2WORT3WORT4WORT5

Ich möchte das die Worte Fett angezeigt werden, also so

WORT1WORT2WORT3WORT4WORT5

In der index.php muß für den Mod folgendes geändert werden

Code: Alles auswählen

---[Find]---

// Generate birthday list if required ...

---[Add bevor]---

include('language/' .$config['default_lang']. '/search_ignore_words.php');
$sql = "SELECT  word_count, word_text	FROM " . SEARCH_WORDLIST_TABLE . " 
	WHERE word_text NOT IN ('".implode('\', \'', $words)."')	
	ORDER BY  word_count DESC";
	
$result = $db->sql_query_limit($sql, 20);
	
for ($i = 0; $row = $db->sql_fetchrow($result); $i++)
{
	$fontzize = ($row['word_count'] > 10) ? '10' : '9';
	$fontzize = ($row['word_count'] > 20) ? '12' : $fontzize;
	$fontzize = ($row['word_count'] > 25) ? '14' : $fontzize;
	$fontzize = ($row['word_count'] > 30) ? '16' : $fontzize;
	$fontzize = ($row['word_count'] > 40) ? '18' : $fontzize;
	$fontzize = ($row['word_count'] > 50) ? '20' : $fontzize;

	$cloud[$i] = '<a style="font-size: '.$fontzize .'px;" href="' .$phpbb_root_path. "search.$phpEx?keywords=" .$row['word_text'].'">' .$row['word_text'].'</a> ';
}

shuffle($cloud);
for ($i = 0; isset($cloud[$i]); $i++)
{
	$template->assign_block_vars('word_cloud', array(
		'WORD'		=> $cloud[$i],
	));
}
Wobei
$fontzize = ($row['word_count'] > 20) ? '12' : $fontzize;
20 die Anzahl der geschriebenen Wörter im Forum angibt
12 die größe der Schrift in px ist

Hat jemand eine Idee das die Worte Fett angezeigt werden?

----------------
Now playing: Oceanlab Feat Justine Suissa - Satellite (Above And Beyond Remix) (Mental Radio - Premium Quality - Vocal Trance and Progressive)
via FoxyTunes

Verfasst: 09.02.2008 20:22
von Dr.Death
In dem Code:

SUCHE:

Code: Alles auswählen

$cloud[$i] = '<a style="
ERSETZE MIT:

Code: Alles auswählen

$cloud[$i] = '<a style="font-weight:bold; 

Verfasst: 09.02.2008 21:25
von mücheln
Klasse, funktioniert, danke für die Hilfe.

----------------
Now playing: 13-roc project-never (tiesto remix)-whoa (Mental Radio - Premium Quality - Vocal Trance and Progressive)
via FoxyTunes