[SOU] A propos de la fonction [code]
Moderators: Shub, Administrateurs - Adjoint, Modérateur, Administrateur, Global Moderator
[SOU] A propos de la fonction [code]
Je me souviens sur l'ancien forum lorsqu'on mettait du texte ca apparaissait en vert (comme sur le forum de Black Fox actuellement). Personnellement j'aimais beaucoup, c'est peut-être possible de le remettre?
- Vinssent
- Administrateurs - Adjoint
- Posts: 1484
- Joined: 14 Oct 2002 - 15:32:16
- Location: Ville de Québec
- Contact:
[SOU] A propos de la fonction [code]
Il a la fonction sql
(exemple)
[!--sql--][/span][table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'][tr][td]SQL [/td][/tr][tr][td id='CODE'][!--sql1--][span style='color:blue;font-weight:bold']drop[/span] table test [!--sql2--][/td][/tr][/table][span class='postcolor'][!--sql3--]
la fonction html
(exemple)
[!--html--][/span][table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'][tr][td]HTML [/td][/tr][tr][td id='CODE'][!--html1--]<color>
<color>
<color>
<color>
Salut
<color>
<color>
[!--html2--][/td][/tr][/table][span class='postcolor'][!--html3--]
et la fonction code
Tu voit, il suffit d'essayer
(exemple)
[!--sql--][/span][table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'][tr][td]SQL [/td][/tr][tr][td id='CODE'][!--sql1--][span style='color:blue;font-weight:bold']drop[/span] table test [!--sql2--][/td][/tr][/table][span class='postcolor'][!--sql3--]
la fonction html
(exemple)
[!--html--][/span][table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'][tr][td]HTML [/td][/tr][tr][td id='CODE'][!--html1--]<color>
<color>
<color>
<color>
Salut
<color>
<color>
[!--html2--][/td][/tr][/table][span class='postcolor'][!--html3--]
et la fonction code
Code: Select all
Blablabla
Last edited by Vinssent on 14 Dec 2002 - 21:26:05, edited 1 time in total.
Vinssent
--==§§==-- TRAINERS CITY --==§§==--
[SOU] A propos de la fonction [code]
Euh j'ai du mal me faire comprendre
Exemple en image :
En vert de ce style je trouve que c vachement classe
Exemple en image :
En vert de ce style je trouve que c vachement classe
[SOU] A propos de la fonction [code]
Avant de faire des modifs de ce style je vais attendre la version final de la 1.1 sinon on va pas s'en sortir
Shub
--==§§==-- TRAINERS CITY --==§§==--
Visit my youtube channel
>> Never argue with an idiot. They drag you down to their level and then beat you with experience! <<
>> If you can ... cheat. If you can't ... try harder! <<
>> Quand on voit ce qu'on voit, et qu'on entend ce qu'on entend, on a bien raison de penser ce qu'on pense... <<
>> L'avenir appartient à ceux qui se lèvent tôt, c'est une connerie. Prenez les éboueurs... (Jean Yanne) <<
>> Quand on pense qu'il suffirait que les gens n'achètent plus de saloperies pour que ça ne se vende pas ! <<
>>Ils ne savaient pas que c'était impossible, alors ils l'ont fait. (Mark Twain) <<
- Vinssent
- Administrateurs - Adjoint
- Posts: 1484
- Joined: 14 Oct 2002 - 15:32:16
- Location: Ville de Québec
- Contact:
[SOU] A propos de la fonction [code]
Yabo, c'est la même fonction, c'est juste que le texte n'apperait pas en vert
Regarde j'ai pris un code au hasard sur un site phpbb
(source http://forum.2037.biz/viewtopic.php?t=2855) Tu vas voir ça donne la même chose, juste la couleur qui change... (sauf les liens...)
Regarde j'ai pris un code au hasard sur un site phpbb
(source http://forum.2037.biz/viewtopic.php?t=2855) Tu vas voir ça donne la même chose, juste la couleur qui change... (sauf les liens...)
Code: Select all
##############################################################
## MOD Title: Style Under Username
## MOD Author: Thoul < tempshad@hotmail.com >
## MOD Description: Lists the board style a user is using in viewtopic. Also allows
## for an interface for the Change Style MOD.
## MOD Version: 1.2.0
##
## Installation Level: Easy
## Installation Time: 7 Minutes
## Files To Edit: viewtopic.php,
## templates/subSilver/viewtopic_body.tpl,
## language/lang_english/lang_main.php,
## admin/admin_board.php
## Included Files: suu_install.php
##############################################################
## For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/downloads/]http://www.phpbb.com/mods/downloads/[/url] for the
## latest version of this MOD. Downloading this MOD from other sites could cause
## malicious code to enter into your phpBB Forum. As such, phpBB will not offer
## support for MOD's not offered in our MOD-Database, located at:
## [url=http://www.phpbb.com/mods/downloads/]http://www.phpbb.com/mods/downloads/[/url]
##############################################################
## Authors Notes:
## This MOD, by itself, will list the board style a user is currently using with
## their post information in topics. It was originally created to be an interface
## for Karl Tauber's Change Style 0.8.0 beta MOD, which can be found via
## [url=http://www.ktauber.com/forums.html]http://www.ktauber.com/forums.html[/url] and
## [url=http://www.phpbb.com/phpBB/viewtopic.php?t=17005]http://www.phpbb.com/phpBB/viewtopic.php?t=17005[/url]
##
## You can use my MOD without the Change Style MOD. If you also have the Change
## Style MOD installed on your board, you can use my MOD to allow users to click
## on the board style that will be listed with each post to change to that board
## style. In the instructions below, I will have instructions for using this MOD
## both with or without the Change Style MOD.
##
## INSTALLATION NOTES:
## Before making the changes detailed below, be sure to upload suu_install.php and
## run that file by opening it in your web browser (e.g., going to
## [url=http://yoursite.com/phpBB/suu_install.php)]http://yoursite.com/phpBB/suu_install.php)[/url]. This file updates the board style
## assigned to the anonymous user to the board's default style. Be sure to delete
## the file after you've run it, or someone else could run it and mess up your
## board. Also, once the mod is completely applied, the board style assigned to the
## anonymous user will be updated any time the default style is changed in the
## Adminstration Panel.
##
## Future versions can be found at [url=http://cyborgcentral.dynip.com/~pd/]http://cyborgcentral.dynip.com/~pd/[/url]
## I've set up a support forum for my mods at [url=http://www.vgws.com/mb/index.php?c=4]http://www.vgws.com/mb/index.php?c=4[/url]
##
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To
## This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// MOD: Style Under Username
//
if( $config_name == 'default_style' )
{
$sql = "UPDATE " . USERS_TABLE . " SET user_style='" . $config_value . "'
WHERE user_id='" . ANONYMOUS . "'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update anonymous user board style", "", __LINE__, __FILE__, $sql);
}
}
//
// MOD: -END-
//
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, t.style_name
#
#-----[ IN-LINE FIND ]------------------------------------------
#
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, " . THEMES_TABLE . " t
#
#-----[ FIND ]------------------------------------------
#
AND u.user_id = p.poster_id
#
#-----[ AFTER, ADD ]------------------------------------------
#
AND t.themes_id = u.user_style
#
#-----[ FIND ]------------------------------------------
#
'S_WATCH_TOPIC' => $s_watching_topic,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_STYLE' => $lang['Style'],
#
#-----[ FIND ]------------------------------------------
#
'U_MINI_POST' => $mini_post_url,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
'STYLE_NAME' => $postrow[$i]['style_name'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Style'] = 'Style';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.POSTER_POSTS}<br />
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
# Author Note: If you ARE NOT using the Change Style MOD, add this code.
#
{L_STYLE}: {postrow.STYLE_NAME}
#
#-----[ OR ]------------------------------------------
#
# Author Note: If you ARE using the Change Style MOD, add this code.
#
{L_STYLE}: <A HREF="changestyle.php?s={postrow.STYLE_NAME}">{postrow.STYLE_NAME}</A>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Last edited by Vinssent on 15 Dec 2002 - 05:43:41, edited 1 time in total.
Vinssent
--==§§==-- TRAINERS CITY --==§§==--
[SOU] A propos de la fonction [code]
Oui d'accord ca donne la même chose mais je trouve qu'en vert ca fait super style Vivement la version 1.1 alors
- Vinssent
- Administrateurs - Adjoint
- Posts: 1484
- Joined: 14 Oct 2002 - 15:32:16
- Location: Ville de Québec
- Contact:
[SOU] A propos de la fonction [code]
Ben là c'est pas compliquer tu fait siomplement une citation et tu mets du vert dedant
##############################################################
## MOD Title: Style Under Username
## MOD Author: Thoul <tempshad>
## MOD Description: Lists the board style a user is using in viewtopic. Also allows
## for an interface for the Change Style MOD.
## MOD Version: 1.2.0
##
## Installation Level: Easy
## Installation Time: 7 Minutes
## Files To Edit: viewtopic.php,
## templates/subSilver/viewtopic_body.tpl,
## language/lang_english/lang_main.php,
## admin/admin_board.php
## Included Files: suu_install.php
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause
## malicious code to enter into your phpBB Forum. As such, phpBB will not offer
## support for MOD's not offered in our MOD-Database, located at:
## http://www.phpbb.com/mods/downloads/
##############################################################
## Authors Notes:
## This MOD, by itself, will list the board style a user is currently using with
## their post information in topics. It was originally created to be an interface
## for Karl Tauber's Change Style 0.8.0 beta MOD, which can be found via
## http://www.ktauber.com/forums.html and
## http://www.phpbb.com/phpBB/viewtopic.php?t=17005
##
## You can use my MOD without the Change Style MOD. If you also have the Change
## Style MOD installed on your board, you can use my MOD to allow users to click
## on the board style that will be listed with each post to change to that board
## style. In the instructions below, I will have instructions for using this MOD
## both with or without the Change Style MOD.
##
## INSTALLATION NOTES:
## Before making the changes detailed below, be sure to upload suu_install.php and
## run that file by opening it in your web browser (e.g., going to
## http://yoursite.com/phpBB/suu_install.php). This file updates the board style
## assigned to the anonymous user to the board's default style. Be sure to delete
## the file after you've run it, or someone else could run it and mess up your
## board. Also, once the mod is completely applied, the board style assigned to the
## anonymous user will be updated any time the default style is changed in the
## Adminstration Panel.
##
## Future versions can be found at http://cyborgcentral.dynip.com/~pd/
## I've set up a support forum for my mods at http://www.vgws.com/mb/index.php?c=4
##
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To
## This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// MOD: Style Under Username
//
if( $config_name == 'default_style' )
{
$sql = "UPDATE " . USERS_TABLE . " SET user_style='" . $config_value . "'
WHERE user_id='" . ANONYMOUS . "'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update anonymous user board style", "", __LINE__, __FILE__, $sql);
}
}
//
// MOD: -END-
//
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, t.style_name
#
#-----[ IN-LINE FIND ]------------------------------------------
#
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, " . THEMES_TABLE . " t
#
#-----[ FIND ]------------------------------------------
#
AND u.user_id = p.poster_id
#
#-----[ AFTER, ADD ]------------------------------------------
#
AND t.themes_id = u.user_style
#
#-----[ FIND ]------------------------------------------
#
'S_WATCH_TOPIC' => $s_watching_topic,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_STYLE' => $lang['Style'],
#
#-----[ FIND ]------------------------------------------
#
'U_MINI_POST' => $mini_post_url,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
'STYLE_NAME' => $postrow[$i]['style_name'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Style'] = 'Style';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.POSTER_POSTS}<br>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
# Author Note: If you ARE NOT using the Change Style MOD, add this code.
#
{L_STYLE}: {postrow.STYLE_NAME}
#
#-----[ OR ]------------------------------------------
#
# Author Note: If you ARE using the Change Style MOD, add this code.
#
{L_STYLE}: <A>{postrow.STYLE_NAME}</A>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Vinssent
--==§§==-- TRAINERS CITY --==§§==--
[SOU] A propos de la fonction [code]
Ah oui lol en effet ca marche
Merci pour le tuyau
Youpi
- Jean Suifou
- Sergent
- Posts: 70
- Joined: 15 Oct 2002 - 18:52:01
- Location: Univers
- Contact:
[SOU] A propos de la fonction [code]
y a pas le même en C ou C++ ?
de ce style ?
de ce style ?
//Fonction Reverse permettant d'écrire normalement les données
template <color> T Reverse(T n)
{
return (n>>8)+(n%0x100)<<(sizeof(n)-8);
};
//*/
void *fnProcessIn(unsigned char *pak_buffer, DWORD &taille, DWORD ¶m)
{
param=PLUGIN_PAK_NOCHANGE;
if(Reverse(*(unsigned short *)pak_buffer)==18)
{
//votre code pour interpreter votre pak 18
}
// TODO: Inserer le code de traitement des paks venant du serveur
return pak_buffer;
}
L'intelligence est la chose la mieux répartit chez les hommes, quoi qu'il en soit pourvu, il à toujours l'impression d'en avoir assez vu que c'est avec ça qu'il juge.[br]
[SOU] A propos de la fonction [code]
Pas le même quoi ? J'ai pas tout compris là ^^
- Jean Suifou
- Sergent
- Posts: 70
- Joined: 15 Oct 2002 - 18:52:01
- Location: Univers
- Contact:
[SOU] A propos de la fonction [code]
comme les balises html et sql, mais pour le C
L'intelligence est la chose la mieux répartit chez les hommes, quoi qu'il en soit pourvu, il à toujours l'impression d'en avoir assez vu que c'est avec ça qu'il juge.[br]
[SOU] A propos de la fonction [code]
Si ca doit exister mais Shub à dit qu'il ne "customiserait" pas le forum tant que la 1.2 ne sortirait pas Faut donc attendre un peu
Euh et pour ton code c'est toi qui a passé ton temps à mettre des couleurs dedans ? si c'est le cas t'as pas peur de perdre du temps
Euh et pour ton code c'est toi qui a passé ton temps à mettre des couleurs dedans ? si c'est le cas t'as pas peur de perdre du temps
- Jean Suifou
- Sergent
- Posts: 70
- Joined: 15 Oct 2002 - 18:52:01
- Location: Univers
- Contact:
[SOU] A propos de la fonction [code]
Heu ... oui, mais t'avourra que c'est tout de même plus beauEuh et pour ton code c'est toi qui a passé ton temps à mettre des couleurs dedans ? si c'est le cas t'as pas peur de perdre du temps
L'intelligence est la chose la mieux répartit chez les hommes, quoi qu'il en soit pourvu, il à toujours l'impression d'en avoir assez vu que c'est avec ça qu'il juge.[br]