[MOD] Word Cloud ändern

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
mücheln
Mitglied
Beiträge: 22
Registriert: 29.06.2006 14:19

[MOD] Word Cloud ändern

Beitrag 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
Benutzeravatar
Dr.Death
Moderator
Moderator
Beiträge: 17473
Registriert: 23.04.2003 08:22
Wohnort: Xanten
Kontaktdaten:

Beitrag 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; 
Benutzeravatar
mücheln
Mitglied
Beiträge: 22
Registriert: 29.06.2006 14:19

Beitrag 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
Antworten

Zurück zu „[3.0.x] Mod Support“