You are not logged in.

#1 2019-02-15 09:34:41

Txori
Admin

Forum - Afficher le nom de la catégorie dans le "breadcrumbs"

Ce serait pratique pour ceux qui confondent BASTON et DBZDevolution tongue

Par exemple:
Afin de ne pas nommer le forum "DEBUG - BASTON", mais simplement "BASTON"
Avec un affichage du fil d'Ariane "Index >> DEBUG >> BASTON" au lieu de "Index >> DEBUG - BASTON"

A creuser:
https://fluxbb.org/development/core/tickets/1009/
wontfix bug... Seriously!? roll

EDIT:
En attente de résultat sur ce sujet: https://fluxbb.org/development/core/tickets/1128/

Offline

#2 2019-02-15 17:50:42

Txori
Admin

Re: Forum - Afficher le nom de la catégorie dans le "breadcrumbs"

Et voilà ça fonctionne pour viewforum grace à ça: http://docs.fluxbb.org/forums/viewtopic … 311#p55311

Il me reste à répercuter le code dans viewtopic... plus tard tongue

Offline

#3 2019-02-17 18:14:25

Txori
Admin

Re: Forum - Afficher le nom de la catégorie dans le "breadcrumbs"

Terminé cool

ViewForum

if (!$pun_user['is_guest'])
	$result = $db->query('SELECT c.cat_name, f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, f.cat_id, fp.post_topics, s.user_id AS is_subscribed FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'categories AS c ON (c.id=f.cat_id) LEFT JOIN '.$db->prefix.'forum_subscriptions AS s ON (f.id=s.forum_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
else
	$result = $db->query('SELECT c.cat_name, f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, f.cat_id, fp.post_topics, 0 AS is_subscribed FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'categories AS c ON (c.id=f.cat_id) LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());

ViewTopic

if (!$pun_user['is_guest'])
	$result = $db->query('SELECT c.cat_name, t.subject, t.closed, t.num_replies, t.sticky, t.first_post_id, f.id AS forum_id, f.cat_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'topic_subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'categories AS c ON (c.id=f.cat_id) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
	$result = $db->query('SELECT c.cat_name, t.subject, t.closed, t.num_replies, t.sticky, t.first_post_id, f.id AS forum_id, f.cat_id, f.forum_name, f.moderators, fp.post_replies, 0 AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'categories AS c ON (c.id=f.cat_id) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

Crumb

<li><strong><a href="index.php"><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></a></strong></li>

Offline

Board footer

Powered by FluxBB