Mercurial > repos > phpBB-MODs > Multi_Race_Rank_Themes
comparison Install.xml @ 14:7f85fc163738
* Backport changes from v1.2.4
* Add code to show themed rank when viewing PMs
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 15 Jun 2009 19:51:29 +0000 |
parents | 7ef9cdf7b325 |
children | f78621bde952 |
comparison
equal
deleted
inserted
replaced
13:7ef9cdf7b325 | 14:7f85fc163738 |
---|---|
10 <header> | 10 <header> |
11 <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> | 11 <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> |
12 <title lang="en-gb">Multi-race rank themes</title> | 12 <title lang="en-gb">Multi-race rank themes</title> |
13 <description lang="en-gb">This MOD will allow you to add, modify and remove rank themes. | 13 <description lang="en-gb">This MOD will allow you to add, modify and remove rank themes. |
14 | 14 |
15 Rank themes are selectable collections of ranks that users can choose to use, allowing RPG forums to have different 'races' or allowing 'normal' forums to provide an set of alternative icon images for their users.</description> | 15 Rank themes are selectable collections of ranks that normal users can choose to use, allowing RPG forums to have different 'races' or allowing 'normal' forums to provide an set of alternative icon images for their users. |
16 | |
17 Note that users with "special ranks" (normally Administrators etc.) will not get a theme selection in the UCP as the special rank is their rank theme. If users with special ranks want a themed rank image then you need to also install my "Special and Normal Rank Images" MOD.</description> | |
16 <author-notes lang="en-gb"><![CDATA[The following description is taken from digiTsai's phpBB2 'Rank themes' mod (with some minor modifications in the last paragraph), as I couldn't word it any better myself: | 18 <author-notes lang="en-gb"><![CDATA[The following description is taken from digiTsai's phpBB2 'Rank themes' mod (with some minor modifications in the last paragraph), as I couldn't word it any better myself: |
17 | 19 |
18 Different ranking themes for your forum. Users are allowed to choose a ranking theme to their liking. For example, you can add two ranking themes named "Good" and "Evil" for your forum. The ranking then might look like this: | 20 Different ranking themes for your forum. Users are allowed to choose a ranking theme to their liking. For example, you can add two ranking themes named "Good" and "Evil" for your forum. The ranking then might look like this: |
19 | 21 |
20 Posts | Good | Evil | 22 Posts | Good | Evil |
39 </author-group> | 41 </author-group> |
40 <link-group> | 42 <link-group> |
41 <link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link> | 43 <link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link> |
42 <link type="contrib" href="contrib/Upgrade-1.2.3.xml" lang="en-gb">Upgrade instructions from v1.2.3</link> | 44 <link type="contrib" href="contrib/Upgrade-1.2.3.xml" lang="en-gb">Upgrade instructions from v1.2.3</link> |
43 </link-group> | 45 </link-group> |
44 <mod-version>1.3.1</mod-version> | 46 <mod-version>1.3.2</mod-version> |
45 <installation> | 47 <installation> |
46 <level>intermediate</level> | 48 <level>intermediate</level> |
47 <time>3600</time> | 49 <time>3600</time> |
48 <target-version>3.0.4</target-version> | 50 <target-version>3.0.5</target-version> |
49 </installation> | 51 </installation> |
50 <history> | 52 <history> |
53 <entry> | |
54 <date>2009-06-15</date> | |
55 <rev-version>1.3.2</rev-version> | |
56 <changelog lang="en-gb"> | |
57 <change>Add: Add missing multi-ranking to PM viewing</change> | |
58 <change>Fix: Backport changes from 1.2.4 to pass validation</change> | |
59 <change>Change: Change edits of get_user_rank() calls to find closing brackets and add before to ensure the optional parameters is at the end</change> | |
60 </changelog> | |
61 </entry> | |
51 <entry> | 62 <entry> |
52 <date>2009-05-17</date> | 63 <date>2009-05-17</date> |
53 <rev-version>1.3.1</rev-version> | 64 <rev-version>1.3.1</rev-version> |
54 <changelog lang="en-gb"> | 65 <changelog lang="en-gb"> |
55 <change>Change: Hide rank theme if user has a special rank (as per v1.2)</change> | 66 <change>Change: Hide rank theme if user has a special rank (as per v1.2)</change> |
377 <find><![CDATA[ $special_rank = request_var('special_rank', 0);]]></find> | 388 <find><![CDATA[ $special_rank = request_var('special_rank', 0);]]></find> |
378 <action type="replace-with"><![CDATA[ //Multi-rank theme mod: special rank now calculated another way | 389 <action type="replace-with"><![CDATA[ //Multi-rank theme mod: special rank now calculated another way |
379 //$special_rank = request_var('special_rank', 0); | 390 //$special_rank = request_var('special_rank', 0); |
380 $rank_theme = request_var('rank_theme', DEFAULT_RANK_THEME_ID); | 391 $rank_theme = request_var('rank_theme', DEFAULT_RANK_THEME_ID); |
381 | 392 |
382 if ($rank_theme < DEFAULT_RANK_THEME_ID) | 393 if ($rank_theme < 0) |
383 { | 394 { |
384 $special_rank = 1; | 395 $special_rank = 1; //Stick with the phpBB convention and use magic numbers for the "special rank" value |
385 $rank_theme = SPECIAL_RANK_THEME_ID; | 396 $rank_theme = SPECIAL_RANK_THEME_ID; |
386 } | 397 } |
387 else | 398 else |
388 { | 399 { |
389 $special_rank = 0; | 400 $special_rank = 0; |
433 | 444 |
434 //Multi-rank theme mod: Add separate theme saving, deleting, adding and editing rather than overriding a single mode | 445 //Multi-rank theme mod: Add separate theme saving, deleting, adding and editing rather than overriding a single mode |
435 case 'save_theme': | 446 case 'save_theme': |
436 | 447 |
437 $theme_title = utf8_normalize_nfc(request_var('title', '', true)); | 448 $theme_title = utf8_normalize_nfc(request_var('title', '', true)); |
438 $theme_public = request_var('theme_public', 1); | 449 $theme_public = request_var('theme_public', RANK_THEME_PUBLIC); |
439 | 450 |
440 if (!$theme_title) | 451 if (!$theme_title) |
441 { | 452 { |
442 trigger_error($user->lang['NO_RANK_THEME_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING); | 453 trigger_error($user->lang['NO_RANK_THEME_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING); |
443 } | 454 } |
444 | 455 |
445 if ($rank_id <= DEFAULT_RANK_THEME_ID && $rank_id != 0) | 456 if ($rank_id == DEFAULT_RANK_THEME_ID || $rank_id == SPECIAL_RANK_THEME_ID || $rank_id <= 0) |
446 { | 457 { |
447 trigger_error($user->lang['MUST_SELECT_RANK_THEME'] . adm_back_link($this->u_action), E_USER_WARNING); | 458 trigger_error($user->lang['MUST_SELECT_RANK_THEME'] . adm_back_link($this->u_action), E_USER_WARNING); |
448 } | 459 } |
449 | 460 |
450 $sql_ary = array( | 461 $sql_ary = array( |
575 foreach ($this->rank_themes as $theme) | 586 foreach ($this->rank_themes as $theme) |
576 { | 587 { |
577 $template->assign_block_vars('themes', array( | 588 $template->assign_block_vars('themes', array( |
578 'RANK_THEME_TITLE' => $theme['rtheme_title'], | 589 'RANK_THEME_TITLE' => $theme['rtheme_title'], |
579 'S_THEME_PUBLIC' => $theme['rtheme_public'], | 590 'S_THEME_PUBLIC' => $theme['rtheme_public'], |
580 'U_EDIT_THEME' => ($theme['rtheme_id'] > 1 ? $this->u_action . '&action=edit_theme&id=' . $theme['rtheme_id'] : ''), | 591 'U_EDIT_THEME' => ($theme['rtheme_id'] != DEFAULT_RANK_THEME_ID && $theme['rtheme_id'] != SPECIAL_RANK_THEME_ID ? $this->u_action . '&action=edit_theme&id=' . $theme['rtheme_id'] : ''), |
581 'U_DELETE_THEME' => ($theme['rtheme_id'] > 1 ? $this->u_action . '&action=delete_theme&id=' . $theme['rtheme_id'] : ''))); | 592 'U_DELETE_THEME' => ($theme['rtheme_id'] != DEFAULT_RANK_THEME_ID && $theme['rtheme_id'] != SPECIAL_RANK_THEME_ID ? $this->u_action . '&action=delete_theme&id=' . $theme['rtheme_id'] : ''))); |
582 | 593 |
583 if (sizeof($ranks[$theme['rtheme_id']]) > 0) | 594 if (sizeof($ranks[$theme['rtheme_id']]) > 0) |
584 { | 595 { |
585 foreach ($ranks[$theme['rtheme_id']] as $row) | 596 foreach ($ranks[$theme['rtheme_id']] as $row) |
586 { | 597 { |
605 return; | 616 return; |
606 } | 617 } |
607 | 618 |
608 global $db, $user; | 619 global $db, $user; |
609 | 620 |
610 $sql = 'SELECT * FROM ' . RANK_THEMES_TABLE. " WHERE rtheme_id > ".DEFAULT_RANK_THEME_ID." ORDER BY rtheme_title"; | 621 $sql = 'SELECT * FROM ' . RANK_THEMES_TABLE. ' WHERE rtheme_id <> ' . DEFAULT_RANK_THEME_ID . ' AND rtheme_id <> ' . SPECIAL_RANK_THEME_ID . ' ORDER BY rtheme_title'; |
611 $result = $db->sql_query($sql); | 622 $result = $db->sql_query($sql); |
612 | 623 |
613 $this->rank_themes = array(SPECIAL_RANK_THEME_ID => array('rtheme_id' => SPECIAL_RANK_THEME_ID, 'rtheme_title' => $user->lang['SPECIAL_RANK_THEME'], 'rtheme_public' => false), | 624 $this->rank_themes = array(SPECIAL_RANK_THEME_ID => array('rtheme_id' => SPECIAL_RANK_THEME_ID, 'rtheme_title' => $user->lang['SPECIAL_RANK_THEME'], 'rtheme_public' => false), |
614 DEFAULT_RANK_THEME_ID => array('rtheme_id' => DEFAULT_RANK_THEME_ID, 'rtheme_title' => $user->lang['DEFAULT_RANK_THEME'], 'rtheme_public' => true)); | 625 DEFAULT_RANK_THEME_ID => array('rtheme_id' => DEFAULT_RANK_THEME_ID, 'rtheme_title' => $user->lang['DEFAULT_RANK_THEME'], 'rtheme_public' => true)); |
615 | 626 |
676 </inline-edit> | 687 </inline-edit> |
677 </edit> | 688 </edit> |
678 </open> | 689 </open> |
679 <open src="includes/cache.php"> | 690 <open src="includes/cache.php"> |
680 <edit> | 691 <edit> |
681 <find><![CDATA[$sql = 'SELECT * | 692 <find><![CDATA[ $sql = 'SELECT * |
682 FROM ' . RANKS_TABLE . ' | 693 FROM ' . RANKS_TABLE . ' |
683 ORDER BY rank_min DESC';]]></find> | 694 ORDER BY rank_min DESC';]]></find> |
684 <action type="replace-with"><![CDATA[ //Make sure we only pull data for public rank themes and the special theme | 695 <action type="replace-with"><![CDATA[ //Make sure we only pull data for public rank themes and the special theme |
685 $sql = $db->sql_build_query('SELECT', array( | 696 $sql = $db->sql_build_query('SELECT', array( |
686 'SELECT' => 'r.*', | 697 'SELECT' => 'r.*', |
694 'FROM' => array(RANKS_TABLE => 'r'), | 705 'FROM' => array(RANKS_TABLE => 'r'), |
695 'ON' => 'r.rank_theme = t.rtheme_id' | 706 'ON' => 'r.rank_theme = t.rtheme_id' |
696 ) | 707 ) |
697 ), | 708 ), |
698 | 709 |
699 'WHERE' => 't.rtheme_public OR t.rtheme_id = ' . SPECIAL_RANK_THEME_ID, | 710 'WHERE' => 't.rtheme_public = ' . RANK_THEME_PUBLIC . ' OR t.rtheme_id = ' . SPECIAL_RANK_THEME_ID, |
700 'ORDER_BY' => 'r.rank_min DESC' | 711 'ORDER_BY' => 'r.rank_min DESC' |
701 ));]]></action> | 712 ));]]></action> |
702 </edit> | 713 </edit> |
703 <edit> | 714 <edit> |
704 <find><![CDATA[$ranks['normal'][] = array(]]></find> | 715 <find><![CDATA[$ranks['normal'][] = array(]]></find> |
709 <edit> | 720 <edit> |
710 <find><![CDATA[// Additional constants]]></find> | 721 <find><![CDATA[// Additional constants]]></find> |
711 <action type="after-add"><![CDATA[ | 722 <action type="after-add"><![CDATA[ |
712 define('SPECIAL_RANK_THEME_ID', -1); | 723 define('SPECIAL_RANK_THEME_ID', -1); |
713 define('DEFAULT_RANK_THEME_ID', 1); | 724 define('DEFAULT_RANK_THEME_ID', 1); |
725 define('DEFAULT_RANK_THEME_ID', 1); | |
726 define('RANK_THEME_PRIVATE', 0); | |
727 define('RANK_THEME_PUBLIC', 1); | |
714 define('ALLOW_RANK_THEME_AT_REGISTRATION', true);]]></action> | 728 define('ALLOW_RANK_THEME_AT_REGISTRATION', true);]]></action> |
715 </edit> | 729 </edit> |
716 <edit> | 730 <edit> |
717 <find><![CDATA[define('RANKS_TABLE', $table_prefix . 'ranks');]]></find> | 731 <find><![CDATA[// Additional tables]]></find> |
718 <action type="after-add"><![CDATA[define('RANK_THEMES_TABLE', $table_prefix . 'rank_themes');]]></action> | 732 <action type="after-add"><![CDATA[define('RANK_THEMES_TABLE', $table_prefix . 'rank_themes');]]></action> |
719 </edit> | 733 </edit> |
720 </open> | 734 </open> |
721 <open src="includes/functions.php"> | 735 <open src="includes/functions.php"> |
722 <edit> | 736 <edit> |
730 <action type="after-add"><![CDATA[* @param int $rank_theme the rank theme set to load from (defaulting to DEFAULT_RANK_THEME_ID)]]></action> | 744 <action type="after-add"><![CDATA[* @param int $rank_theme the rank theme set to load from (defaulting to DEFAULT_RANK_THEME_ID)]]></action> |
731 </edit> | 745 </edit> |
732 <edit> | 746 <edit> |
733 <find><![CDATA[function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)]]></find> | 747 <find><![CDATA[function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)]]></find> |
734 <inline-edit> | 748 <inline-edit> |
735 <inline-find>, &$rank_img_src</inline-find> | 749 <inline-find>)</inline-find> |
736 <inline-action type="after-add">, $rank_theme = DEFAULT_RANK_THEME_ID</inline-action> | 750 <inline-action type="before-add">, $rank_theme = DEFAULT_RANK_THEME_ID</inline-action> |
737 </inline-edit> | 751 </inline-edit> |
738 </edit> | 752 </edit> |
739 <edit> | 753 <edit> |
740 <find><![CDATA[ if (!empty($ranks['normal']))]]></find> | 754 <find><![CDATA[ if (!empty($ranks['normal'])) |
755 { | |
756 foreach ($ranks['normal'] as $rank)]]></find> | |
741 <action type="replace-with"><![CDATA[ //Multi-rank theme: find our theme, defaulting to DEFAULT_RANK_THEME_ID if the user chose an invalid value | 757 <action type="replace-with"><![CDATA[ //Multi-rank theme: find our theme, defaulting to DEFAULT_RANK_THEME_ID if the user chose an invalid value |
742 if (!empty($ranks[$rank_theme])) | 758 if (!empty($ranks[$rank_theme])) |
743 { | 759 { |
744 $theme = $ranks[$rank_theme]; | 760 $theme = $ranks[$rank_theme]; |
745 } | 761 } |
747 { | 763 { |
748 //Assume DEFAULT_RANK_THEME_ID always exists | 764 //Assume DEFAULT_RANK_THEME_ID always exists |
749 $theme = $ranks[DEFAULT_RANK_THEME_ID]; | 765 $theme = $ranks[DEFAULT_RANK_THEME_ID]; |
750 } | 766 } |
751 | 767 |
752 if (!empty($theme))]]></action> | 768 if (!empty($theme)) |
753 </edit> | 769 { |
754 <edit> | 770 foreach ($theme as $rank)]]></action> |
755 <find><![CDATA[ foreach ($ranks['normal'] as $rank)]]></find> | 771 </edit> |
756 <action type="replace-with"><![CDATA[ foreach ($theme as $rank)]]></action> | 772 </open> |
773 <open src="includes/ucp/ucp_pm_viewmessage.php"> | |
774 <edit> | |
775 <find><![CDATA[ get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);]]></find> | |
776 <inline-edit> | |
777 <inline-find>);</inline-find> | |
778 <inline-action type="before-add"><![CDATA[, $user_row['user_rank_theme']]]></inline-action> | |
779 </inline-edit> | |
757 </edit> | 780 </edit> |
758 </open> | 781 </open> |
759 <open src="includes/ucp/ucp_profile.php"> | 782 <open src="includes/ucp/ucp_profile.php"> |
760 <edit> | 783 <edit> |
761 <find><![CDATA[ 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),]]></find> | 784 <find><![CDATA[ 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),]]></find> |
801 | 824 |
802 'FROM' => array( | 825 'FROM' => array( |
803 RANK_THEMES_TABLE => 'r' | 826 RANK_THEMES_TABLE => 'r' |
804 ), | 827 ), |
805 | 828 |
806 'WHERE' => 'rtheme_public = 1 AND rtheme_id > ' . DEFAULT_RANK_THEME_ID, | 829 'WHERE' => 'rtheme_public = ' . RANK_THEME_PUBLIC . ' AND rtheme_id <> ' . DEFAULT_RANK_THEME_ID, |
807 | 830 |
808 'ORDER_BY' => 'rtheme_title ASC', | 831 'ORDER_BY' => 'rtheme_title ASC', |
809 )); | 832 )); |
810 | 833 |
811 $result = $db->sql_query($sql); | 834 $result = $db->sql_query($sql); |
877 | 900 |
878 'FROM' => array( | 901 'FROM' => array( |
879 RANK_THEMES_TABLE => 'r' | 902 RANK_THEMES_TABLE => 'r' |
880 ), | 903 ), |
881 | 904 |
882 'WHERE' => 'rtheme_public = 1 AND rtheme_id > '.DEFAULT_RANK_THEME_ID, | 905 'WHERE' => 'rtheme_public = ' . RANK_THEME_PUBLIC . ' AND rtheme_id <> '.DEFAULT_RANK_THEME_ID, |
883 | 906 |
884 'ORDER_BY' => 'rtheme_title ASC', | 907 'ORDER_BY' => 'rtheme_title ASC', |
885 )); | 908 )); |
886 | 909 |
887 $result = $db->sql_query($sql); | 910 $result = $db->sql_query($sql); |
941 <open src="language/en/acp/posting.php"> | 964 <open src="language/en/acp/posting.php"> |
942 <edit> | 965 <edit> |
943 <find><![CDATA[ 'RANK_UPDATED' => 'The rank was successfully updated.',]]></find> | 966 <find><![CDATA[ 'RANK_UPDATED' => 'The rank was successfully updated.',]]></find> |
944 <action type="after-add"><![CDATA[ //Multi-rank theme: Rank theme specific language strings | 967 <action type="after-add"><![CDATA[ //Multi-rank theme: Rank theme specific language strings |
945 'ADD_RANK_THEME' => 'Add new rank theme', | 968 'ADD_RANK_THEME' => 'Add new rank theme', |
946 'ACP_RANK_THEMES_EXPLAIN' => 'Using this form you can add, edit, view and delete rank themes. Rank themes can be made private so that they are not selectable by users.', | 969 'ACP_RANK_THEMES_EXPLAIN' => 'Using this page you can add, edit, view and delete rank themes. Rank themes can be made private so that they are not selectable by users. Deleting a rank theme will delete all ranks within it.', |
947 'RANK_THEME_TITLE' => 'Rank theme title', | 970 'RANK_THEME_TITLE' => 'Rank theme title', |
948 'RANK_THEME_PUBLIC' => 'Set as public rank theme', | 971 'RANK_THEME_PUBLIC' => 'Set as public rank theme', |
949 'RANK_THEME' => 'Rank theme', | 972 'RANK_THEME' => 'Rank theme', |
950 'MUST_SELECT_RANK_THEME' => 'You must select a valid rank theme. Default and special themes cannot be deleted.', | 973 'MUST_SELECT_RANK_THEME' => 'You must select a valid rank theme. Default and special themes cannot be deleted.', |
951 'RANK_THEME_ADDED' => 'The rank theme was successfully added.', | 974 'RANK_THEME_ADDED' => 'The rank theme was successfully added.', |
954 'NO_RANKS_FOR_THEME' => 'No ranks for theme',]]></action> | 977 'NO_RANKS_FOR_THEME' => 'No ranks for theme',]]></action> |
955 </edit> | 978 </edit> |
956 </open> | 979 </open> |
957 <open src="language/en/common.php"> | 980 <open src="language/en/common.php"> |
958 <edit> | 981 <edit> |
959 <find><![CDATA[ 'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.',]]></find> | 982 <find><![CDATA[ 'datetime' => array(]]></find> |
960 <action type="after-add"><![CDATA[ | 983 <action type="before-add"><![CDATA[ |
961 //Multi-rank theme: Add in new rank naming | 984 //Multi-rank theme: Add in new rank naming |
962 'DEFAULT_RANK_THEME' => 'Default theme', | 985 'DEFAULT_RANK_THEME' => 'Default theme', |
963 'SPECIAL_RANK_THEME' => 'Special theme', | 986 'SPECIAL_RANK_THEME' => 'Special theme', |
964 //Multi-rank theme: Add header link text | 987 //Multi-rank theme: Add header link text |
965 'RANKS_EXPLAIN' => 'Available rank themes', | 988 'RANKS_EXPLAIN' => 'Available rank themes', |
973 <find><![CDATA[)); | 996 <find><![CDATA[)); |
974 | 997 |
975 ?>]]></find> | 998 ?>]]></find> |
976 <action type="before-add"><![CDATA[// Multi-rank theme: Rank theme list information | 999 <action type="before-add"><![CDATA[// Multi-rank theme: Rank theme list information |
977 'RANKTHEMES' => 'Rank Themes', | 1000 'RANKTHEMES' => 'Rank Themes', |
978 'RANKTHEME_TEXT' => 'Rank themes allow you to customise the name and image of the rank that is displayed beside your post. For a full list of the ranks within a scheme click on the scheme name. For more detail on ranks please see the <a href="faq.php#f15">FAQ</a>.', | 1001 'RANKTHEME_TEXT' => 'Rank themes allow you to customise the name and image of the rank that is displayed beside your post. For a full list of the ranks within a scheme click on the scheme name. For more detail on ranks please see the <a href="%1$s">FAQ</a>.', |
979 'RANK_NAME' => 'Rank', | 1002 'RANK_NAME' => 'Rank', |
980 'RANK_IMG' => 'Rank image', | 1003 'RANK_IMG' => 'Rank image', |
981 'RANK_POSTS' => 'Required post count', | 1004 'RANK_POSTS' => 'Required post count', |
982 'NO_RANKSET_ERROR' => 'The rank theme you selected was invalid. Please check the link and try again.' | 1005 'NO_RANKSET_ERROR' => 'The rank theme you selected was invalid. Please check the link and try again.' |
983 ]]></action> | 1006 ]]></action> |
1004 <edit> | 1027 <edit> |
1005 <find><![CDATA[ case 'email':]]></find> | 1028 <find><![CDATA[ case 'email':]]></find> |
1006 <action type="after-add"><![CDATA[ case 'ranks':]]></action> | 1029 <action type="after-add"><![CDATA[ case 'ranks':]]></action> |
1007 </edit> | 1030 </edit> |
1008 <edit> | 1031 <edit> |
1009 <find><![CDATA[ get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);]]></find> | 1032 <find><![CDATA[ get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);]]></find> |
1010 <inline-edit> | 1033 <inline-edit> |
1011 <inline-find>$rank_img_src</inline-find> | 1034 <inline-find>);</inline-find> |
1012 <inline-action type="after-add"><![CDATA[, $row['user_rank_theme']]]></inline-action> | 1035 <inline-action type="before-add"><![CDATA[, $row['user_rank_theme']]]></inline-action> |
1013 </inline-edit> | 1036 </inline-edit> |
1014 </edit> | 1037 </edit> |
1015 <edit> | 1038 <edit> |
1016 <find><![CDATA[ case 'group': | 1039 <find><![CDATA[ case 'group': |
1017 default: | 1040 default: |
1024 if ($rank_theme == 0) | 1047 if ($rank_theme == 0) |
1025 { | 1048 { |
1026 // Get list of rank themes | 1049 // Get list of rank themes |
1027 $sql = 'SELECT rtheme_id, rtheme_title | 1050 $sql = 'SELECT rtheme_id, rtheme_title |
1028 FROM ' . RANK_THEMES_TABLE . ' | 1051 FROM ' . RANK_THEMES_TABLE . ' |
1029 WHERE rtheme_public = 1 | 1052 WHERE rtheme_public = ' . RANK_THEME_PUBLIC . ' |
1030 AND rtheme_id > ' . DEFAULT_RANK_THEME_ID . ' | 1053 AND rtheme_id <> ' . DEFAULT_RANK_THEME_ID . ' |
1031 ORDER BY rtheme_title ASC'; | 1054 ORDER BY rtheme_title ASC'; |
1032 $result = $db->sql_query($sql); | 1055 $result = $db->sql_query($sql); |
1056 | |
1057 $template->assign_vars(array( | |
1058 'L_RANKSET_TEXT' => sprintf($user->lang['RANKSET_TEXT'], append_sid("{$phpbb_root_path}faq.{$phpExt}#f15")) | |
1059 )); | |
1033 | 1060 |
1034 $template->assign_block_vars('rankset', array( | 1061 $template->assign_block_vars('rankset', array( |
1035 'RANKSET_URL' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=ranks&r=' . DEFAULT_RANK_THEME_ID), | 1062 'RANKSET_URL' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=ranks&r=' . DEFAULT_RANK_THEME_ID), |
1036 'RANKSET_NAME' => $user->lang['DEFAULT_RANK_THEME'] | 1063 'RANKSET_NAME' => $user->lang['DEFAULT_RANK_THEME'] |
1037 )); | 1064 )); |
1048 } | 1075 } |
1049 else | 1076 else |
1050 { | 1077 { |
1051 $sql = 'SELECT rtheme_title | 1078 $sql = 'SELECT rtheme_title |
1052 FROM ' . RANK_THEMES_TABLE . ' | 1079 FROM ' . RANK_THEMES_TABLE . ' |
1053 WHERE rtheme_public = 1 | 1080 WHERE rtheme_public = ' . RANK_THEME_PUBLIC . ' |
1054 AND rtheme_id = ' . $rank_theme; | 1081 AND rtheme_id = ' . $rank_theme; |
1055 $result = $db->sql_query($sql); | 1082 $result = $db->sql_query($sql); |
1056 $row = $db->sql_fetchrow($result); | 1083 $row = $db->sql_fetchrow($result); |
1057 $db->sql_freeresult($result); | 1084 $db->sql_freeresult($result); |
1058 | 1085 |
1088 } | 1115 } |
1089 | 1116 |
1090 break;]]></action> | 1117 break;]]></action> |
1091 </edit> | 1118 </edit> |
1092 <edit> | 1119 <edit> |
1093 <find><![CDATA[ get_user_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src);]]></find> | 1120 <find><![CDATA[ get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);]]></find> |
1094 <inline-edit> | 1121 <inline-edit> |
1095 <inline-find>$rank_img_src</inline-find> | 1122 <inline-find>);</inline-find> |
1096 <inline-action type="after-add"><![CDATA[, $data['user_rank_theme']]]></inline-action> | 1123 <inline-action type="before-add"><![CDATA[, $data['user_rank_theme']]]></inline-action> |
1097 </inline-edit> | 1124 </inline-edit> |
1098 </edit> | 1125 </edit> |
1099 </open> | 1126 </open> |
1100 <open src="styles/prosilver/template/overall_header.html"> | 1127 <open src="styles/prosilver/template/overall_header.html"> |
1101 <edit> | 1128 <edit> |
1155 </open> | 1182 </open> |
1156 <open src="viewtopic.php"> | 1183 <open src="viewtopic.php"> |
1157 <edit> | 1184 <edit> |
1158 <find><![CDATA[ get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);]]></find> | 1185 <find><![CDATA[ get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);]]></find> |
1159 <inline-edit> | 1186 <inline-edit> |
1160 <inline-find>$user_cache[$poster_id]['rank_image_src']</inline-find> | 1187 <inline-find>);</inline-find> |
1161 <inline-action type="after-add"><![CDATA[, $row['user_rank_theme']]]></inline-action> | 1188 <inline-action type="before-add"><![CDATA[, $row['user_rank_theme']]]></inline-action> |
1162 </inline-edit> | 1189 </inline-edit> |
1163 </edit> | 1190 </edit> |
1164 </open> | 1191 </open> |
1165 <diy-instructions lang="en">Ensure that you have run the SQL queries at the start of the MOD. These can be run from a command-line session or through an application such as phpMyAdmin. | 1192 <diy-instructions lang="en">Ensure that you have run the SQL queries at the start of the MOD. These can be run from a command-line session or through an application such as phpMyAdmin. |
1166 | 1193 |