* @param int $count [optional] item count (used with alt pager)
* @return Array data for pagination template
*/
* @param int $count [optional] item count (used with alt pager)
* @return Array data for pagination template
*/
$stripped = preg_replace('/([&?]page=[0-9]*)/','',$a->query_string);
$stripped = str_replace('q=','',$stripped);
$stripped = preg_replace('/([&?]page=[0-9]*)/','',$a->query_string);
$stripped = str_replace('q=','',$stripped);
$data = paginate_data($a, $i);
$tpl = get_markup_template("paginate.tpl");
$data = paginate_data($a, $i);
$tpl = get_markup_template("paginate.tpl");
if (dbm::is_result($r)) {
$contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total);
$micropro = Array();
if (dbm::is_result($r)) {
$contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total);
$micropro = Array();
$matches = null;
$r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER);
$matches = null;
$r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER);
foreach($matches as $mtch) {
if((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be')))
$s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s);
foreach($matches as $mtch) {
if((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be')))
$s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s);
-function fix_mce_lf($s) {
- $s = str_replace("\r\n","\n",$s);
-// $s = str_replace("\n\n","\n",$s);
- return $s;
-}
-
-
function protect_sprintf($s) {
return(str_replace('%','%%',$s));
}
function protect_sprintf($s) {
return(str_replace('%','%%',$s));
}
-function deindent($text, $chr="[\t ]", $count=NULL) {
- $text = fix_mce_lf($text);
+function deindent($text, $chr = "[\t ]", $count = NULL) {
- $k=0; while($k<count($lines) && strlen($lines[$k])==0) $k++;
- preg_match("|^".$chr."*|", $lines[$k], $m);
+ $k = 0;
+ while ($k < count($lines) && strlen($lines[$k]) == 0) {
+ $k++;
+ }
+ preg_match("|^" . $chr . "*|", $lines[$k], $m);
- for ($k=0; $k<count($lines); $k++){
- $lines[$k] = preg_replace("|^".$chr."{".$count."}|", "", $lines[$k]);
+ for ($k=0; $k < count($lines); $k++) {
+ $lines[$k] = preg_replace("|^" . $chr . "{" . $count . "}|", "", $lines[$k]);