Changeset 2787766
- Timestamp:
- 09/20/2022 05:25:49 PM (4 years ago)
- Location:
- dynamic-user-directory/trunk
- Files:
-
- 6 edited
-
dynamic-user-directory.php (modified) (1 diff)
-
includes/admin.php (modified) (5 diffs)
-
includes/core.php (modified) (21 diffs)
-
includes/member_plugins_compatibility.php (modified) (14 diffs)
-
js/jquery.user-directory.js (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dynamic-user-directory/trunk/dynamic-user-directory.php
r2704621 r2787766 3 3 * Plugin URI: http://sgcustomwebsolutions.com 4 4 * Description: Creates an alphabetically sorted user directory that will format and display specified user meta data such as name, address, and email. 5 * Version: 1.6. 65 * Version: 1.6.7 6 6 * Author: Sarah Giles 7 7 * Author URI: http://sgcustomwebsolutions.com -
dynamic-user-directory/trunk/includes/admin.php
r2704621 r2787766 245 245 'ud_instagram' => '', 246 246 'ud_pinterest' => '', 247 'ud_youtube' => '', 248 'ud_tiktok' => '', 249 'ud_podcast' => '', 247 250 'ud_social' => '1', 248 251 'ud_icon_style' => '1', … … 1851 1854 <td><select class="dd-menu-no-chk-box-width" name="<?php echo $dud_option_name;?>[ud_email_format]"> 1852 1855 <OPTION value="hyperlink" <?php echo (!empty($dud_options['ud_email_format']) && $dud_options['ud_email_format'] == "hyperlink") ? "SELECTED" : ""; ?>>Hyperlink in new tab</OPTION> 1853 <OPTION value="text" <?php echo (!empty($dud_options['ud_email_format']) && $dud_options['ud_email_format'] == "text") ? "SELECTED" : ""; ?>>Plain Text </OPTION>1856 <OPTION value="text" <?php echo (!empty($dud_options['ud_email_format']) && $dud_options['ud_email_format'] == "text") ? "SELECTED" : ""; ?>>Plain Text (Anti Spam)</OPTION> 1854 1857 </select> 1855 1858 </td> … … 1932 1935 <select name="<?php echo $dud_option_name;?>[dud_fld_format_<?php echo $inc; ?>]" id="dud_hyperlink_flds"> 1933 1936 <OPTION value="1" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "1") ? "SELECTED" : ""; ?>>Plain Text</OPTION> 1934 <OPTION value="34" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "34") ? "SELECTED" : ""; ?>>Image (Should be a URL)</OPTION> 1937 <OPTION value="30" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "30") ? "SELECTED" : ""; ?>>Hide Hyphens</OPTION> 1938 <OPTION value="37" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "37") ? "SELECTED" : ""; ?>>Hide Hyphens (All Caps)</OPTION> 1939 <OPTION value="38" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "38") ? "SELECTED" : ""; ?>>Hide Hyphens (All Lowercase)</OPTION> 1940 <OPTION value="34" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "34") ? "SELECTED" : ""; ?>>Image (Field should be a URL)</OPTION> 1935 1941 <OPTION value="6" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "6") ? "SELECTED" : ""; ?>>Phone Number</OPTION> 1936 <OPTION value="31" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "31") ? "SELECTED" : ""; ?>>Phone Number (Australian)</OPTION> 1942 <OPTION value="31" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "31") ? "SELECTED" : ""; ?>>Phone Number (Australian)</OPTION> 1937 1943 <OPTION value="32" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "32") ? "SELECTED" : ""; ?>>Mobile Phone Hyperlink</OPTION> 1938 1944 <OPTION value="33" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "33") ? "SELECTED" : ""; ?>>Mobile Phone Hyperlink (Australian)</OPTION> 1939 <OPTION value="25" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "25") ? "SELECTED" : ""; ?>>Email Address Hyperlink</OPTION> 1945 <OPTION value="25" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "25") ? "SELECTED" : ""; ?>>Email Address (Hyperlink)</OPTION> 1946 <OPTION value="55" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "55") ? "SELECTED" : ""; ?>>Email Address (Plain Text, Anti-Spam)</OPTION> 1940 1947 <OPTION value="24" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "24") ? "SELECTED" : ""; ?>>Multi-line Text Box</OPTION> 1941 <OPTION value="30" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "30") ? "SELECTED" : ""; ?>>Hide MemberPress Hyphens</OPTION>1942 1948 <OPTION value="2" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "2") ? "SELECTED" : ""; ?>>Hyperlink => Open in Same Window</OPTION> 1943 1949 <OPTION value="3" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "3") ? "SELECTED" : ""; ?>>Hyperlink => Open in New Tab</OPTION> 1944 <OPTION value="5" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "5") ? "SELECTED" : ""; ?>>Multiple Values => Bulleted</OPTION> 1945 <OPTION value="4" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "4") ? "SELECTED" : ""; ?>>Multiple Values => Comma Delimited</OPTION> 1946 <OPTION value="35" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "35") ? "SELECTED" : ""; ?>>Multiple Values => Bulleted (Hide MP hyphens)</OPTION> 1947 <OPTION value="36" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "36") ? "SELECTED" : ""; ?>>Multiple Values => Comma Delimited (Hide MP hyphens)</OPTION> 1948 <OPTION value="11" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "11") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Bulleted (Show Label Only)</OPTION> 1949 <OPTION value="8" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "8") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Comma Delimited (Show Label Only)</OPTION> 1950 <OPTION value="49" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "49") ? "SELECTED" : ""; ?>>Multiselect => Show Values and Labels (Keep Hyphens)</OPTION> 1951 <OPTION value="51" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "51") ? "SELECTED" : ""; ?>>Multiselect => Show Values (Keep Hyphens)</OPTION> 1952 <OPTION value="35" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "35") ? "SELECTED" : ""; ?>>Multiselect => Show Labels (Bulleted)</OPTION> 1953 <OPTION value="5" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "5") ? "SELECTED" : ""; ?>>Multiselect => Show Values (Bulleted)</OPTION> 1954 <OPTION value="39" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "39") ? "SELECTED" : ""; ?>>Multiselect => Show Values (All Caps and Bulleted)</OPTION> 1955 <OPTION value="40" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "40") ? "SELECTED" : ""; ?>>Multiselect => Show Values (All Lowercase and Bulleted)</OPTION> 1956 <OPTION value="36" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "36") ? "SELECTED" : ""; ?>>Multiselect => Show Labels (Comma Delimited)</OPTION> 1957 <OPTION value="4" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "4") ? "SELECTED" : ""; ?>>Multiselect => Show Values (Comma Delimited)</OPTION> 1958 <OPTION value="41" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "41") ? "SELECTED" : ""; ?>>Multiselect => Show Values (All Caps and Comma Delimited)</OPTION> 1959 <OPTION value="42" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "42") ? "SELECTED" : ""; ?>>Multiselect => Show Values (All Lowercase and Comma Delimited)</OPTION> 1960 <OPTION value="50" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "50") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values and Labels (Keep Hyphens)</OPTION> 1961 <OPTION value="52" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "52") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (Keep Hyphens)</OPTION> 1962 <OPTION value="11" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "11") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Labels (Bulleted)</OPTION> 1963 <OPTION value="45" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "45") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (Bulleted)</OPTION> 1964 <OPTION value="43" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "43") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (All Caps and Bulleted)</OPTION> 1965 <OPTION value="47" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "47") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (All Lowercase and Bulleted)</OPTION> 1966 <OPTION value="8" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "8") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Labels (Comma Delimited)</OPTION> 1967 <OPTION value="46" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "46") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (Comma Delimited)</OPTION> 1968 <OPTION value="44" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "44") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (All Caps and Comma Delimited)</OPTION> 1969 <OPTION value="48" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "48") ? "SELECTED" : ""; ?>>Multiple Checkboxes => Show Values (All Lowercase and Comma Delimited)</OPTION> 1950 1970 <OPTION value="13" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "13") ? "SELECTED" : ""; ?>>Single Checkbox => Show Label and Value</OPTION> 1951 <OPTION value="14" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "14") ? "SELECTED" : ""; ?>>Single Checkbox => Show Label Only</OPTION> 1952 <OPTION value="15" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "15") ? "SELECTED" : ""; ?>>Single Checkbox => Show Value Only</OPTION> 1971 <OPTION value="14" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "14") ? "SELECTED" : ""; ?>>Single Checkbox => Show Label</OPTION> 1972 <OPTION value="15" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "15") ? "SELECTED" : ""; ?>>Single Checkbox => Show Value</OPTION> 1973 <OPTION value="53" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "53") ? "SELECTED" : ""; ?>>Single Checkbox => Show Value (All Caps)</OPTION> 1974 <OPTION value="54" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "54") ? "SELECTED" : ""; ?>>Single Checkbox => Show Value (All Lowercase)</OPTION> 1975 <OPTION value="56" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "56") ? "SELECTED" : ""; ?>>Birthdate => Show Current Age</OPTION> 1953 1976 <OPTION value="16" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "16") ? "SELECTED" : ""; ?>>Date => dd.mm.yyyy hh:mm:ss</OPTION> 1954 1977 <OPTION value="17" <?php echo (!empty($dud_options['dud_fld_format_' . $inc]) && $dud_options['dud_fld_format_' . $inc] == "17") ? "SELECTED" : ""; ?>>Date => dd.mm.yy hh:mm:ss</OPTION> … … 2083 2106 </tr> 2084 2107 2108 <tr id="youtube"> 2109 <td><b>YouTube Meta Key Name</b></td> 2110 <td><input type="text" id="ud_youtube" name="<?php echo $dud_option_name;?>[ud_youtube]" 2111 value="<?php echo !empty($dud_options['ud_youtube']) ? esc_attr( $dud_options['ud_youtube'] ) : ""; ?>" maxlength="50"/></td> 2112 <td></td> 2113 <td></td> 2114 </tr> 2115 2116 <tr id="tiktok"> 2117 <td><b>Tiktok Meta Key Name</b></td> 2118 <td><input type="text" id="ud_tiktok" name="<?php echo $dud_option_name;?>[ud_tiktok]" 2119 value="<?php echo !empty($dud_options['ud_tiktok']) ? esc_attr( $dud_options['ud_tiktok'] ) : ""; ?>" maxlength="50"/></td> 2120 <td></td> 2121 <td></td> 2122 </tr> 2123 2124 <tr id="podcast"> 2125 <td><b>Podcast Meta Key Name</b></td> 2126 <td><input type="text" id="ud_podcast" name="<?php echo $dud_option_name;?>[ud_podcast]" 2127 value="<?php echo !empty($dud_options['ud_podcast']) ? esc_attr( $dud_options['ud_podcast'] ) : ""; ?>" maxlength="50"/></td> 2128 <td></td> 2129 <td></td> 2130 </tr> 2131 2085 2132 <tr id="icon_size"> 2086 2133 <td><b>Icon Size</b></td> … … 2106 2153 <input type="radio" name="<?php echo $dud_option_name;?>[ud_icon_style]" 2107 2154 value="1" <?php checked( '1', $dud_options['ud_icon_style'] ); ?> /> 2108 <i style="font-size:25px;" class='fab fa-facebook-square'></i> 2109 <i style="font-size:25px;" class='fab fa-twitter-square'></i> 2110 <i style="font-size:25px;" class="fab fa-linkedin"></i> 2111 <i style="font-size:25px;" class="fab fa-google-plus-square"></i> 2112 <i style="font-size:25px;" class="fab fa-pinterest-square"></i> 2113 <i style="font-size:25px;" class="fab fa-instagram"></i> <BR><BR> 2155 <i style="font-size:22px;" class='fab fa-facebook-square'></i> 2156 <i style="font-size:22px;" class='fab fa-twitter-square'></i> 2157 <i style="font-size:22px;" class="fab fa-linkedin"></i> 2158 <i style="font-size:22px;" class="fab fa-google-plus-square"></i> 2159 <BR><BR> 2160 <i style="font-size:22px;" class="fab fa-pinterest-square"></i> 2161 <i style="font-size:22px;" class="fab fa-instagram-square"></i> 2162 <i style="font-size:22px;" class="fab fa-youtube-square"></i> 2163 <i style="font-size:22px;" class="fab fa-tiktok"></i> 2164 <i style="font-size:22px;" class="fas fa-podcast"></i> 2165 <BR><BR><BR> 2114 2166 <input type="radio" name="<?php echo $dud_option_name;?>[ud_icon_style]" 2115 2167 value="2" <?php checked( '2', $dud_options['ud_icon_style'] ); ?> /> 2116 <i style="font-size:25px;" class="fab fa-facebook-f"></i> 2117 <i style="font-size:25px;" class="fab fa-twitter"></i> 2118 <i style="font-size:25px;" class="fab fa-linkedin-in"></i> 2119 <i style="font-size:25px;" class="fab fa-google-plus-g"></i> 2120 <i style="font-size:25px;" class="fab fa-pinterest-p"></i> 2121 <i style="font-size:25px;" class="fab fa-instagram"></i> 2168 <i style="font-size:22px;" class="fab fa-facebook-f"></i> 2169 <i style="font-size:22px;" class="fab fa-twitter"></i> 2170 <i style="font-size:22px;" class="fab fa-linkedin-in"></i> 2171 <i style="font-size:22px;" class="fab fa-google-plus-g"></i> 2172 <BR><BR> 2173 <i style="font-size:22px;" class="fab fa-pinterest-p"></i> 2174 <i style="font-size:22px;" class="fab fa-instagram"></i> 2175 <i style="font-size:22px;" class="fab fa-youtube-square"></i> 2176 <i style="font-size:22px;" class="fab fa-tiktok"></i> 2177 <i style="font-size:22px;" class="fas fa-podcast"></i> 2178 2122 2179 </td> 2123 2180 <td></td> -
dynamic-user-directory/trunk/includes/core.php
r2703353 r2787766 191 191 if(is_null($dud_user_srch_name) || $dud_user_srch_name === "") 192 192 $dud_user_srch_name = ''; 193 194 // Flag Field that will clear the URL params (originally done for ashland.oregon.localsguide.com)195 if($dud_user_srch_key === 'DudShowAllResults' || $dud_user_srch_name === 'DudShowAllResults')196 {197 $dud_user_srch_key = '';198 $dud_user_srch_name = '';199 }200 193 201 194 /*** Meta Fields Search Add-On: if a search value was entered & the results should be shown on single page ***/ … … 654 647 $ud_instagram_op = !empty($dud_options['ud_instagram']) ? $dud_options['ud_instagram'] : ""; 655 648 $ud_pinterest_op = !empty($dud_options['ud_pinterest']) ? $dud_options['ud_pinterest'] : ""; 649 $ud_youtube_op = !empty($dud_options['ud_youtube']) ? $dud_options['ud_youtube'] : ""; 650 $ud_tiktok_op = !empty($dud_options['ud_tiktok']) ? $dud_options['ud_tiktok'] : ""; 651 $ud_podcast_op = !empty($dud_options['ud_podcast']) ? $dud_options['ud_podcast'] : ""; 656 652 657 653 $user_directory_meta_flds = array(); … … 737 733 else if(strtoupper($ud_pinterest_op) === strtoupper($key)) $load_S2M = true; 738 734 else if(strtoupper($ud_instagram_op) === strtoupper($key)) $load_S2M = true; 735 else if(strtoupper($ud_youtube_op) === strtoupper($key)) $load_S2M = true; 736 else if(strtoupper($ud_tiktok_op) === strtoupper($key)) $load_S2M = true; 737 else if(strtoupper($ud_podcast_op) === strtoupper($key)) $load_S2M = true; 739 738 } 740 739 } … … 1028 1027 { 1029 1028 if($dud_user_srch_name) 1030 { 1031 if ( !(strpos(strtoupper ($user_last_name), strtoupper ($dud_user_srch_name)) === 0))1029 { 1030 if ((strpos(strtoupper ($user_last_name), strtoupper ($dud_user_srch_name)) === false)) 1032 1031 { 1033 1032 continue; … … 1053 1052 if($ud_pinterest_op) $social_flds[4] = get_user_meta($user_id, $ud_pinterest_op, true); 1054 1053 if($ud_instagram_op) $social_flds[5] = get_user_meta($user_id, $ud_instagram_op, true); 1055 1054 if($ud_youtube_op) $social_flds[6] = get_user_meta($user_id, $ud_youtube_op, true); 1055 if($ud_tiktok_op) $social_flds[7] = get_user_meta($user_id, $ud_tiktok_op, true); 1056 if($ud_podcast_op) $social_flds[8] = get_user_meta($user_id, $ud_podcast_op, true); 1057 1056 1058 for($inc=0; $inc < sizeof($user_directory_meta_flds_tmp); $inc++) 1057 1059 { … … 1063 1065 $user_meta_fld = !empty($user_meta_fld[0]) ? $user_meta_fld[0] : null; //it will always be an array even for single values 1064 1066 $fld_format = !empty($user_directory_meta_flds_tmp[$inc]['format']) ? $user_directory_meta_flds_tmp[$inc]['format'] : null; 1067 $fld_label = !empty($user_directory_meta_flds_tmp[$inc]['label']) ? $user_directory_meta_flds_tmp[$inc]['label'] : null; 1065 1068 1066 $user_directory_meta_flds_tmp[$inc]['value'] = dynamic_ud_format_meta_val($user_meta_fld, $dud_options, $fld_format );1069 $user_directory_meta_flds_tmp[$inc]['value'] = dynamic_ud_format_meta_val($user_meta_fld, $dud_options, $fld_format, $fld_label); 1067 1070 } 1068 1071 } … … 1411 1414 else 1412 1415 { 1416 try 1417 { 1418 $a = $user_email; 1419 $b = "<!-- zke@unp -->"; 1420 1421 //get a random position in a 1422 $randPos = rand(0,strlen($a)); 1423 //insert $b in $a 1424 $user_email = substr($a, 0, $randPos).$b.substr($a, $randPos); 1425 } 1426 catch(Exception $e) 1427 {;} 1428 1413 1429 $user_contact_info .= "\t\t\t<div style='pointer-events:all;' class='dud_field_email'>$ud_email_lbl " . apply_filters('dud_set_user_email_display', $user_email, $user_id) . "</div>\n"; 1414 1430 } … … 1452 1468 $social_icons = ""; 1453 1469 1454 if(!empty($social_flds[0]) || !empty($social_flds[1]) || !empty($social_flds[2]) || !empty($social_flds[3]) || !empty($social_flds[4]) || !empty($social_flds[5]) )1470 if(!empty($social_flds[0]) || !empty($social_flds[1]) || !empty($social_flds[2]) || !empty($social_flds[3]) || !empty($social_flds[4]) || !empty($social_flds[5]) || !empty($social_flds[6]) || !empty($social_flds[7]) || !empty($social_flds[8])) 1455 1471 { 1456 1472 $social_flds = format_social_links($social_flds); 1457 1473 1458 $social_icons .= "\t\t\t<div style='pointer-events:all; ' class='dud_field_social' style='font-size:" . $ud_icon_size . "px !important;'>";1474 $social_icons .= "\t\t\t<div style='pointer-events:all;padding-top:4px;' class='dud_field_social' style='font-size:" . $ud_icon_size . "px !important;'>"; 1459 1475 1460 1476 if(!empty($social_flds[0])) … … 1485 1501 if(!empty($social_flds[5])) 1486 1502 { 1487 if($ud_icon_style === "1") $social_icons .= "<a href= '" . $social_flds[5] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-instagram ' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> ";1503 if($ud_icon_style === "1") $social_icons .= "<a href= '" . $social_flds[5] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-instagram-square' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1488 1504 else $social_icons .= "<a href= '" . $social_flds[5] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-instagram' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1505 } 1506 if(!empty($social_flds[6])) 1507 { 1508 if($ud_icon_style === "1") $social_icons .= "<a href= '" . $social_flds[6] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-youtube-square' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1509 else $social_icons .= "<a href= '" . $social_flds[6] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-youtube-square' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1510 } 1511 if(!empty($social_flds[7])) 1512 { 1513 if($ud_icon_style === "1") $social_icons .= "<a href= '" . $social_flds[7] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-tiktok' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1514 else $social_icons .= "<a href= '" . $social_flds[7] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fab fa-tiktok' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1515 } 1516 if(!empty($social_flds[8])) 1517 { 1518 if($ud_icon_style === "1") $social_icons .= "<a href= '" . $social_flds[8] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fas fa-podcast' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1519 else $social_icons .= "<a href= '" . $social_flds[8] . "' target='_blank' style='color:" . $ud_icon_color . ";'><i class='fas fa-podcast' style='color:" . $ud_icon_color . "!important;font-size:" . $ud_icon_size . "px !important;' aria-hidden='true'></i></a> "; 1489 1520 } 1490 1521 … … 1492 1523 1493 1524 $user_contact_info .= "</div>"; 1525 } 1526 else 1527 { 1528 1529 $icons_tmp = apply_filters('dud_modify_social_fld_icons', $social_icons, $ud_icon_style, $ud_icon_color, $ud_icon_size, $user_id, $loaded_options); 1530 1531 if(!empty($icons_tmp)) 1532 { 1533 $user_contact_info .= "\t\t\t<div style='pointer-events:all;' class='dud_field_social' style='font-size:" . $ud_icon_size . "px !important;'>" . $icons_tmp . "</div>"; 1534 } 1494 1535 } 1495 1536 } … … 1848 1889 } 1849 1890 1850 function dynamic_ud_format_meta_val($user_meta_fld, $dud_options, $format) 1851 { 1852 /*********************************************** 1853 * Field Format Options: 1854 * 1855 * 1 = Plain Text 1856 * 2 = Hyperlink => Open in Same Window 1857 * 3 = Hyperlink => Open in New Tab 1858 * 4 = Multiple Value List => Comma Delimited 1859 * 5 = Multiple Value List => Bulleted 1860 * 6 = Phone Number 1861 * 7 = Multiple Checkboxes => Comma Delimited => Label:Value 1862 * 8 = Multiple Checkboxes => Comma Delimited => Label Only 1863 * 9 = Multiple Checkboxes => Comma Delimited => Value Only 1864 * 10 = Multiple Checkboxes => Bulleted => Label:Value 1865 * 11 = Multiple Checkboxes => Bulleted => Label Only 1866 * 12 = Multiple Checkboxes => Bulleted => Value Only 1867 * 13 = Single Checkbox => Label:Value 1868 * 14 = Single Checkbox => Label Only 1869 * 15 = Single Checkbox => Value Only 1870 * 16-23 = Date Formatting 1871 * 24 = Multi-line Text Box 1872 * 30 = Hide MemberPress Hyphens 1873 * 31 = Phone Number (Australian Format) 1874 * 32 = Mobile Phone Link 1875 * 33 = Mobile Phone Link (Australian Format) 1876 * 34 = Image 1877 * 35 = Multiple Value List => Bulleted (Hide MP Hyphens) 1878 * 36 = Multiple Value List => Comma Delimited (Hide MP Hyphens) 1879 **********************************************/ 1880 1891 function dynamic_ud_format_meta_val($user_meta_fld, $dud_options, $format, $label = null) 1892 { 1881 1893 $parsed_val = ""; 1882 1894 $numeric_idx = false; … … 1884 1896 $ud_display_listings = !empty($dud_options['ud_display_listings']) ? $dud_options['ud_display_listings'] : ""; 1885 1897 $inc = 1; 1886 1887 //*** NON-ARRAY FORMATTING **************************************************************************/ 1888 1889 //Image 1898 1899 //*** Image *********************************************** 1890 1900 if(!is_array($user_meta_fld) && $format === "34") 1891 1901 { … … 1894 1904 return "<img class='dud_img' src='" . $user_meta_fld . "'>"; 1895 1905 } 1896 // Phone1906 //*** Phone ************************************************ 1897 1907 if(!is_array($user_meta_fld) && (($format === "6") || ($format === "31") || ($format === "32") || ($format === "33"))) 1898 1908 { … … 1908 1918 $phone = formatMobileAusPhoneNumber($user_meta_fld); 1909 1919 1910 //echo "In the right if, phone is " . $phone . "<BR>";1911 1920 if(!empty($phone)) 1912 1921 return "<a href='tel:" . $phone . "'>" . $phone . "</a>"; 1913 1922 } 1914 1923 } 1915 // Date1924 //*** Date ************************************************* 1916 1925 else if(!is_array($user_meta_fld) && ($format === "16" || $format === "17" || $format === "18" || $format === "19" 1917 1926 || $format === "20" || $format === "21" || $format === "22" || $format === "23")) … … 1929 1938 } 1930 1939 } 1931 //Multi-line Text 1940 else if($format === "56") 1941 { 1942 try 1943 { 1944 $birthday = new DateTime($user_meta_fld); 1945 $interval = $birthday->diff(new DateTime); 1946 return $interval->y; 1947 } 1948 catch(Exception $e) 1949 { 1950 return $user_meta_fld; 1951 } 1952 } 1953 //*** Email Address Plain Text Anti-Spam ************************* 1954 else if($format === "55") 1955 { 1956 try 1957 { 1958 $a = $user_meta_fld; 1959 $b = "<!-- zke@unp -->"; 1960 1961 //get a random position in a 1962 $randPos = rand(0,strlen($a)); 1963 //insert $b in $a 1964 return substr($a, 0, $randPos).$b.substr($a, $randPos); 1965 } 1966 catch(Exception $e) 1967 { 1968 return $user_meta_fld; 1969 } 1970 } 1971 //*** Multi-line Text ********************************************* 1932 1972 else if(!is_array($user_meta_fld) && $format === "24") 1933 1973 { 1934 1974 return str_replace ( "\n", "<BR>", $user_meta_fld); 1935 1975 } 1936 // MemberPress Hyphens1937 else if(!is_array($user_meta_fld) && $format === "30")1976 //*** Hide Hyphens ************************************************* 1977 else if(!is_array($user_meta_fld) && ($format === "30" || $format === "37" || $format === "38")) 1938 1978 { 1939 1979 $user_meta_fld = str_replace ( "-", " ", $user_meta_fld); 1940 return(ucwords($user_meta_fld)); 1941 } 1942 1943 //*** ARRAY META FLD LOADED AS A STRING *************************************************************/ 1944 1945 else if(!is_array($user_meta_fld) && ($format === "4" || $format === "7" || $format === "8" || $format === "9")) 1946 { 1947 if(strlen($user_meta_fld) > 2 && substr($user_meta_fld, 0, 2) === "a:") 1948 return implode(", ",(unserialize(stripslashes($user_meta_fld)))); 1949 } 1950 else if(!is_array($user_meta_fld) && ($format === "1" || $format === "5" || $format === "10" || $format === "11" 1951 || $format === "12" || $format === "13" || $format === "14" || $format === "15" || $format === "35" )) 1980 1981 if($format === "30") //first letter in caps 1982 return ucwords($user_meta_fld); 1983 else if ($format === "37") //all caps 1984 return strtoupper($user_meta_fld); 1985 else if ($format === "38") //all lower case 1986 return strtolower($user_meta_fld); 1987 } 1988 1989 //*** Multiselect Boxes & Checkboxes ******************************* 1990 else if(!is_array($user_meta_fld)) 1952 1991 { 1953 1992 $non_array_numeric_idx = false; … … 1957 1996 $list_items = unserialize(stripslashes($user_meta_fld)); 1958 1997 1959 //if(empty($list_items)) return $user_meta_fld;1960 1998 if(empty($list_items)) return ""; 1961 1999 2000 $inc = 1; 2001 1962 2002 foreach($list_items as $key => $value) 1963 2003 { 1964 if($format === "35") 2004 //Hide Hyphens & Capitalization 2005 if($format === "5" || $format === "39" || $format === "40" 2006 || $format === "4" || $format === "41" || $format === "42" 2007 || $format === "45" || $format === "43" | $format === "44" 2008 || $format === "47" || $format === "13" || $format === "15" 2009 || $format === "48" || $format === "49" || $format === "50" 2010 || $format === "53" || $format === "54") 1965 2011 { 1966 2012 $value = str_replace ( "-", " ", $value); 1967 $value = ucwords($value); 2013 2014 if($format === "39" || $format === "41" || $format === "43" || $format === "44" || $format === "53") 2015 $value = strtoupper($value); 2016 else if($format === "40" || $format === "42" || $format === "47" || $format === "48" || $format === "54") 2017 $value = strtolower($value); 2018 else 2019 $value = ucwords($value); 1968 2020 } 1969 2021 1970 2022 if (is_string($key)) 1971 { 1972 if($ud_display_listings !== "horizontally" || $inc > 1) 2023 { 2024 //Comma delimited options 2025 if($format === "4" || $format === "36" || $format === "41" || $format === "42" || 2026 $format === "8" || $format === "46" || $format === "44" || $format === "48") 2027 { 2028 if($inc > 1) 2029 $parsed_val .= ", "; 2030 } 2031 else if($inc > 1) 2032 $parsed_val .= "<BR>"; 2033 else if($ud_display_listings !== "horizontally" && !empty($label) && 2034 $format !== "13" && $format !== "14" && $format !== "15" && $format !== "53" && $format !== "54" && $inc == 1) 1973 2035 $parsed_val .= "<BR>"; 1974 2036 1975 if($format === "5" || $format === "35") 2037 if($format === "5" || $format === "39" || $format === "40" || $format === "43" || $format === "45") 2038 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $value; 2039 else if($format === "11" || $format === "35") 2040 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key; 2041 else if($format === "49") 1976 2042 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key . ": " . $value; 1977 else if($format === "10") 1978 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key . ": " . $value; 1979 else if($format === "11") 1980 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key; 1981 else if($format === "12") 1982 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $value; 1983 else if($format === "13") 2043 else if($format === "13" || $format === "44" || $format === "49" || $format === "50") 1984 2044 $parsed_val .= $key . ": " . $value; 1985 else if($format === "14" )1986 $parsed_val .= $key ;1987 else if($format === "15")2045 else if($format === "14" || $format === "8" || $format === "36" ) 2046 $parsed_val .= $key; 2047 else 1988 2048 $parsed_val .= $value; 1989 else1990 $parsed_val .= $key . ": " . $value;1991 2049 } 1992 2050 else … … 2003 2061 foreach($list_items as $listitem) 2004 2062 { 2005 if($format === "35") 2063 //Hide Hyphens & Capitalization 2064 if($format === "5" || $format === "39" || $format === "40" 2065 || $format === "4" || $format === "41" || $format === "42" 2066 || $format === "45" || $format === "43" | $format === "44" 2067 || $format === "47" || $format === "13" || $format === "15" 2068 || $format === "48" || $format === "50" 2069 || $format === "35" || $format === "36" || $format === "11" || $format === "8" 2070 || $format === "53" || $format === "54") 2006 2071 { 2007 2072 $listitem = str_replace ( "-", " ", $listitem); 2008 $listitem = ucwords($listitem); 2073 2074 if($format === "39" || $format === "41" || $format === "43" || $format === "44" || $format === "53") 2075 $listitem = strtoupper($listitem); 2076 else if($format === "40" || $format === "42" || $format === "47" || $format === "48" || $format === "54") 2077 $listitem = strtolower($listitem); 2078 else 2079 $listitem = ucwords($listitem); 2009 2080 } 2010 2081 2011 if($ud_display_listings !== "horizontally" || $inc > 1) 2082 //Comma delimited options 2083 if($format === "4" || $format === "36" || $format === "41" || $format === "42" || 2084 $format === "8" || $format === "46" || $format === "44" || $format === "48") 2085 { 2086 if($inc > 1) 2087 $parsed_val .= ", "; 2088 } 2089 else if($inc > 1) 2090 $parsed_val .= "<BR>"; 2091 else if($ud_display_listings !== "horizontally" && !empty($label) && 2092 $format !== "13" && $format !== "14" && $format !== "15" && $format !== "53" && $format !== "54" && $inc == 1) 2012 2093 $parsed_val .= "<BR>"; 2013 2094 2014 if($format === "5" || $format === "35" || $format === "10" || $format === "11" || $format === "12" ) 2095 if($format === "5" || $format === "35" || $format === "39" || $format === "40" || $format === "11" 2096 || $format === "43" || $format === "45" || $format === "47" ) 2015 2097 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $listitem; 2016 2098 else 2017 $parsed_val .= $listitem; //non-array plain text (option val 1) will land here2099 $parsed_val .= $listitem; 2018 2100 2019 2101 $inc++; … … 2024 2106 } 2025 2107 } 2026 //*** ARRAY META FLD LOADED AS AN ARRAY ***************************************************************/ 2027 if(is_array($user_meta_fld)) 2108 else if(is_array($user_meta_fld)) 2028 2109 { 2029 2110 $inc = 1; … … 2037 2118 else //add key-value pair to the meta fld var 2038 2119 { 2039 if($format === "35" || $format === "36") 2120 //Hide Hyphens & Capitalization 2121 if($format === "5" || $format === "39" || $format === "40" 2122 || $format === "4" || $format === "41" || $format === "42" 2123 || $format === "45" || $format === "43" | $format === "44" 2124 || $format === "47" || $format === "13" || $format === "15" 2125 || $format === "48" || $format === "49" || $format === "50" 2126 || $format === "35" || $format === "36" || $format === "11" || $format === "8" 2127 || $format === "53" || $format === "54") 2040 2128 { 2041 2129 $value = str_replace ( "-", " ", $value); 2042 $value = ucwords($value); 2130 2131 if($format === "39" || $format === "41" || $format === "43" || $format === "44" || $format === "53") 2132 $value = strtoupper($value); 2133 else if($format === "40" || $format === "42" || $format === "47" || $format === "48" || $format === "54") 2134 $value = strtolower($value); 2135 else 2136 $value = ucwords($value); 2043 2137 } 2138 2139 //Add comma for comma delimited options 2140 if($format === "4" || $format === "36" || $format === "41" || $format === "42" || 2141 $format === "8" || $format === "46" || $format === "44" || $format === "48") 2142 { 2143 if($inc > 1) 2144 $parsed_val .= ", "; 2145 } 2146 //Add BR tag for multi value flds 2147 else if($inc > 1) 2148 $parsed_val .= "<BR>"; 2149 else if($ud_display_listings !== "horizontally" && !empty($label) && 2150 $format !== "13" && $format !== "14" && $format !== "15" && $format !== "53" && $format !== "54" && $inc == 1) 2151 $parsed_val .= "<BR>"; 2044 2152 2045 2153 $key_val_array = true; 2046 2154 2047 /*if(sizeof($user_meta_fld) == 1) 2155 if($format === "5" || $format === "39" || $format === "40" || $format === "43" || $format === "45") 2156 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $value; 2157 else if($format === "11" || $format === "35") 2158 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key ; 2159 else if($format === "49") 2160 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key . ": " . $value; 2161 else if($format === "14" || $format === "8" || $format === "36" ) 2162 $parsed_val .= $key; 2163 else if($format === "13" || $format === "44" || $format === "49" || $format === "50") 2164 $parsed_val .= $key . ": " . $value; 2165 else 2048 2166 $parsed_val .= $value; 2049 else*/ if($format === "5" || $format === "35") //bulleted list2050 {2051 if($ud_display_listings !== "horizontally" || $inc > 1)2052 $parsed_val .= "<BR>";2053 2054 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key . ": " . $value;2055 }2056 else if($format === "4" || $format === "36") //comma delimited list2057 {2058 if($inc > 1) $parsed_val .= ", ";2059 2060 $parsed_val .= $key . ": " . $value;2061 }2062 else if($format === "7") //comma delimited list2063 {2064 if($inc > 1) $parsed_val .= ", ";2065 2066 $parsed_val .= $key . ": " . $value;2067 }2068 else if($format === "8") //comma delimited list2069 {2070 if($inc > 1) $parsed_val .= ", ";2071 2072 $parsed_val .= $key;2073 }2074 else if($format === "9") //comma delimited list2075 {2076 if($inc > 1) $parsed_val .= ", ";2077 2078 $parsed_val .= $value;2079 }2080 else if($format === "10") //bulleted list2081 {2082 if($ud_display_listings !== "horizontally" || $inc > 1)2083 $parsed_val .= "<BR>";2084 2085 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key . ": " . $value;2086 }2087 else if($format === "11") //bulleted list2088 {2089 if($ud_display_listings !== "horizontally" || $inc > 1)2090 $parsed_val .= "<BR>";2091 2092 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $key ;2093 }2094 else if($format === "12") //bulleted list2095 {2096 if($ud_display_listings !== "horizontally" || $inc > 1)2097 $parsed_val .= "<BR>";2098 2099 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $value;2100 }2101 else if($format === "13") //single checkbox2102 {2103 $parsed_val .= $key . ": " . $value;2104 }2105 else if($format === "14") //single checkbox2106 {2107 $parsed_val .= $key;2108 }2109 else if($format === "15") //single checkbox2110 {2111 $parsed_val .= $value;2112 }2113 else //default: one item per line2114 {2115 if(sizeof($user_meta_fld) > 1 && ($ud_display_listings !== "horizontally" || $inc > 1))2116 $parsed_val .= "<BR>";2117 2118 $parsed_val .= $key . ": " . $value;2119 }2120 2167 2121 2168 $inc++; … … 2141 2188 else //add the item to the meta fld var 2142 2189 { 2143 if($format === "35" || $format === "36") 2190 2191 //Hide Hyphens & Capitalization 2192 if($format === "5" || $format === "39" || $format === "40" 2193 || $format === "4" || $format === "41" || $format === "42" 2194 || $format === "45" || $format === "43" | $format === "44" 2195 || $format === "47" || $format === "13" || $format === "15" 2196 || $format === "48" || $format === "50" 2197 || $format === "53" || $format === "54") 2144 2198 { 2145 $user_meta_fld[$met] = str_replace ( "-", " ", $user_meta_fld[$met]); 2146 $user_meta_fld[$met] = ucwords($user_meta_fld[$met]); 2147 } 2148 2149 if(sizeof($user_meta_fld) == 1) 2150 $parsed_val .= $user_meta_fld[$met]; 2151 else if($format === "5" || $format === "35" || $format === "10" || $format === "11" || $format === "12" ) //bulleted list 2152 { 2153 if($ud_display_listings !== "horizontally" || $inc > 1) 2154 $parsed_val .= "<BR>"; 2155 2156 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $user_meta_fld[$met]; 2157 } 2158 else if($format === "4" || $format === "36" || $format === "7" || $format === "8" || $format === "9" ) //comma delimited list 2159 { 2160 if($inc > 1) $parsed_val .= ", "; 2199 $listitem = str_replace ( "-", " ", $listitem); 2161 2200 2162 $parsed_val .= $user_meta_fld[$met]; 2163 } 2164 else //default: one item per line 2165 { 2166 if(sizeof($user_meta_fld) > 1 && ($ud_display_listings !== "horizontally" || $inc > 1)) 2167 $parsed_val .= "<BR>"; 2168 2169 $parsed_val .= $user_meta_fld[$met]; //array plain text (option 1) will land here 2201 if($format === "39" || $format === "41" || $format === "43" || $format === "44") 2202 $user_meta_fld[$met] = strtoupper($user_meta_fld[$met]); 2203 else if($format === "40" || $format === "42" || $format === "47" || $format === "48") 2204 $user_meta_fld[$met] = strtolower($user_meta_fld[$met]); 2205 else 2206 $user_meta_fld[$met] = ucwords($user_meta_fld[$met]); 2170 2207 } 2171 2208 2209 //Comma delimited options 2210 if($format === "4" || $format === "36" || $format === "41" || $format === "42" || 2211 $format === "8" || $format === "46" || $format === "44" || $format === "48") 2212 { 2213 if($inc > 1) 2214 $parsed_val .= ", "; 2215 } 2216 else if($inc > 1) 2217 $parsed_val .= "<BR>"; 2218 else if($ud_display_listings !== "horizontally" && !empty($label) && 2219 $format !== "13" && $format !== "14" && $format !== "15" && $format !== "53" && $format !== "54" && $inc == 1) 2220 $parsed_val .= "<BR>"; 2221 2222 if($format === "5" || $format === "35" || $format === "39" || $format === "40" || $format === "11" 2223 || $format === "43" || $format === "45" || $format === "47" ) 2224 $parsed_val .= "<i class=\"fas fa-circle dud-fa-bullet\" aria-hidden=\"true\"></i>" . $user_meta_fld[$met]; 2225 else 2226 $parsed_val .= $user_meta_fld[$met]; 2227 2172 2228 $inc++; 2173 2229 } … … 2728 2784 } 2729 2785 2786 if(!empty($social_flds[6])) 2787 { 2788 2789 if( !dud_startsWith($social_flds[6], "http") ) 2790 $social_flds[6] = "https://" . $social_flds[6]; 2791 } 2792 2793 if(!empty($social_flds[7])) 2794 { 2795 2796 if( !dud_startsWith($social_flds[7], "http") ) 2797 $social_flds[7] = "https://" . $social_flds[7]; 2798 } 2799 2800 if(!empty($social_flds[8])) 2801 { 2802 2803 if( !dud_startsWith($social_flds[8], "http") ) 2804 $social_flds[8] = "https://" . $social_flds[8]; 2805 } 2806 2730 2807 return $social_flds; 2731 2808 } -
dynamic-user-directory/trunk/includes/member_plugins_compatibility.php
r2703353 r2787766 20 20 $ud_instagram_op = !empty($dud_options['ud_instagram']) ? $dud_options['ud_instagram'] : ""; 21 21 $ud_pinterest_op = !empty($dud_options['ud_pinterest']) ? $dud_options['ud_pinterest'] : ""; 22 $ud_youtube_op = !empty($dud_options['ud_youtube']) ? $dud_options['ud_youtube'] : ""; 23 $ud_tiktok_op = !empty($dud_options['ud_tiktok']) ? $dud_options['ud_tiktok'] : ""; 24 $ud_podcast_op = !empty($dud_options['ud_podcast']) ? $dud_options['ud_podcast'] : ""; 22 25 23 26 $values = dynamic_ud_get_cimy_data($user_id, $user_directory_addr_1_op, $user_directory_addr_2_op, $user_directory_city_op, 24 27 $user_directory_state_op, $user_directory_zip_op, $user_directory_country_op, $ud_facebook_op, $ud_twitter_op, $ud_linkedin_op, $ud_google_op, 25 $ud_instagram_op, $ud_pinterest_op, $u ser_directory_meta_flds_tmp);28 $ud_instagram_op, $ud_pinterest_op, $ud_youtube_op, $ud_tiktok_op, $ud_podcast_op, $user_directory_meta_flds_tmp); 26 29 27 30 if($values) … … 69 72 else if($ud_instagram_op && $meta_name === strtoupper ($ud_instagram_op)) 70 73 $dud_meta_social_flds[5] = $value->VALUE; 74 75 else if($ud_youtube_op && $meta_name === strtoupper ($ud_youtube_op)) 76 $dud_meta_social_flds[6] = $value->VALUE; 77 78 else if($ud_tiktok_op && $meta_name === strtoupper ($ud_tiktok_op)) 79 $dud_meta_social_flds[7] = $value->VALUE; 80 81 else if($ud_podcast_op && $meta_name === strtoupper ($ud_podcast_op)) 82 $dud_meta_social_flds[8] = $value->VALUE; 71 83 72 84 else … … 78 90 { 79 91 $user_directory_meta_flds_tmp[$inc]['value'] 80 = dynamic_ud_format_meta_val($value->VALUE, $dud_options, $user_directory_meta_flds_tmp[$inc]['format']); 92 = dynamic_ud_format_meta_val($value->VALUE, $dud_options, $user_directory_meta_flds_tmp[$inc]['format'], 93 $user_directory_meta_flds_tmp[$inc]['label']); 81 94 82 95 //currently Cimy doesn't appear to store arrays but we are ready if/when it does … … 114 127 /*** Builds Cimy Tables Query Based on Dynamic User Directory Key Name Settings ***/ 115 128 function dynamic_ud_get_cimy_data($id, $user_directory_addr_1_op, $user_directory_addr_2_op, $user_directory_city_op, 116 $user_directory_state_op, $user_directory_zip_op, $user_directory_country_op, $ud_facebook_op, $ud_twitter_op, $ud_linkedin_op, $ud_google_op, 117 $ud_instagram_op, $ud_pinterest_op, $user_directory_meta_flds_tmp) 129 $user_directory_state_op, $user_directory_zip_op, $user_directory_country_op, $ud_facebook_op, $ud_twitter_op, $ud_linkedin_op, $ud_google_op, $ud_instagram_op, $ud_pinterest_op, $ud_youtube_op, $ud_tiktok_op, $ud_podcast_op, $user_directory_meta_flds_tmp) 118 130 { 119 131 global $wpdb; … … 141 153 if($ud_instagram_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.NAME='" . $ud_instagram_op . "'"; $was_prev_fld = 1; } 142 154 if($ud_pinterest_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.NAME='" . $ud_pinterest_op . "'"; $was_prev_fld = 1; } 155 if($ud_youtube_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.NAME='" . $ud_youtube_op . "'"; $was_prev_fld = 1; } 156 if($ud_tiktok_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.NAME='" . $ud_tiktok_op . "'"; $was_prev_fld = 1; } 157 if($ud_podcast_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.NAME='" . $ud_podcast_op . "'"; $was_prev_fld = 1; } 143 158 144 159 foreach ( $user_directory_meta_flds_tmp as $ud_mflds ) … … 207 222 $ud_instagram_op = !empty($dud_options['ud_instagram']) ? $dud_options['ud_instagram'] : ""; 208 223 $ud_pinterest_op = !empty($dud_options['ud_pinterest']) ? $dud_options['ud_pinterest'] : ""; 209 210 //echo "In BP load vals, ud facebook is " . $ud_facebook_op . "<BR>"; 224 $ud_youtube_op = !empty($dud_options['ud_youtube']) ? $dud_options['ud_youtube'] : ""; 225 $ud_tiktok_op = !empty($dud_options['ud_tiktok']) ? $dud_options['ud_tiktok'] : ""; 226 $ud_podcast_op = !empty($dud_options['ud_podcast']) ? $dud_options['ud_podcast'] : ""; 211 227 212 228 $values = dud_get_bp_data($user_id, $user_directory_addr_1_op, $user_directory_addr_2_op, $user_directory_city_op, 213 229 $user_directory_state_op, $user_directory_zip_op, $user_directory_country_op, $ud_facebook_op, $ud_twitter_op, $ud_linkedin_op, $ud_google_op, 214 $ud_instagram_op, $ud_pinterest_op, $u ser_directory_meta_flds_tmp);230 $ud_instagram_op, $ud_pinterest_op, $ud_youtube_op, $ud_tiktok_op, $ud_podcast_op, $user_directory_meta_flds_tmp); 215 231 216 232 if($values) … … 254 270 255 271 else if($ud_instagram_op && $meta_name === strtoupper ($ud_instagram_op)) 256 $dud_meta_social_flds[5] = $value->value; 272 $dud_meta_social_flds[5] = $value->value; 273 274 else if($ud_youtube_op && $meta_name === strtoupper ($ud_youtube_op)) 275 $dud_meta_social_flds[6] = $value->value; 276 277 else if($ud_tiktok_op && $meta_name === strtoupper ($ud_tiktok_op)) 278 $dud_meta_social_flds[7] = $value->value; 279 280 else if($ud_podcast_op && $meta_name === strtoupper ($ud_podcast_op)) 281 $dud_meta_social_flds[8] = $value->value; 257 282 258 283 else … … 264 289 { 265 290 $user_directory_meta_flds_tmp[$inc]['value'] 266 = dynamic_ud_format_meta_val($value->value, $dud_options, $user_directory_meta_flds_tmp[$inc]['format'] );291 = dynamic_ud_format_meta_val($value->value, $dud_options, $user_directory_meta_flds_tmp[$inc]['format'], $user_directory_meta_flds_tmp[$inc]['label']); 267 292 /*if(strlen($value->value) > 2 && substr($value->value, 0, 2) === "a:") 268 293 $user_directory_meta_flds_tmp[$inc]['value'] = implode(", ",(unserialize(stripslashes($value->value)))); … … 299 324 function dud_get_bp_data($id, $user_directory_addr_1_op, $user_directory_addr_2_op, $user_directory_city_op, 300 325 $user_directory_state_op, $user_directory_zip_op, $user_directory_country_op, $ud_facebook_op, $ud_twitter_op, $ud_linkedin_op, $ud_google_op, 301 $ud_instagram_op, $ud_pinterest_op, $u ser_directory_meta_flds_tmp)326 $ud_instagram_op, $ud_pinterest_op, $ud_youtube_op, $ud_tiktok_op, $ud_podcast_op, $user_directory_meta_flds_tmp) 302 327 { 303 328 global $wpdb; … … 325 350 if($ud_instagram_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.name='" . $ud_instagram_op . "'"; $was_prev_fld = 1; } 326 351 if($ud_pinterest_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.name='" . $ud_pinterest_op . "'"; $was_prev_fld = 1; } 352 if($ud_youtube_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.name='" . $ud_youtube_op . "'"; $was_prev_fld = 1; } 353 if($ud_tiktok_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.name='" . $ud_tiktok_op . "'"; $was_prev_fld = 1; } 354 if($ud_podcast_op) { if($was_prev_fld) { $ud_sql .= " OR "; } $ud_sql .= "efields.name='" . $ud_podcast_op . "'"; $was_prev_fld = 1; } 327 355 328 356 foreach ( $user_directory_meta_flds_tmp as $ud_mflds ) … … 340 368 341 369 //if($dynamic_ud_debug) { echo "<PRE>BuddyPress Load Meta Flds SQL:<BR><BR>" . $ud_sql . "<BR><BR></PRE>"; } 370 371 //echo "<PRE>BuddyPress Load Meta Flds SQL:<BR><BR>" . $ud_sql . "<BR><BR></PRE>"; 342 372 343 373 return $wpdb->get_results($ud_sql); … … 369 399 $ud_instagram_op = !empty($dud_options['ud_instagram']) ? $dud_options['ud_instagram'] : ""; 370 400 $ud_pinterest_op = !empty($dud_options['ud_pinterest']) ? $dud_options['ud_pinterest'] : ""; 401 $ud_youtube_op = !empty($dud_options['ud_youtube']) ? $dud_options['ud_youtube'] : ""; 402 $ud_tiktok_op = !empty($dud_options['ud_tiktok']) ? $dud_options['ud_tiktok'] : ""; 403 $ud_podcast_op = !empty($dud_options['ud_podcast']) ? $dud_options['ud_podcast'] : ""; 371 404 372 405 $s2m_custom_flds = get_user_meta($user_id, DUD_WPDB_PREFIX . 's2member_custom_fields'); … … 415 448 $dud_meta_social_flds[5] = $value; 416 449 450 else if($ud_youtube_op && $key === strtoupper ($ud_youtube_op)) 451 $dud_meta_social_flds[6] = $value; 452 453 else if($ud_tiktok_op && $key === strtoupper ($ud_tiktok_op)) 454 $dud_meta_social_flds[7] = $value; 455 456 else if($ud_podcast_op && $key === strtoupper ($ud_podcast_op)) 457 $dud_meta_social_flds[8] = $value; 458 417 459 else 418 460 { … … 423 465 { 424 466 $user_directory_meta_flds_tmp[$inc]['value'] 425 = dynamic_ud_format_meta_val($value, $dud_options, $user_directory_meta_flds_tmp[$inc]['format'] );467 = dynamic_ud_format_meta_val($value, $dud_options, $user_directory_meta_flds_tmp[$inc]['format'], $user_directory_meta_flds_tmp[$inc]['label']); 426 468 427 469 /*if(is_array($value)) -
dynamic-user-directory/trunk/js/jquery.user-directory.js
r2703353 r2787766 1651 1651 $("#instagram").hide(); 1652 1652 $("#pintrest").hide(); 1653 $("#youtube").hide(); 1654 $("#tiktok").hide(); 1655 $("#podcast").hide(); 1653 1656 1654 1657 $("#icon_size").hide(); … … 1662 1665 $("#ud_instagram").val(""); 1663 1666 $("#ud_pinterest").val(""); 1667 $("#ud_youtube").val(""); 1668 $("#ud_tiktok").val(""); 1669 $("#ud_podcast").val(""); 1664 1670 1665 1671 $("#Social").hide(); … … 1688 1694 $("#instagram").show(); 1689 1695 $("#pintrest").show(); 1696 $("#youtube").show(); 1697 $("#tiktok").show(); 1698 $("#podcast").show(); 1699 1690 1700 1691 1701 $("#icon_size").show(); … … 1752 1762 $("#instagram").show(); 1753 1763 $("#pintrest").show(); 1764 $("#youtube").show(); 1765 $("#tiktok").show(); 1766 $("#podcast").show(); 1767 1754 1768 1755 1769 $("#icon_size").show(); … … 1821 1835 $("#instagram").hide(); 1822 1836 $("#pintrest").hide(); 1837 $("#youtube").hide(); 1838 $("#tiktok").hide(); 1839 $("#podcast").hide(); 1823 1840 1824 1841 $("#icon_size").hide(); … … 1832 1849 $("#ud_instagram").val(""); 1833 1850 $("#ud_pinterest").val(""); 1851 $("#ud_youtube").val(""); 1852 $("#ud_tiktok").val(""); 1853 $("#ud_podcast").val(""); 1834 1854 1835 1855 $("#Social").hide(); -
dynamic-user-directory/trunk/readme.txt
r2704621 r2787766 5 5 Tags: user directory, MemberPress, BuddyPress, Cimy User Extra Fields, user registration, user meta fields, profile fields, member directory, website directory, directory, user listing, users, members, user profile, user profiles 6 6 Requires at least: 3.0.1 7 Tested up to: 5.9.28 Stable tag: 1.6. 67 Tested up to: 6.0.2 8 Stable tag: 1.6.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 = 1.6.7 = 101 - Released 9/20/22 102 - Successfully tested against WordPress 6.0.2 103 - Please clear your browser cache before refreshing the DUD settings page to see the new field formatting options listed below. 104 - New feature: Added several new field format options for multiselect boxes, multiple checkboxes, and single checkboxes. 105 - New feature: Added field format option to show Email Address in plain text with anti spam measures (injects a hidden HTML comment in the address to discourage scraper bots). 106 - New Feature: Added new field format option to show a person's current age based on a birthdate field. 107 - New Feature: Added new social field icons: YouTube, TikTok, Podcast. 108 - Enhancement: A search on last name or display name will now be a "contains" search instead of a "starts with" search. 109 - Enhancement: Moved the social icons line down by 4px in the vertical directory to match the line spacing in each listing. 110 100 111 = 1.6.6 = 101 112 - Released 4/04/22
Note: See TracChangeset
for help on using the changeset viewer.