IntegraMOD Archive Site

Home of phpBB Integrated Modifications
It is currently Fri Feb 03, 2012 11:57 pm

All times are UTC - 8 hours [ DST ]



Navigator
Online Users

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests.

Most users ever online was 264 on Fri Jan 21, 2005 8:06 am

Registered users: No registered users based on users active over the past 5 minutes

Bot Tracker (Last 10)

Yahoo [Bot]
Fri. Feb. 03 2012, 23:37
Google [Bot]
Fri. Feb. 03 2012, 20:14
Majestic-12 [Bot]
Fri. Feb. 03 2012, 11:55
TurnitinBot [Bot]
Wed. Feb. 01 2012, 19:57
MSN [Bot]
Tue. Jan. 31 2012, 05:05
Exabot [Bot]
Wed. Jan. 18 2012, 07:37
psbot [Picsearch]
Wed. Jan. 11 2012, 07:57
Alexa [Bot]
Tue. Dec. 20 2011, 04:57
Gigabot [Bot]
Tue. Dec. 13 2011, 14:23
MSNbot Media
Wed. Sep. 14 2011, 18:33

Search
  



Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Page 1 of 2      [ 13 posts ] Next topic Bottom of the page. First unread post Who posted in this topic. Print view Bookmark topic Previous topic
Author Message
 Post subject: User CUSTOM color posts?
New postPosted: Tue Mar 07, 2006 11:25 am 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
I WANT THISMOD :lol: Cans someone please please please please pretty please!! Port it!! ;)

I have the zip file but heres the code edit for it........

  1.  
  2. ##############################################################
  3. ## MOD Title: Custom post color defined in profile
  4. ## MOD Version: 1.0.1
  5. ## MOD Author: Nycon < nycon@nyconnh.net > (David W. Watson) http://www.nyconnh.net
  6. ## MOD Description: Lets users choose a custom color for their
  7. ##          posts in profile if they have enough posts.
  8. ##
  9. ## Installation Level: (moderate)
  10. ## Installation Time: ~ 20 Minutes
  11. ## Files To Edit: admin/admin_board.php,
  12. ##                admin/admin_users.php,
  13. ##        includes/function_validate.php,
  14. ##                includes/usercp_avatar.php,
  15. ##                includes/usercp_register.php,
  16. ##                language/lang_english/lang_admin.php,
  17. ##                language/lang_english/lang_main.php,
  18. ##                templates/xxx/profile_add_body.tpl,
  19. ##                templates/xxx/viewtopic_body.tpl,
  20. ##                templates/xxx/admin/board_config.php,
  21. ##                templates/xxx/admin/user_edit.php,
  22. ##                viewtopic.php
  23. ##                    
  24. ## Included Files: phpBB2/mods/colors.html
  25. ##         phpBB2/custompostcolor_install.php
  26. ##
  27. ## PRE EDITED FILES ARE IN THE "Changed Files" Folder.
  28. ## Please Keep in mind these preedited files came from
  29. ## the subsilver theme.
  30. ##
  31. ##############################################################
  32. ## Author Note: Thanks for downloading :-) This mod is made from
  33. ##      the custom username color mod version 2.0.2, BUT
  34. ##      is modified to change the color of the post
  35. ##      instead of username. The only real changes made
  36. ##      to the custom username mod, where the change of
  37. ##      of the variable names. So there would be no conflicts
  38. ##      between the two mods.
  39. ##
  40. ##############################################################
  41. ## Update History:
  42. ##
  43. ## 1.0.1 -- Added the ability to work with the Custom Username Color MOd installed
  44. ## 1.0.0 -- Initial Release (not released to the public)
  45. ##
  46. ##############################################################
  47. ## Known Issues:
  48. ##
  49. ## If a user doesn't select a color, their color for their posts
  50. ## will be black just like it is with the Custom Username Color Mod.
  51. ## I'm currently trying to figure a way to make this a default color
  52. ## besides black for the people that don't select a color. If any one
  53. ## has any ideas on how to do this, please do. And send me your revisions.
  54. ##
  55. ##############################################################
  56. ## Special Thanks:
  57. ##
  58. ## Acecool < webmaster@acecoolco.com > ( Josh M. M. ) http://www.acecoolco.com
  59. ##  (for providing the custom username color mod, and everybody who helped him with his mod)
  60. ##
  61. ##############################################################
  62. ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
  63. ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
  64. ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
  65. ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
  66. ##############################################################
  67. ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
  68. ##############################################################  
  69.  
  70. #
  71. #-----[ SQL ]------------------------------------------
  72. #
  73.     #
  74.     #-----[ NOTE ]---------------------------------
  75.     #
  76.     If you dont have phpMyAdmin installed, you can go to this webiste.
  77.     http://www.phpbbhacks.com/forums/db_generator.php to generate a php file
  78.     to install the new SQL variables. This is not a problem any more, as i added the
  79.     custompostcolor_install.php file. it will add the neccassary varibles to
  80.     your sql database for you.
  81.  
  82. ALTER TABLE phpbb_users ADD user_post_color VARCHAR(6);
  83. ALTER TABLE phpbb_users ADD user_custom_post_color VARCHAR(6);
  84. INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_custom_post_color', '250');
  85.  
  86. #
  87. #-----[ COPY ]------------------------------------------
  88. #
  89.  
  90. phpBB2/mods/colors.html to phpBB2/mods/colors.html
  91. custompostcolor_install.php to phpBB2/custompostcolor_install.php
  92.  
  93. #
  94. #-----[ Run ]-------------------------------------------
  95. #
  96.  
  97. custompostcolor_install.php from your browser
  98.  
  99. #
  100. #-----[ OPEN ]------------------------------------------
  101. #
  102. admin/admin_board.php
  103.  
  104.  
  105. #
  106. #-----[ FIND ]------------------------------------------
  107. #
  108.  
  109.     "L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
  110.  
  111. #
  112. #-----[ AFTER, ADD ]------------------------------------------
  113. #
  114.  
  115.     // Custom Post Color Mod
  116.     "L_ALLOW_CUSTOM_post_color" => $lang['Allow_custom_post_color'],
  117.     "L_ALLOW_CUSTOM_post_color_EXPLAIN" => $lang['Allow_custom_post_color_explain'],
  118.     // Custom Post Color Mod
  119.  
  120. #
  121. #-----[ FIND ]------------------------------------------
  122. #
  123.  
  124.     "NAMECHANGE_YES" => $namechange_yes,
  125.     "NAMECHANGE_NO" => $namechange_no,
  126.  
  127. #
  128. #-----[ AFTER, ADD ]------------------------------------------
  129. #
  130.  
  131.     // Custom Post Color Mod
  132.     "CUSTOM_post_color" => $new['allow_custom_post_color'],
  133.     // Custom Post Color MOd
  134.  
  135. #
  136. #-----[ OPEN ]------------------------------------------
  137. #
  138.  
  139. admin/admin_users.php
  140.  
  141. #
  142. #-----[ FIND ]------------------------------------------
  143. #
  144.  
  145.         $interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
  146.  
  147. #
  148. #-----[ AFTER, ADD ]------------------------------------------
  149. #
  150.  
  151.         // Custom Post Color Mod
  152.         $custom_post_color = ( !empty($HTTP_POST_VARS['custom_post_color']) ) ? trim(strip_tags( $HTTP_POST_VARS['custom_post_color'] ) ) : '';
  153.         // Custom Post Color Mod
  154.  
  155.  
  156. #
  157. #-----[ FIND ]------------------------------------------
  158. #
  159.  
  160.         validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
  161.  
  162. #
  163. #-----[ IN-LINE FIND ]------------------------------------------
  164. #
  165.  
  166. $interests
  167.  
  168. #
  169. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  170. #
  171.  
  172. , $custom_post_color
  173.  
  174. #
  175. #-----[ FIND ]------------------------------------------
  176. #
  177.  
  178.             $interests = htmlspecialchars(stripslashes($interests));
  179.  
  180. #
  181. #-----[ AFTER, ADD ]------------------------------------------
  182. #
  183.  
  184.             // Custom Post Color Mod
  185.             $custom_post_color = htmlspecialchars(stripslashes($custom_post_color));
  186.             // Custom Post Color Mod
  187.  
  188. #
  189. #-----[ FIND ]------------------------------------------
  190. #
  191.  
  192. $sql = "UPDATE " . USERS_TABLE . "
  193.                     SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("'", "''", $email) . "', user_icq = '" . str_replace("'", "''", $icq) . "', user_website = '" . str_replace("'", "''", $website) . "', user_occ = '" . str_replace("'", "''", $occupation) . "', user_from = '" . str_replace("'", "''", $location) . "', user_interests = '" . str_replace("'", "''", $interests) . "', user_sig = '" . str_replace("'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("'", "''", $aim) . "', user_yim = '" . str_replace("'", "''", $yim) . "', user_msnm = '" . str_replace("'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
  194.  
  195. #
  196. #-----[ IN-LINE FIND ]------------------------------------------
  197. #
  198.  
  199. user_interests = '" . str_replace("'", "''", $interests) . "',
  200.  
  201. #
  202. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  203. #
  204.  
  205.  user_custom_post_color = '" . str_replace("'", "''", $custom_post_color) . "',
  206.  
  207. #
  208. #-----[ FIND ]------------------------------------------
  209. #
  210.  
  211.             $interests = htmlspecialchars(stripslashes($interests));
  212.  
  213. #
  214. #-----[ AFTER, ADD ]------------------------------------------
  215. #
  216.  
  217.             // Custom Post Color Mod
  218.             $custom_post_color = htmlspecialchars(stripslashes($custom_post_color));
  219.             // Custom Post Color Mod
  220.  
  221. #
  222. #-----[ FIND ]------------------------------------------
  223. #
  224.  
  225.         $interests = htmlspecialchars($this_userdata['user_interests']);
  226.  
  227. #
  228. #-----[ AFTER, ADD ]------------------------------------------
  229. #
  230.  
  231.         // Custom Post Color Mod
  232.         $custom_post_color = htmlspecialchars($this_userdata['user_custom_post_color']);
  233.         // Custom Post Color Mod
  234.  
  235. #
  236. #-----[ FIND ]------------------------------------------
  237. #
  238.  
  239.             $s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
  240.  
  241.  
  242. #
  243. #-----[ AFTER, ADD ]------------------------------------------
  244. #
  245.  
  246.             // Custom Post Color Mod
  247.             $s_hidden_fields .= '<input type="hidden" name="custom_post_color" value="' . str_replace("\"", """, $custom_post_color) . '" />';
  248.             // Custom Post Color MOd
  249.  
  250. #
  251. #-----[ FIND ]------------------------------------------
  252. #
  253.  
  254.             'INTERESTS' => $interests,
  255.  
  256. #
  257. #-----[ AFTER, ADD ]------------------------------------------
  258. #
  259.  
  260.             // Custom Post Color Mod
  261.             'CUSTOM_post_color' => $custom_post_color,
  262.             // Custom Post Color Mod
  263.  
  264. #
  265. #-----[ FIND ]------------------------------------------
  266. #
  267.  
  268.             'L_INTERESTS' => $lang['Interests'],
  269.  
  270. #
  271. #-----[ AFTER, ADD ]------------------------------------------
  272. #
  273.  
  274.             'L_CUSTOM_post_color' => $lang['Custom_post_color'],
  275.  
  276. #
  277. #-----[ OPEN ]------------------------------------------
  278. #
  279.  
  280. includes/function_validate.php
  281.  
  282. #
  283. #-----[ FIND ]------------------------------------------
  284. #
  285.  
  286. //
  287. // Does supplementary validation of optional profile fields. This expects common stuff like trim() and strip_tags()
  288. // to have already been run. Params are passed by-ref, so we can set them to the empty string if they fail.
  289. //
  290. function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$location, &$occupation, &$interests, &$sig)
  291. {
  292.     $check_var_length = array('aim', 'msnm', 'yim', 'location', 'occupation', 'interests', 'sig');
  293.  
  294.     for($i = 0; $i < count($check_var_length); $i++)
  295.     {
  296.         if ( strlen($$check_var_length[$i]) < 2 )
  297.         {
  298.             $$check_var_length[$i] = '';
  299.         }
  300.     }
  301.  
  302.     // ICQ number has to be only numbers.
  303.     if ( !preg_match('/^[0-9]+$/', $icq) )
  304.     {
  305.         $icq = '';
  306.     }
  307.    
  308.     // website has to start with http://, followed by something with length at least 3 that
  309.     // contains at least one dot.
  310.     if ( $website != "" )
  311.     {
  312.         if ( !preg_match('#^http:\/\/#i', $website) )
  313.         {
  314.             $website = 'http://' . $website;
  315.         }
  316.  
  317.         if ( !preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) )
  318.         {
  319.             $website = '';
  320.         }
  321.     }
  322.  
  323.     return;
  324. }
  325.  
  326. #
  327. #-----[ IN-LINE FIND]------------------------------------------
  328. #
  329.  
  330. &$interests
  331.  
  332. #
  333. #-----[ IN-LINE AFTER, ADD]------------------------------------------
  334. #
  335.  
  336. , &$custom_post_color
  337.  
  338. #
  339. #-----[ IN-LINE FIND]
  340. #
  341.  
  342.         if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
  343.         {
  344.             $website = '';
  345.         }
  346.     }
  347.  
  348. #
  349. #-----[ AFTER, ADD]
  350. #
  351.  
  352.     // Custom Post Color MOd
  353.     // Custom_post_color should not contain characters that are not usable in HTML color code
  354.     If ( !preg_match('/^[0-9A-Fa-f]{6}$/', $custom_post_color) )
  355.     {
  356.         $custom_post_color = '';
  357.     }
  358.     // Custom Post Color Mod
  359. #
  360. #-----[ OPEN ]------------------------------------------
  361. #
  362.  
  363. includes/usercp_avatar.php
  364.  
  365. #
  366. #-----[ FIND ]------------------------------------------
  367. #
  368.  
  369. function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
  370.  
  371. #
  372. #-----[ IN-LINE FIND ]------------------------------------------
  373. #
  374.  
  375. , &$session_id
  376.  
  377. #
  378. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  379. #
  380.  
  381. , &$custom_post_color
  382.  
  383. #
  384. #-----[ FIND ]------------------------------------------
  385. #
  386.  
  387.     $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
  388.  
  389. #
  390. #-----[ IN-LINE FIND ]------------------------------------------
  391. #
  392.  
  393. 'dateformat'
  394.  
  395. #
  396. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  397. #
  398.  
  399. , 'custom_post_color'
  400.  
  401.  
  402. #
  403. #-----[ OPEN ]------------------------------------------
  404. #
  405.  
  406. includes/usercp_register.php
  407.  
  408. #
  409. #-----[ FIND ]------------------------------------------
  410. #
  411.  
  412.     $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
  413.  
  414. #
  415. #-----[ IN-LINE FIND ]------------------------------------------
  416. #
  417.  
  418. 'interests' => 'interests'
  419.  
  420. #
  421. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  422. #
  423.  
  424. , 'custom_post_color' => 'custom_post_color'
  425.  
  426. #
  427. #-----[ FIND ]------------------------------------------
  428. #
  429.  
  430.     validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
  431.  
  432. #
  433. #-----[ IN-LINE FIND ]------------------------------------------
  434. #
  435.  
  436. $interests,
  437.  
  438. #
  439. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  440. #
  441.  
  442.  $custom_post_color,
  443.  
  444. #
  445. #-----[ FIND ]------------------------------------------
  446. #
  447.  
  448.         $interests = stripslashes($interests);
  449.  
  450. #
  451. #-----[ AFTER, ADD ]------------------------------------------
  452. #
  453.  
  454.         // Custom Post Color Mod
  455.         $custom_post_color = stripslashes($custom_post_color);
  456.         // Custom Post Color Mod
  457.  
  458. #
  459. #-----[ FIND ]------------------------------------------
  460. #
  461.  
  462.             $sql = "UPDATE " . USERS_TABLE . "
  463.                 SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("'", "''", $email) ."', user_icq = '" . str_replace("'", "''", $icq) . "', user_website = '" . str_replace("'", "''", $website) . "', user_occ = '" . str_replace("'", "''", $occupation) . "', user_from = '" . str_replace("'", "''", $location) . "', user_interests = '" . str_replace("'", "''", $interests) . "', user_sig = '" . str_replace("'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("'", "''", $yim) . "', user_msnm = '" . str_replace("'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("'", "''", $user_dateformat) . "', user_lang = '" . str_replace("'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("'", "''", $user_actkey) . "'" . $avatar_sql . "
  464.  
  465.  
  466. #
  467. #-----[ IN-LINE FIND ]--------------------------------------------------------
  468. #
  469.  
  470. user_sig = '" . str_replace("'", "''", $signature) . "',
  471.  
  472. #
  473. #-----[ IN-LINE AFTER, ADD ]--------------------------------------------------
  474. #
  475.  
  476.  user_custom_post_color = '" . str_replace("'", "''", $custom_post_color) . "',
  477.  
  478. #
  479. #-----[ FIND ]----------------------------------------------------------------
  480. #
  481.  
  482.             //
  483.             // Get current date
  484.             //
  485.             $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
  486.                 VALUES ($user_id, '" . str_replace("'", "''", $username) . "', " . time() . ", '" . str_replace("'", "''", $new_password) . "', '" . str_replace("'", "''", $email) . "', '" . str_replace("'", "''", $icq) . "', '" . str_replace("'", "''", $website) . "', '" . str_replace("'", "''", $occupation) . "', '" . str_replace("'", "''", $location) . "', '" . str_replace("'", "''", $interests) . "', '" . str_replace("'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("'", "''", $yim) . "', '" . str_replace("'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("'", "''", $user_dateformat) . "', '" . str_replace("'", "''", $user_lang) . "', $user_style, 0, 1, ";
  487.  
  488.  
  489. #
  490. #-----[ IN-LINE FIND ]--------------------------------------------------------
  491. #
  492.  
  493. , user_allow_pm
  494.  
  495. #
  496. #-----[ IN-LINE AFTER, ADD ]--------------------------------------------------
  497. #
  498.  
  499. , user_custom_post_color
  500.  
  501. #
  502. #-----[ IN-LINE FIND ]--------------------------------------------------------
  503. #
  504.  
  505. "', $user_style, 0, 1, "
  506.  
  507. #
  508. #-----[ IN-LINE REPLACE WITH ]-------------------------------------------------
  509. #
  510.  
  511. "', $user_style, 0, 1, '" . str_replace("'", "''", $custom_post_color) . "', "
  512.  
  513. #
  514. #-----[ NOTE ]-----------------------------------------------------------------
  515. #
  516.     If you have the custom username mod installed follow these instructions for the above two
  517.  
  518.         #
  519.         #-----[ FIND ]-------------------------------------------------
  520.         #
  521.             "', $user_style, 0, 1, '" . str_replace("'", "''", $custom_color) . "', "
  522.  
  523.         #
  524.         #-----[ INLINE FIND ]------------------------------------------
  525.         #
  526.             . "', ";
  527.  
  528.         #
  529.         #-----[ INLINE, REPLACE WITH ]---------------------------------
  530.         #
  531.             . "', '" . str_replace("'", "''", $custom_post_color) . "', ";
  532.  
  533. #
  534. #-----[ FIND ]-----------------------------------------------------------------
  535. #
  536.  
  537.     $interests = stripslashes($interests);
  538.  
  539. #
  540. #-----[ AFTER, ADD ]------------------------------------------
  541. #
  542.  
  543.     // Custom Post Color Mod
  544.     $custom_post_color = stripslashes($custom_post_color);
  545.     // Custom Post Color Mod
  546.  
  547. #
  548. #-----[ FIND ]------------------------------------------
  549. #
  550.  
  551.     $interests = $userdata['user_interests'];
  552.  
  553. #
  554. #-----[ AFTER, ADD ]------------------------------------------
  555. #
  556.  
  557.     // Custom Post Color Mod
  558.     $custom_post_color = $userdata['user_custom_post_color'];
  559.     // Custom Post Color Mod
  560.  
  561. #
  562. #-----[ FIND ]------------------------------------------
  563. #
  564.  
  565.     display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
  566. }
  567.  
  568. #
  569. #-----[ IN-LINE FIND ]------------------------------------------
  570. #
  571.  
  572. $user_dateformat
  573.  
  574. #
  575. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  576. #
  577.  
  578. , $custom_post_color
  579.  
  580. #
  581. #-----[ FIND ]------------------------------------------
  582. #
  583.  
  584.         'S_FORM_ENCTYPE' => $form_enctype,
  585.         'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
  586.     );
  587.  
  588. #
  589. #-----[ AFTER, ADD ]------------------------------------------
  590. #
  591.  
  592.     // Custom Post Color Mod
  593.         if ( $userdata['user_posts'] >= $board_config['allow_custom_post_color'] )
  594.         {
  595.         $template->assign_block_vars('custom_post_color', array(
  596.                     'CUSTOM_post_color' => $custom_post_color,
  597.                         'L_CUSTOM_post_color' => $lang['Custom_post_color'],
  598.                         'L_CUSTOM_post_color_EXPLAIN' => $lang['Custom_post_color_Explain'])
  599.         );
  600.         }
  601.     // Custom Post Color Mod
  602.  
  603.  
  604. #
  605. #-----[ OPEN ]------------------------------------------
  606. #
  607.  
  608. language/lang_english/lang_admin.php
  609.  
  610. #
  611. #-----[ FIND ]------------------------------------------
  612. #
  613.  
  614. //
  615. // That's all Folks!
  616.  
  617. #
  618. #-----[ BEFORE, ADD ]------------------------------------------
  619. #
  620.  
  621. //BEGIN CUSTOM POST COLOR MOD
  622. $lang['Custom_post_color'] = "Post Color";
  623. $lang['Allow_custom_post_color'] = "Allow Custom Post Color";
  624. $lang['Allow_custom_post_color_explain'] = "Posts needed before user can choose post color.";
  625. //END CUSTOM POST COLOR MOD
  626.  
  627. #
  628. #-----[ OPEN ]------------------------------------------
  629. #
  630.  
  631. language/lang_english/lang_main.php
  632.  
  633. #
  634. #-----[ FIND ]------------------------------------------
  635. #
  636.  
  637. //
  638. // That's all Folks!
  639.  
  640. #
  641. #-----[ BEFORE, ADD ]------------------------------------------
  642. #
  643.  
  644. //BEGIN CUSTOM POST COLOR MOD
  645. $lang['Custom_post_color'] = "Post Color";
  646. $lang['Custom_post_color_Explain'] = "Define your Custom Post color. <a href=\"mods/colors.html\" target=\"_colors\">Color Examples.</a>";
  647. //END CUSTOM POST COLOR MOD
  648.  
  649. #
  650. #-----[ OPEN ]------------------------------------------
  651. #
  652.  
  653. templates/xxx/profile_add_body.tpl
  654.  
  655. #
  656. #-----[ FIND ]------------------------------------------
  657. #
  658.  
  659.     <tr>
  660.         <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
  661.         <td class="row2"><input type="text" class="post" style="width:200px" name="username" size="25" maxlength="25" value="{USERNAME}" /></td>
  662.     </tr>
  663.  
  664. #
  665. #-----[ AFTER, ADD ]------------------------------------------
  666. #
  667.  
  668.     <!-- BEGIN custom_post_color -->
  669.     <tr>
  670.            <td class="row1"><span class="gen">{custom_post_color.L_CUSTOM_post_color}:</span><br /><span class="gensmall">{custom_post_color.L_CUSTOM_post_color_EXPLAIN}<br /></td>
  671.            <td class="row2">
  672.            <input type="text" class="post"style="width: 200px" name="custom_post_color" size="35" maxlength="6" value="{custom_post_color.CUSTOM_post_color}" />
  673.        </td>
  674.     </tr>
  675.     <!-- END custom_post_color -->
  676.  
  677. #
  678. #-----[ OPEN ]------------------------------------------
  679. #
  680.  
  681. templates/xxx/viewtopic_body.tpl
  682.  
  683. #
  684. #-----[ FIND ]------------------------------------------
  685. #
  686.  
  687. {postrow.MESSAGE}
  688.  
  689.  
  690. #
  691. #-----[ INLINE BEFORE, ADD ]------------------------------------------
  692. #
  693.  
  694. <font color="#{postrow.CUSTOM_post_color}">
  695.  
  696. #
  697. #-----[ IN-LINE FIND ]------------------------------------------
  698. #
  699.  
  700. {postrow.POSTER_MESSAGE}
  701.  
  702. #
  703. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  704. #
  705.  
  706. </font>
  707.  
  708. #
  709. #-----[ OPEN ]------------------------------------------
  710. #
  711.  
  712. templates/xxx/admin/board_config_body.tpl
  713.  
  714. #
  715. #-----[ FIND ]------------------------------------------
  716. #
  717.  
  718.     <tr>
  719.         <td class="row1">{L_ALLOW_NAME_CHANGE}</td>
  720.         <td class="row2"><input type="radio" name="allow_namechange" value="1" {NAMECHANGE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_namechange" value="0" {NAMECHANGE_NO} /> {L_NO}</td>
  721.     </tr>
  722.  
  723. #
  724. #-----[ AFTER, ADD ]------------------------------------------
  725. #
  726.  
  727.     <tr>
  728.         <td class="row1">{L_ALLOW_CUSTOM_post_color}<br /><span class="gensmall">{L_ALLOW_CUSTOM_post_color_EXPLAIN}</span></td>
  729.         <td class="row2"><input type="text" class="post" size="5" maxlength="4" name="allow_custom_post_color" value="{CUSTOM_post_color}" /></td>
  730.     </tr>
  731.  
  732. #
  733. #-----[ OPEN ]------------------------------------------
  734. #
  735.  
  736. templates/xxx/admin/user_edit_body.tpl
  737.  
  738. #
  739. #-----[ FIND ]------------------------------------------
  740. #
  741.  
  742.     <tr>
  743.       <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
  744.       <td class="row2">
  745.         <input type="text" name="username" size="35" maxlength="40" value="{USERNAME}" />
  746.       </td>
  747.     </tr>
  748.  
  749. #
  750. #-----[ AFTER, ADD ]------------------------------------------
  751. #
  752.  
  753.         <tr>
  754.           <td class="row1"><span class="gen">{L_CUSTOM_post_color}</span></td>
  755.           <td class="row2"><input type="text" name="custom_post_color" size="35" maxlength="6" value="{CUSTOM_post_color}" class="post" /></td>
  756.         </tr>
  757.  
  758. #
  759. #-----[ OPEN ]------------------------------------------
  760. #
  761.  
  762. viewtopic.php
  763.  
  764. #
  765. #-----[ FIND ]------------------------------------------
  766. #
  767.  
  768. $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
  769.  
  770. #
  771. #-----[ IN-LINE FIND ]------------------------------------------
  772. #
  773.  
  774. u.user_from
  775.  
  776. #
  777. #-----[ IN-LINE AFTER, ADD ]------------------------------------------
  778. #
  779.  
  780. , u.user_custom_post_color
  781.  
  782. #
  783. #-----[ FIND ]------------------------------------------
  784. #
  785.  
  786.     $poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
  787.  
  788. #
  789. #-----[ AFTER, ADD ]------------------------------------------
  790. #
  791.  
  792.     // Custom Post Color Mod
  793.     $poster_custom_post_color = ( $postrow[$i]['user_custom_post_color'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_custom_post_color'] : '';
  794.     // Custom Post Color Mod
  795.  
  796. #
  797. #-----[ FIND ]------------------------------------------
  798. #
  799.  
  800.     //
  801.     // Again this will be handled by the templating
  802.     // code at some point
  803.     //
  804.     $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
  805.     $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
  806.  
  807. #
  808. #-----[ AFTER, ADD ]------------------------------------------
  809. #
  810.  
  811.         // Custom Post Color Mod
  812.     if ( $postrow[$i]['user_custom_post_color'] )
  813.     {
  814.             $poster_custom_post_color = ( $postrow[$i]['user_custom_post_color'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_custom_post_color'] : '';
  815.             $poster_color = '';
  816.     }
  817.     // Custom Post Color Mod
  818.  
  819. #
  820. #-----[ FIND ]------------------------------------------
  821. #
  822.  
  823.         'RANK_IMAGE' => $rank_image,
  824.  
  825. #
  826. #-----[ AFTER, ADD ]------------------------------------------
  827. #
  828.  
  829.         'CUSTOM_post_color' => $poster_custom_post_color,
  830.  
  831. #
  832. #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
  833. #
  834. # EoM
  835.  


Top
 Profile  
 
 Post subject:
New postPosted: Tue Mar 07, 2006 12:25 pm 
Offline
User avatar
PCP Master
PCP Master

Joined: Sun May 30, 2004 8:15 pm
Posts: 1865
Gender: None specified
This should work pretty close to out of the box per say. Have you tried installing it yet?

As far as getting the option to show up in the profile section you could easily just copy whats used for the realname field for custom color posts..

_________________
.....................................................


Top
 Profile  
 
 Post subject:
New postPosted: Tue Mar 07, 2006 8:10 pm 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
MrDSL\";p=\"65325 wrote:
you could easily just copy whats used for the realname field for custom color posts..


You had me till this part ;) b4 6 weeks ago I barely new PHP was more then some phrase for a cool message board :lol: Aaaah, but now I'm addicted! hehe

I could just give it a go but there is A LOT of little tedious edits (for me) And I have seen how different some of the integra files can be compared to standard PHPBB......HEY, wait a minute! are you trying to break me in! :lol: ;)

I'll let you know if I get brave, lol someone is more then welcome to it first HAHA!


Top
 Profile  
 
 Post subject:
New postPosted: Tue Mar 07, 2006 8:40 pm 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
I do know what the real name field is though ;)


Top
 Profile  
 
 Post subject:
New postPosted: Tue Mar 07, 2006 9:12 pm 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
I cant find this file??

includes/usercp_avatar.php


Top
 Profile  
 
 Post subject:
New postPosted: Wed Mar 08, 2006 7:29 am 
Offline
User avatar
PCP Master
PCP Master

Joined: Sun May 30, 2004 8:15 pm
Posts: 1865
Gender: None specified
You would skip that file edit..

_________________
.....................................................


Top
 Profile  
 
 Post subject:
New postPosted: Wed Mar 08, 2006 9:37 am 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
Gotcha!

Ill be back Im sure ;) I did have to change some of the placement on code (common sence) so if I get it figured out and remember :lol: I'll put togeter a Intergamod code edit ;)

THANKS FOR YOUR HELP MrDSL!


*edit* That is if my code edit even works LOL!


Top
 Profile  
 
 Post subject:
New postPosted: Wed Mar 08, 2006 10:13 am 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
Okay skip this one too? includes/usercp_register.php

and now I cant find.... templates/xxx/profile_add_body.tpl in my fisubice template??? stuck again :lol:


Top
 Profile  
 
 Post subject:
New postPosted: Wed Mar 08, 2006 11:29 am 
Offline
User avatar
PCP Master
PCP Master

Joined: Sun May 30, 2004 8:15 pm
Posts: 1865
Gender: None specified
Skip it....



This is what calls the code in the profile
  1.  
  2.    // Custom Post Color Mod
  3.         if ( $userdata['user_posts'] >= $board_config['allow_custom_post_color'] )
  4.         {
  5.       $template->assign_block_vars('custom_post_color', array(
  6.                    'CUSTOM_post_color' => $custom_post_color,
  7.                         'L_CUSTOM_post_color' => $lang['Custom_post_color'],
  8.                         'L_CUSTOM_post_color_EXPLAIN' => $lang['Custom_post_color_Explain'])
  9.       );
  10.         }
  11.    // Custom Post Color Mod


This is what will need to be defined in PCP. This one is a bit more tricky then what I thought.

The weird thing is the mod calls to create

  1. ALTER TABLE phpbb_users ADD user_post_color VARCHAR(6);
  2. ALTER TABLE phpbb_users ADD user_custom_post_color VARCHAR(6);



I don't see where users_post_color is used at all in the mod
_________________
.....................................................


Top
 Profile  
 
 Post subject:
New postPosted: Wed Mar 08, 2006 11:42 am 
Offline
IM Regular poster
IM Regular poster

Joined: Mon Feb 06, 2006 11:05 am
Posts: 65
Gender: None specified
Dunno?? Do we remove that? I taked to the author some time oag via email but he didnt know anyting about integramod and told me to ask you guys ;)

I couldnt find anythingg on it at phpbb.com and I believe I DL'ed it from phphacks. Good knews is I have seen it working on a php forum :lol: and tis MOD would be loved by many!

I really appriciate your help!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Page 1 of 2      [ 13 posts ] Next topic Top First unread post Who posted in this topic. Print view Bookmark topic Previous topic
Go to page  1, 2  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next


All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
The teamDelete all board cookies • All times are UTC - 8 hours [ DST ]
Portal: Stargate Portal aka Kiss Portal (the original phpbb3portal) © 2005 - 2007 Michael O'Toole

Support This Project Valid XHTML 1.0 Strict
phpBBIntegraMODStargate PortalphpBB SEO