Connexion
S'inscrire
Actualités
Quoi de neuf
Activités générales
Auteurs
Forums
Nouveaux messages
Rechercher un forum
Quoi de neuf
Nouveaux messages
Nouveaux messages de profil
Activités générales
Membres
Membres inscrits
Visiteurs actuels
Nouveaux messages de profil
Rechercher dans les messages des profils
Teams
Créé ton équipe
Quoi de neuf ?
Nouveaux messages
Rechercher un forum
Menu
Connexion
S'inscrire
Install the app
Install
Forums
Forums généraux
Informatique
Développement
[Xenforo] Gérer la notice de votre shoutbox depuis un topic.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Vous utilisez un navigateur non à jour ou ancien. Il ne peut pas afficher ce site ou d'autres sites correctement.
Vous devez le mettre à jour ou utiliser un
navigateur alternatif
.
Répondre à la discussion
Message
<blockquote data-quote="Kévin 🚀" data-source="post: 4942608" data-attributes="member: 210410"><p style="text-align: center">Bonjour à tous <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite391" alt=":membre:" title="Membre :membre:" loading="lazy" data-shortname=":membre:" /> ,</p> <p style="text-align: center"></p> <p style="text-align: center">On se retrouve pour un nouveau tutoriel toujours sur <strong><span style="color: #0059b3">Xenforo</span></strong>.</p> <p style="text-align: center">Ce tutoriel aura pour but de permettre de <strong><span style="color: #0059b3">gérer la notice</span></strong> de votre <strong><span style="color: #0059b3">shoutbox depuis un topic</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">Ceci permet donc d'éviter de <strong><span style="color: #0059b3">mettre soit même le BBCode</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">/!\ Ce tutoriel <strong><span style="color: #0059b3">ne fonctionne</span></strong> qu'avec <strong><span style="color: #0059b3">l'extension TaigaChat</span></strong> /!\</p> <p style="text-align: center"></p> <p style="text-align: center">[ATTACH=full]49861[/ATTACH]</p> <p style="text-align: center"></p> <p style="text-align: center">Le tutoriel ce fera en <strong><span style="color: #0059b3">deux courtes étapes</span></strong>.</p> <p style="text-align: center">- <strong><span style="color: #0059b3">Première étape</span></strong> : Création du topic.</p> <p style="text-align: center">- <strong><span style="color: #0059b3">Deuxième étape</span></strong> : Modification du fichier de l'extension TaigaChat.</p> <p style="text-align: center"></p> <p style="text-align: center">[ATTACH=full]49861[/ATTACH]</p> <p style="text-align: center"></p> <p style="text-align: center">Pour pourvoir réaliser ce tutoriel <strong><span style="color: #0059b3">il vous faudra </span></strong>:</p> <p style="text-align: center">- Les <strong><span style="color: #0059b3">accès </span></strong>aux dossiers de <strong><span style="color: #0059b3">l'extension TaigaChat</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">C'est parti <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite171" alt=":D" title="Awesome face :D" loading="lazy" data-shortname=":D" /></p> <p style="text-align: center"></p> <p style="text-align: center">[ATTACH=full]49861[/ATTACH]</p> <p style="text-align: center"></p> <p style="text-align: center"><strong><span style="color: #0059b3">Première étape</span></strong> : <u>Création du topic.</u></p> <p style="text-align: center"></p> <p style="text-align: center">Pour cela il est préférable de <strong><span style="color: #0059b3">créer </span></strong>le topic dans une section où les <span style="color: #0059b3"><strong>membres lambda</strong></span> ne peuvent pas voir ce topic.</p> <p style="text-align: center"></p> <p style="text-align: center">Personnellement j'ai créé une section <strong><span style="color: #0059b3">Outils </span></strong>et je l'ai mis dedans, bien sûr <strong><span style="color: #0059b3">des permissions sont à mettre</span></strong> pour éviter que les membres voient cette section.</p> <p style="text-align: center"></p> <p style="text-align: center">Vous appelez le topic comme vous voulez personnellement je l'ai appelé <strong><span style="color: #0059b3">Notice Shoutbox</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">Voilà il vous reste plus qu'à prendre <strong><span style="color: rgb(0, 89, 179)">l'id du topic </span></strong><em><span style="color: #000000">(l'id ce trouve dans l'url du topic)</span></em> et de la garder <strong><span style="color: #0059b3">on en aura besoin pour la suite</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">[ATTACH=full]49861[/ATTACH]</p><p></p><p style="text-align: center"><strong><span style="color: #0059b3">Deuxième étape</span></strong> : <u>Modification de l'extension.</u></p> <p style="text-align: center"></p> <p style="text-align: center">Pour ce faire il faudra aller dans votre FTP et aller dans le dossier <strong><span style="color: #0059b3">Library </span></strong>=> <strong><span style="color: #0059b3">Dark </span></strong>=> <strong><span style="color: #0059b3">TaigaChat</span></strong> => <strong><span style="color: #0059b3">ControllerPublic </span></strong>=> <strong><span style="color: #0059b3">TaigaChat.php</span></strong></p> <p style="text-align: center"></p> <p style="text-align: center">Ouvrez le fichier <strong><span style="color: #0059b3">TaigaChat.php</span></strong> et allez à ligne <strong><span style="color: #0059b3">33</span></strong>.</p> <p style="text-align: center"></p> <p style="text-align: center">Vous avez normalement ce code :</p> <p style="text-align: center"></p><p>[PHP]</p><p>$bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base'));</p><p>$motd = new XenForo_BbCode_TextWrapper($options->dark_taigachat_motd, $bbCodeParser);</p><p>[/PHP]</p><p style="text-align: center"></p> <p style="text-align: center">Vous <strong><span style="color: #0059b3">remplacer </span></strong>ce code par celui ci :</p> <p style="text-align: center"></p><p>[PHP]</p><p>$bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base'));</p><p>$db = XenForo_Application::get('db');</p><p>$threadId = Id du sujet;</p><p>$reqNotice = $db->prepare('SELECT message FROM xf_post WHERE thread_id= ? ORDER by post_id DESC LIMIT 1');</p><p>$reqNotice->execute([$threadId]);</p><p>$dataNotice = $reqNotice->fetch();</p><p>$this->message = $dataNotice['message'];</p><p>$motd = new XenForo_BbCode_TextWrapper($this->message, $bbCodeParser);</p><p>[/PHP]</p><p style="text-align: center"></p> <p style="text-align: center">N'oubliez pas de mettre <strong><span style="color: #0059b3">l'id de votre topic</span></strong> dans la <span style="color: #0059b3"><strong>requête sql</strong></span> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite351" alt=";)" title="Clin d'oeil ;)" loading="lazy" data-shortname=";)" /></p> <p style="text-align: center"><strong><span style="color: #0059b3">Sauvegardez </span></strong>le fichier, et allez voir votre <strong><span style="color: #0059b3">shoutbox </span></strong>et vous <strong><span style="color: #0059b3">verrez </span></strong>le message présent dans le topic.</p> <p style="text-align: center"></p> <p style="text-align: center">[ATTACH=full]49861[/ATTACH]</p> <p style="text-align: center"></p> <p style="text-align: center">J'espère que ce tutoriel vous aura plus.</p> <p style="text-align: center">Si vous avez des problèmes n'hésitez a laisser un commentaire</p> <p style="text-align: center">A bientôt pour de prochain tutoriel <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite351" alt=";)" title="Clin d'oeil ;)" loading="lazy" data-shortname=";)" /></p> <p style="text-align: center"></p> <p style="text-align: center"><em>La reproduction de ce tutoriel sur d'autre forum n'est pas autorisé.</em></p> <p style="text-align: center"><em></em></p> <p style="text-align: right"><em><strong><span style="color: #ffa64d">Faragnight SEC</span></strong></em></p></blockquote><p></p>
[QUOTE="Kévin 🚀, post: 4942608, member: 210410"] [CENTER]Bonjour à tous :membre: , On se retrouve pour un nouveau tutoriel toujours sur [B][COLOR=#0059b3]Xenforo[/COLOR][/B]. Ce tutoriel aura pour but de permettre de [B][COLOR=#0059b3]gérer la notice[/COLOR][/B] de votre [B][COLOR=#0059b3]shoutbox depuis un topic[/COLOR][/B]. Ceci permet donc d'éviter de [B][COLOR=#0059b3]mettre soit même le BBCode[/COLOR][/B]. /!\ Ce tutoriel [B][COLOR=#0059b3]ne fonctionne[/COLOR][/B] qu'avec [B][COLOR=#0059b3]l'extension TaigaChat[/COLOR][/B] /!\ [ATTACH=full]49861[/ATTACH] Le tutoriel ce fera en [B][COLOR=#0059b3]deux courtes étapes[/COLOR][/B]. - [B][COLOR=#0059b3]Première étape[/COLOR][/B] : Création du topic. - [B][COLOR=#0059b3]Deuxième étape[/COLOR][/B] : Modification du fichier de l'extension TaigaChat. [ATTACH=full]49861[/ATTACH] Pour pourvoir réaliser ce tutoriel [B][COLOR=#0059b3]il vous faudra [/COLOR][/B]: - Les [B][COLOR=#0059b3]accès [/COLOR][/B]aux dossiers de [B][COLOR=#0059b3]l'extension TaigaChat[/COLOR][/B]. C'est parti :D [ATTACH=full]49861[/ATTACH] [B][COLOR=#0059b3]Première étape[/COLOR][/B] : [U]Création du topic.[/U] Pour cela il est préférable de [B][COLOR=#0059b3]créer [/COLOR][/B]le topic dans une section où les [COLOR=#0059b3][B]membres lambda[/B][/COLOR] ne peuvent pas voir ce topic. Personnellement j'ai créé une section [B][COLOR=#0059b3]Outils [/COLOR][/B]et je l'ai mis dedans, bien sûr [B][COLOR=#0059b3]des permissions sont à mettre[/COLOR][/B] pour éviter que les membres voient cette section. Vous appelez le topic comme vous voulez personnellement je l'ai appelé [B][COLOR=#0059b3]Notice Shoutbox[/COLOR][/B]. Voilà il vous reste plus qu'à prendre [B][COLOR=rgb(0, 89, 179)]l'id du topic [/COLOR][/B][I][COLOR=#000000](l'id ce trouve dans l'url du topic)[/COLOR][/I] et de la garder [B][COLOR=#0059b3]on en aura besoin pour la suite[/COLOR][/B]. [ATTACH=full]49861[/ATTACH][/CENTER] [CENTER][B][COLOR=#0059b3]Deuxième étape[/COLOR][/B] : [U]Modification de l'extension.[/U] Pour ce faire il faudra aller dans votre FTP et aller dans le dossier [B][COLOR=#0059b3]Library [/COLOR][/B]=> [B][COLOR=#0059b3]Dark [/COLOR][/B]=> [B][COLOR=#0059b3]TaigaChat[/COLOR][/B] => [B][COLOR=#0059b3]ControllerPublic [/COLOR][/B]=> [B][COLOR=#0059b3]TaigaChat.php[/COLOR][/B] Ouvrez le fichier [B][COLOR=#0059b3]TaigaChat.php[/COLOR][/B] et allez à ligne [B][COLOR=#0059b3]33[/COLOR][/B]. Vous avez normalement ce code : [/CENTER] [PHP] $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base')); $motd = new XenForo_BbCode_TextWrapper($options->dark_taigachat_motd, $bbCodeParser); [/PHP] [CENTER] Vous [B][COLOR=#0059b3]remplacer [/COLOR][/B]ce code par celui ci : [/CENTER] [PHP] $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base')); $db = XenForo_Application::get('db'); $threadId = Id du sujet; $reqNotice = $db->prepare('SELECT message FROM xf_post WHERE thread_id= ? ORDER by post_id DESC LIMIT 1'); $reqNotice->execute([$threadId]); $dataNotice = $reqNotice->fetch(); $this->message = $dataNotice['message']; $motd = new XenForo_BbCode_TextWrapper($this->message, $bbCodeParser); [/PHP] [CENTER] N'oubliez pas de mettre [B][COLOR=#0059b3]l'id de votre topic[/COLOR][/B] dans la [COLOR=#0059b3][B]requête sql[/B][/COLOR] ;) [B][COLOR=#0059b3]Sauvegardez [/COLOR][/B]le fichier, et allez voir votre [B][COLOR=#0059b3]shoutbox [/COLOR][/B]et vous [B][COLOR=#0059b3]verrez [/COLOR][/B]le message présent dans le topic. [ATTACH=full]49861[/ATTACH] J'espère que ce tutoriel vous aura plus. Si vous avez des problèmes n'hésitez a laisser un commentaire A bientôt pour de prochain tutoriel ;) [I]La reproduction de ce tutoriel sur d'autre forum n'est pas autorisé. [/I][/CENTER] [RIGHT][I][B][COLOR=#ffa64d]Faragnight SEC[/COLOR][/B][/I][/RIGHT] [/QUOTE]
Insérer les citations…
Vérification
Publier la réponse
Forums
Forums généraux
Informatique
Développement
[Xenforo] Gérer la notice de votre shoutbox depuis un topic.
Ce site utilise des cookies. En continuant à utiliser ce site, vous acceptez l'utilisation des cookies.
Acceptez
En savoir plus.…
Haut