diff --git a/e107_plugins/_blank/e_cron.php b/e107_plugins/_blank/e_cron.php new file mode 100644 index 000000000..7fc39879a --- /dev/null +++ b/e107_plugins/_blank/e_cron.php @@ -0,0 +1,33 @@ + "Name of my function", // Displayed in admin area. . + 'function' => "myFunction", // Name of the function which is defined below. + 'category' => 'mail', // Choose between: mail, user, content, notify, or backup + 'description' => "Description of what my function does" // Displayed in admin area. + ); + + return $cron; + } + + public function myFunction() + { + // Do Something. + } + +} \ No newline at end of file diff --git a/e107_plugins/_blank/e_dashboard.php b/e107_plugins/_blank/e_dashboard.php new file mode 100644 index 000000000..211a9ec91 --- /dev/null +++ b/e107_plugins/_blank/e_dashboard.php @@ -0,0 +1,38 @@ +"; + $var[0]['title'] = "My Title"; + $var[0]['url'] = e_PLUGIN_ABS."_blank/_blank.php"; + $var[0]['total'] = 10; + + return $var; + } + + + function latest() // Latest panel in the admin area. + { + $var[0]['icon'] = ""; + $var[0]['title'] = "My Title"; + $var[0]['url'] = e_PLUGIN_ABS."_blank/_blank.php"; + $var[0]['total'] = 10; + + return $var; + } + + +} +?> \ No newline at end of file diff --git a/e107_plugins/_blank/e_header.php b/e107_plugins/_blank/e_header.php new file mode 100644 index 000000000..104cb94a7 --- /dev/null +++ b/e107_plugins/_blank/e_header.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/e107_plugins/_blank/e_menu.php b/e107_plugins/_blank/e_menu.php new file mode 100644 index 000000000..00bcb5038 --- /dev/null +++ b/e107_plugins/_blank/e_menu.php @@ -0,0 +1,60 @@ + "Caption", 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge')); + $fields['blankCount'] = array('title'=> "Enabled", 'type'=>'number'); + $fields['blankCustom'] = array('title'=> "Enabled", 'type'=>'method'); // see below. + + return $fields; + + } + +} + +// optional - for when using custom methods above. + +class _blank_menu_form extends e_form +{ + + function blankCustom($curVal) + { + + $frm = e107::getForm(); + $opts = array(1,2,3,4); + $frm->select('blankCustom', $opts, $curVal); + + + } + + +} + + +?> \ No newline at end of file diff --git a/e107_plugins/_blank/e_notify.php b/e107_plugins/_blank/e_notify.php new file mode 100644 index 000000000..fa21a584a --- /dev/null +++ b/e107_plugins/_blank/e_notify.php @@ -0,0 +1,49 @@ + "Notify about something", + 'function' => "customNotify", + 'category' => '' + ); + + + + return $config; + } + + + function customNotify($data) + { + $subject = "My Notification"; + $message = print_a($data,true); + $this->send('customNotify', $subject, $message); + } + + +} + + +?> \ No newline at end of file diff --git a/e107_plugins/_blank/e_related.php b/e107_plugins/_blank/e_related.php new file mode 100644 index 000000000..a01406177 --- /dev/null +++ b/e107_plugins/_blank/e_related.php @@ -0,0 +1,56 @@ +gen($query)) + { + while($row = $sql->fetch()) + { + + $items[] = array( + 'title' => varset($row['blank_title']), + 'url' => e107::url('other',$row), // '{e_BASE}news.php?extend.'.$row['news_id'], + 'summary' => varset($row['blank_summary']), + 'image' => '{e_PLUGIN}_blank/images/image.png' + ); + } + + return $items; + } + elseif(ADMIN) + { + // return array(array('title'=>$query,'url'=>'')); + } + } + +} + + + +?> \ No newline at end of file diff --git a/e107_plugins/_blank/e_rss.php b/e107_plugins/_blank/e_rss.php new file mode 100644 index 000000000..f7b0591e0 --- /dev/null +++ b/e107_plugins/_blank/e_rss.php @@ -0,0 +1,72 @@ + 'Feed Name', + 'url' => 'blank', + 'topic_id' => '', + 'description' => 'this is the rss feed for the blank plugin', // that's 'description' not 'text' + 'class' => e_UC_MEMBER, + 'limit' => '9' + ); + + return $config; + } + + /** + * Compile RSS Data + * @param array $parms + * @param string $parms['url'] + * @param int $parms['limit'] + * @param int $parms['id'] + * @return array + */ + function data($parms=array()) + { + $sql = e107::getDb(); + + $rss = array(); + $i=0; + + if($items = $sql->select('blank', "*", "blank_field = 1 LIMIT 0,".$parms['limit'])) + { + + while($row = $sql->fetch()) + { + + $rss[$i]['author'] = $row['blank_user_id']; + $rss[$i]['author_email'] = $row['blank_user_email']; + $rss[$i]['link'] = "_blank/_blank.php?"; + $rss[$i]['linkid'] = $row['blank_id']; + $rss[$i]['title'] = $row['blank_title']; + $rss[$i]['description'] = $row['blank_message']; + $rss[$i]['category_name'] = ''; + $rss[$i]['category_link'] = ''; + $rss[$i]['datestamp'] = $row['blank_datestamp']; + $rss[$i]['enc_url'] = ""; + $rss[$i]['enc_leng'] = ""; + $rss[$i]['enc_type'] = ""; + $i++; + } + + } + + return $rss; + } + + + +} diff --git a/e107_plugins/_blank/e_search.php b/e107_plugins/_blank/e_search.php new file mode 100644 index 000000000..9d7941515 --- /dev/null +++ b/e107_plugins/_blank/e_search.php @@ -0,0 +1,91 @@ + "Blank Plugin", + 'table' => 'blank', + + 'advanced' => array( + 'date' => array('type' => 'date', 'text' => LAN_DATE_POSTED), + 'author'=> array('type' => 'author', 'text' => LAN_SEARCH_61) + ), + + 'return_fields' => array('blank_id', 'blank_nick', 'blank_message', 'blank_datestamp'), + 'search_fields' => array('blank_nick' => '1', 'blank_message' => '1'), // fields and weights. + + 'order' => array('blank_datestamp' => 'DESC'), + 'refpage' => 'chat.php' + ); + + + return $search; + } + + + + /* Compile Database data for output */ + function compile($row) + { + $tp = e107::getParser(); + + preg_match("/([0-9]+)\.(.*)/", $row['blank_nick'], $user); + + $res = array(); + + $res['link'] = e_PLUGIN."blank_menu/_blank.php?".$row['blank_id'].".fs"; + $res['pre_title'] = LAN_SEARCH_7; + $res['title'] = $user[2]; + $res['summary'] = $row['blank_message']; + $res['detail'] = $tp->toDate($row['blank_datestamp'], "long"); + + return $res; + + } + + + + /** + * Optional - Advanced Where + * @param $parm - data returned from $_GET (ie. advanced fields included. in this case 'date' and 'author' ) + */ + function where($parm='') + { + $tp = e107::getParser(); + + $qry = ""; + + if (vartrue($parm['time']) && is_numeric($parm['time'])) + { + $qry .= " blank_datestamp ".($parm['on'] == 'new' ? '>=' : '<=')." '".(time() - $parm['time'])."' AND"; + } + + if (vartrue($parm['author'])) + { + $qry .= " blank_nick LIKE '%".$tp -> toDB($parm['author'])."%' AND"; + } + + return $qry; + } + + +} + diff --git a/e107_plugins/_blank/e_shortcode.php b/e107_plugins/_blank/e_shortcode.php new file mode 100644 index 000000000..659f07910 --- /dev/null +++ b/e107_plugins/_blank/e_shortcode.php @@ -0,0 +1,25 @@ + '_blank', // default alias '_blank'. {alias} is substituted with this value below. Allows for customization within the admin area. + 'regex' => '^{alias}/?$', // matched against url, and if true, redirected to 'redirect' below. + 'sef' => '{alias}', // used by e107::url(); to create a url from the db table. + 'redirect' => '{e_PLUGIN}_blank/_blank.php', // file-path of what to load when the regex returns true. + + ); + + + $config['index'] = array( + 'regex' => '^_blank/?$', // matched against url, and if true, redirected to 'redirect' below. + 'sef' => '_blank', // used by e107::url(); to create a url from the db table. + 'redirect' => '{e_PLUGIN}_blank/blank.php', // file-path of what to load when the regex returns true. + + ); + + return $config; + } + + + +} \ No newline at end of file diff --git a/e107_plugins/_blank/e_user.php b/e107_plugins/_blank/e_user.php new file mode 100644 index 000000000..4551652ed --- /dev/null +++ b/e107_plugins/_blank/e_user.php @@ -0,0 +1,27 @@ + array('label' => "Label", 'text' => "Some text to display", 'url'=> e_PLUGIN_ABS."_blank/blank.php") + ); + + return $var; + } + +} \ No newline at end of file