Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:40-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13102 2011-12-20T09:50:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=57840#p57840 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=55522#p55522 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=51896#p51896 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=49991#p49991 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=47785#p47785 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=46186#p46186 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:48:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=44316#p44316 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: October 3, 2011, 1:48 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:48 pm


]]>
2011-10-03T03:41:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=43023#p43023 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=41269#p41269 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=40025#p40025 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:21:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=38167#p38167 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: September 17, 2011, 2:21 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:21 pm


]]>
2011-09-14T01:28:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=36748#p36748 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:28 am


]]>
2011-09-13T12:03:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=35476#p35476 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=31596#p31596 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\utils-strings.inc.php ?php /** * String utilities. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Utilities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_utils_strings" ) ) { /** * String utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utils_strings { /** * Escapes double quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after double quotes are escaped. */ public static function esc_dq ( $string = FALSE ) { return str_replace ( '"' , '\"' , (string) $string ) ; } /** * Escapes single quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after single quotes are escaped. */ public static function esc_sq ( $string = FALSE ) { return str_replace ( "'" , "\'" , (string) $string ) ; } /** * Escapes dollars signs ( for regex patterns ). * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after dollar signs are escaped. */ public static function esc_ds ( $string = FALSE ) { return str_replace ( '$' , '\\$' , (string) $string ) ; } /** * Sanitizes a string; by removing non-standard characters. * * This allows all characters that appears on a standard U.S. keyboard. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after non-keyboard chars are removed. */ public static function keyboard_chars_only ( $string = FALSE ) { return preg_replace ( "/[^0-9A-Z\r \n \t\s`\=\[\]\\\;',\.\/~\!@#\$%\^&\*\(\)_\+\|\}\{\:\"\?\\\-]/i" , "" , remove_accents ( (string) $string ) ) ; } /** * Trims deeply. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_deep" , $value ) : trim ( (string) $value ) ; } /** * Trims " entities deeply. * * This is useful on Shortcode attributes mangled by a Visual Editor. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_quot_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_quot_deep" , $value ) : preg_replace ( "(^(")+|(")+$)" , "" , (string) $value ) ; } /** * Trims double quotes deeply. * * This is useful on CSV data that is encapsulated by double quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_dq_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_dq_deep" , $value ) : trim ( (string) $value , "\" \t \n \r \0 \x0B" ) ; } /** * Wraps a string with the characters provided. * * This is useful when preparing an input array for ``c_ws_plugin__s2member_utils_arrays::in_regex_array()``. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @param str $beg A string value to wrap at the beginning of each value. * @param str $end A string value to wrap at the ending of each value. * @return str|array Either the input string, or the input array; after all data is wrapped up. */ public static function wrap_deep ( $value = FALSE , $beg = FALSE , $end = FALSE ) { return ( is_array ( $value ) && ! empty ( $value ) ) ? array_map ( "c_ws_plugin__s2member_utils_strings::wrap_deep" , $value , array_fill ( 0 , count ( $value ) , $beg ) , array_fill ( 0 , count ( $value ) , $end ) ) : ( ( is_string ( $value ) && strlen ( $value ) ) ? (string) $beg . (string) $value . (string) $end : ( ( is_array ( $value ) ) ? $value : (string) $value ) ) ; } /** * Generates a random string with letters/numbers/symbols. * * @package s2Member\Utilities * @since 3.5 * * @param int $length Length of the randomly generated string. * @param bool $special_chars Defaults to true. If false, special chars are NOT included. * @param bool $extra_special_chars Defaults to false. If true, extra special chars are included. * @return str A randomly generated string, based on parameter configuration. */ public static function random_str_gen ( $length = 12 , $special_chars = TRUE , $extra_special_chars = FALSE ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ; $chars .= ( $extra_special_chars ) ? "-_ []{}~`+=,.;:/?|" : "" ; $chars .= ( $special_chars ) ? "!@#$%^&*()" : "" ; /**/ for ( $i = 0 , $random_str = "" ; $i $length ; $i ++ ) $random_str .= substr ( $chars , mt_rand ( 0 , strlen ( $chars ) - 1 ) , 1 ) ; /**/ return $random_str ; } /** * Highlights PHP, and also Shortcodes. * * @package s2Member\Utilities * @since 3.5 * * @param str $str Input string to be highlighted. * @return str The highlighted string. */ public static function highlight_php ( $str = FALSE ) { $str = highlight_string ( $str , true ) ; /* Start with PHP syntax highlighting first. */ /**/ return preg_replace_callback ( "/(\[)(\/?)(_*s2If|s2Get|s2Member-[A-z_0-9\-]+)(.*?)(\])/i" , "c_ws_plugin__s2member_utils_strings::_highlight_php" , $str ) ; } /** * Highlights Shortcodes. * * @package s2Member\Utilities * @since 3.5 * * @param array $m Array passed in from `preg_replace_callback()`. * @return str The highlighted string. */ public static function _highlight_php ( $m = FALSE ) { return 'span style="color:#164A61;"' . $m [ 0 ] . '/span' ; } } } ? [ full view ]s2member\includes\classes\utils-strings.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=27765#p27765 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: July 11, 2011, 6:30 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\utils-strings.inc.php ?php /** * String utilities. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Utilities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_utils_strings" ) ) { /** * String utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utils_strings { /** * Escapes double quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after double quotes are escaped. */ public static function esc_dq ( $string = FALSE ) { return preg_replace ( '/"/' , '\"' , (string) $string ) ; } /** * Escapes single quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after single quotes are escaped. */ public static function esc_sq ( $string = FALSE ) { return preg_replace ( "/'/" , "\'" , (string) $string ) ; } /** * Escapes dollars signs ( for regex patterns ). * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after dollar signs are escaped. */ public static function esc_ds ( $string = FALSE ) { return preg_replace ( '/\$/' , '\\\$' , (string) $string ) ; } /** * Sanitizes a string; by removing non-standard characters. * * This allows all characters that appears on a standard U.S. keyboard. * * @package s2Member\Utilities * @since 3.5 * * @param str $string Input string. * @return str Output string after non-keyboard chars are removed. */ public static function keyboard_chars_only ( $string = FALSE ) { return preg_replace ( "/[^0-9A-Z\r \n \t\s`\=\[\]\\\;',\.\/~\!@#\$%\^&\*\(\)_\+\|\}\{\:\"\?\\\-]/i" , "" , remove_accents ( (string) $string ) ) ; } /** * Trims deeply. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_deep" , $value ) : trim ( (string) $value ) ; } /** * Trims " entities deeply. * * This is useful on Shortcode attributes mangled by a Visual Editor. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_quot_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_quot_deep" , $value ) : preg_replace ( "(^(")+|(")+$)" , "" , (string) $value ) ; } /** * Trims double quotes deeply. * * This is useful on CSV data that is encapsulated by double quotes. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @return str|array Either the input string, or the input array; after all data is trimmed up. */ public static function trim_dq_deep ( $value = FALSE ) { return is_array ( $value ) ? array_map ( "c_ws_plugin__s2member_utils_strings::trim_dq_deep" , $value ) : trim ( (string) $value , "\" \t \n \r \0 \x0B" ) ; } /** * Wraps a string with the characters provided. * * This is useful when preparing an input array for ``c_ws_plugin__s2member_utils_arrays::in_regex_array()``. * * @package s2Member\Utilities * @since 3.5 * * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values. * @param str $beg A string value to wrap at the beginning of each value. * @param str $end A string value to wrap at the ending of each value. * @return str|array Either the input string, or the input array; after all data is wrapped up. */ public static function wrap_deep ( $value = FALSE , $beg = FALSE , $end = FALSE ) { return ( is_array ( $value ) && ! empty ( $value ) ) ? array_map ( "c_ws_plugin__s2member_utils_strings::wrap_deep" , $value , array_fill ( 0 , count ( $value ) , $beg ) , array_fill ( 0 , count ( $value ) , $end ) ) : ( ( is_string ( $value ) && strlen ( $value ) ) ? (string) $beg . (string) $value . (string) $end : ( ( is_array ( $value ) ) ? $value : (string) $value ) ) ; } /** * Generates a random string with letters/numbers/symbols. * * @package s2Member\Utilities * @since 3.5 * * @param int $length Length of the randomly generated string. * @param bool $special_chars Defaults to true. If false, special chars are NOT included. * @param bool $extra_special_chars Defaults to false. If true, extra special chars are included. * @return str A randomly generated string, based on parameter configuration. */ public static function random_str_gen ( $length = 12 , $special_chars = TRUE , $extra_special_chars = FALSE ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ; $chars .= ( $extra_special_chars ) ? "-_ []{}~`+=,.;:/?|" : "" ; $chars .= ( $special_chars ) ? "!@#$%^&*()" : "" ; /**/ for ( $i = 0 , $random_str = "" ; $i $length ; $i ++ ) $random_str .= substr ( $chars , mt_rand ( 0 , strlen ( $chars ) - 1 ) , 1 ) ; /**/ return $random_str ; } /** * Highlights PHP, and also Shortcodes. * * @package s2Member\Utilities * @since 3.5 * * @param str $str Input string to be highlighted. * @return str The highlighted string. */ public static function highlight_php ( $str = FALSE ) { $str = highlight_string ( $str , true ) ; /* Start with PHP syntax highlighting first. */ /**/ return preg_replace_callback ( "/(\[)(\/?)(_*s2If|s2Get|s2Member-[A-z_0-9\-]+)(.*?)(\])/i" , "c_ws_plugin__s2member_utils_strings::_highlight_php" , $str ) ; } /** * Highlights Shortcodes. * * @package s2Member\Utilities * @since 3.5 * * @param array $m Array passed in from `preg_replace_callback()`. * @return str The highlighted string. */ public static function _highlight_php ( $m = FALSE ) { return 'span style="color:#164A61;"' . $m [ 0 ] . '/span' ; } } } ? [ full view ]s2member\includes\classes\utils-strings.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:30 pm


]]>
2011-07-09T06:10:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13102&p=25397#p25397 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utils-strings.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:10 am


]]>