Changeset 1899449
- Timestamp:
- 06/26/2018 05:44:07 PM (8 years ago)
- Location:
- yournewsapp/trunk
- Files:
-
- 8 edited
-
classes/lang.php (modified) (1 diff)
-
classes/lang/app_trans_de.php (modified) (1 diff)
-
include/nh_ynaa_content.php (modified) (1 diff)
-
include/nh_ynaa_homepresets.php (modified) (4 diffs)
-
include/nh_ynaa_search.php (modified) (3 diffs)
-
include/nh_ynaa_teaser.php (modified) (6 diffs)
-
nh_ynaa_plugin.php (modified) (16 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
yournewsapp/trunk/classes/lang.php
r1631070 r1899449 171 171 'Search_NoResultViewTitle'=>'No results found.', 172 172 'Search_InputPlaceholder'=>'Search...', 173 'No Events'=>'No Events' 173 'No Events'=>'No Events', 174 'sendmessage_errormessage'=>'Your device has not installed an app to send emails.', 175 'sharing_errormessage'=> 'Your device has not installed an app to share the content.', 176 'PDF_Download_Alert_Override_File'=> 'Are you sure you want to replace the existing file "#TITLE#" ?', 177 'PDF_Download_Alert_Override_File_yes'=> 'Replace file', 178 'PDF_Download_Alert_Override_File_cancel'=> 'Cancel', 179 'PDF_Download_Alert_downloading'=> 'Downloading...', 180 'PDF_Download_Alert_Install_PDFViewer_button'=> 'OK', 181 'PDF_Download_Alert_Install_PDFViewer'=> 'Please install a PDF Viewer to open this file.', 182 'PDF_Download_Alert__downloading_Error'=> 'An error occurred while downloading. Please try again later.' 183 184 174 185 )); 175 186 -
yournewsapp/trunk/classes/lang/app_trans_de.php
r1631070 r1899449 95 95 'Search_NoResultViewTitle'=>'Keine Suchergebnisse gefunden.', 96 96 'Search_InputPlaceholder'=>'Suchen...', 97 'No Events'=>'Keine Veranstaltungen' 97 'No Events'=>'Keine Veranstaltungen', 98 'sendmessage_errormessage'=>'Ihr Gerät hat keine App zum Versenden von EMails installiert.', 99 'sharing_errormessage'=>'Ihr Gerät hat keine App zum Teilen des Inhalts installiert.', 100 'PDF_Download_Alert_Override_File'=> 'Möchten Sie die vorhandene Datei "#TITLE#" wirklich ersetzen?', 101 'PDF_Download_Alert_Override_File_yes'=> 'Datei ersetzen', 102 'PDF_Download_Alert_Override_File_cancel'=> 'Abbrechen', 103 'PDF_Download_Alert_downloading'=> 'Wird heruntergeladen...', 104 'PDF_Download_Alert_Install_PDFViewer_button'=> 'OK', 105 'PDF_Download_Alert_Install_PDFViewer'=> 'Bitte installieren Sie einen PDF Viewer, um diese Datei zu öffnen.', 106 'PDF_Download_Alert__downloading_Error'=> 'Es ist ein Fehler beim Download aufgetreten. Bitte versuchen Sie es später erneut.' 107 98 108 ); 99 109 ?> -
yournewsapp/trunk/include/nh_ynaa_content.php
r1631070 r1899449 79 79 } 80 80 81 81 #wpadminbar { 82 display:none; 83 } 82 84 '; 83 85 if($this->css_settings['css']) $this->general_settings['css'] = $this->css_settings['css']; -
yournewsapp/trunk/include/nh_ynaa_homepresets.php
r1681303 r1899449 63 63 $returnarray['error']=$this->nh_ynaa_errorcode(23); 64 64 } 65 } elseif ($this->homepreset_settings['homescreentype']==1 || $this->homepreset_settings['homescreentype']==2) { 65 } 66 elseif ($this->homepreset_settings['homescreentype']==1 || $this->homepreset_settings['homescreentype']==2) { 66 67 $returnarray['homescreentype']=(int)$this->homepreset_settings['homescreentype']; 67 68 $returnarray['sorttype']=$this->homepreset_settings['sorttype']; 68 } else { 69 } 70 else { 69 71 if ($this->homepreset_settings['items']) { 70 72 $returnarray['changes']=1; … … 116 118 $items['articles']['items'][0]['post_type'] = ''; 117 119 $extraRequestParam = ''; 120 if(isset($hp['type'])) $extraRequestParam = '&'.$this->prefix.'type='.$hp['type']; 118 121 if ($hp['type'] == 'cat') { 119 122 $cat_id = (int) $hp['id']; … … 157 160 $items['articles']['items'][0]['timestamp']=$event['events']['items'][0]['timestamp']?:0; 158 161 $items['articles']['items'][0]['publish_timestamp']=$event['events']['items'][0]['publish_timestamp']?:0; 162 if ($hp['img']) { 163 $img = $hp['img']; 164 } 159 165 if (!$img) { 160 166 $img = $event['events']['items'][0]['thumb']; … … 219 225 } 220 226 else { 227 228 $extraRequestParam= '&'.$this->prefix.'type='.$hp['type']; 221 229 $post_categories = wp_get_post_categories($hp['id']); 222 230 if ($post_categories) { -
yournewsapp/trunk/include/nh_ynaa_search.php
r1681303 r1899449 34 34 $prefix = ''; 35 35 if(isset($_GET['nh_prefix'])) $prefix = '_'.$_GET['nh_prefix']; 36 if (isset($allsearch->posts) ) {36 if (isset($allsearch->posts) ) { 37 37 foreach ($allsearch->posts as $post) { 38 38 // var_dump($post); … … 83 83 84 84 $returnarray = apply_filters('nh_search_array_total', $returnarray, $_POST); 85 $totalsearch = new WP_Query("s=" . $_POST['search'] . "&showposts=-1"); 85 // BLAAPP-281 remove trim 86 // if(isset($_POST['search'])&& trim($_POST['search'])) $totalsearch = &new WP_Query("s=" . $_POST['search'] . "&showposts=-1"); 87 if(isset($_POST['search'])&& trim($_POST['search'])) $totalsearch = new WP_Query("s=" . $_POST['search'] . "&showposts=-1"); 88 else $totalsearch->post_count = (int)wp_count_posts('post')->publish; 86 89 $returnarray['total'] = $totalsearch->post_count; 87 90 … … 92 95 else { 93 96 $returnarray['elemets'][] = array('pos'=>1,'name'=>'search','label'=>__('Search','nh-ynaa'), 'placeholder'=>__('Search...','nh-ynaa'), 'type'=>'text', 'required'=>1, 'group'=>'gp1' ); 97 $returnarray['elements'] = $returnarray['elemets']; 94 98 95 99 -
yournewsapp/trunk/include/nh_ynaa_teaser.php
r1681303 r1899449 72 72 $item['title'] = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); },$item['title']); 73 73 $item['title'] = html_entity_decode($item['title']); 74 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => 'cat', 'id'=> (int) $teaser['id'], 'title'=> $item['title'], 'thumb'=>$this->nh_relativeToAbsolutePath($item['img']), 'cat_id'=>(int) $teaser['id'], 'post_ts'=>0, 'post_date'=>0 );74 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => 'cat', 'id'=> (int) $teaser['id'], 'title'=> $item['title'], 'thumb'=>$this->nh_relativeToAbsolutePath($item['img']), 'cat_id'=>(int) $teaser['id'], 'post_ts'=>0, 'post_date'=>0, 'extraRequestParam'=>'&'.$this->prefix.'type='.$teaser['type']); 75 75 $i++; 76 76 continue; … … 80 80 $teaser['title'] = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); },$teaser['title']); 81 81 $teaser['title'] = html_entity_decode($teaser['title']); 82 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => 'webview', 'id'=> (int) $teaser['id'], 'item_id'=>-3, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0, 'url'=>$teaser['url'] );82 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => 'webview', 'id'=> (int) $teaser['id'], 'item_id'=>-3, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0, 'url'=>$teaser['url'], 'extraRequestParam'=>'&'.$this->prefix.'type='.$teaser['type']); 83 83 $i++; 84 84 continue; … … 88 88 $teaser['title'] = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); },$teaser['title']); 89 89 $teaser['title'] = html_entity_decode($teaser['title']); 90 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => $teaser['type'], 'id'=> (int) $teaser['id'], 'item_id'=>-3, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0 );90 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => $teaser['type'], 'id'=> (int) $teaser['id'], 'item_id'=>-3, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0, 'extraRequestParam'=>'&'.$this->prefix.'type='.$teaser['type']); 91 91 $i++; 92 92 continue; … … 100 100 continue; 101 101 } 102 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => $teaser['type'], 'id'=> (int) $teaser['id'], 'item_id'=>null, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0 );102 $returnarray['items'][]=array('pos'=>(int)$i, 'apectFill'=>1, 'type' => $teaser['type'], 'id'=> (int) $teaser['id'], 'item_id'=>null, 'title'=> $teaser['title'], 'thumb'=>$teaser['img'], 'cat_id'=>0, 'post_ts'=>0, 'post_date'=>0, 'extraRequestParam'=>'&'.$this->prefix.'type='.$teaser['type']); 103 103 $i++; 104 104 continue; … … 146 146 } 147 147 else{ 148 148 //var_dump($this->teaser_settings); 149 149 if($this->teaser_settings['source']=='cat' && !$this->teaser_settings['source']){ 150 150 … … 236 236 $returnarray['error']=$this->nh_ynaa_errorcode(18); 237 237 } 238 $returnarray['timestamp']= $ts;238 $returnarray['timestamp']= (int)$ts; 239 239 240 240 } -
yournewsapp/trunk/nh_ynaa_plugin.php
r1681303 r1899449 2 2 /* 3 3 Plugin Name: Blappsta Plugin 4 Version: 0.8.8. 74 Version: 0.8.8.8 5 5 6 6 Plugin URI: http://wordpress.org/plugins/yournewsapp/ … … 20 20 //Temp fix folder problem 21 21 global $nh_ynaa_version; 22 $nh_ynaa_version = "0.8.8. 7";22 $nh_ynaa_version = "0.8.8.8"; 23 23 global $nh_ynaa_db_version; 24 24 $nh_ynaa_db_version=1.2; … … 1944 1944 date_default_timezone_set('UTC'); 1945 1945 } 1946 1946 //global $wpdb; 1947 // $wpdb->insert('temp', array('value'=>'blappsta_plugin', 'text'=>serialize($_GET))); 1947 1948 if ($this->general_settings['json_embedded']) { 1948 1949 $header = 'Content-Type: text/plain; charset=UTF-8'; … … 2001 2002 echo($json); 2002 2003 echo $end; 2004 // $wpdb->insert('temp', array('value'=>'blappsta_article', 'text'=>serialize($json))); 2003 2005 //$out1 = ob_get_contents(); 2004 2006 … … 2051 2053 header('Content-Type: text/html;charset=UTF-8'); 2052 2054 echo($this->nh_ynaa_content()); 2055 2056 // echo apply_filters('nh_html_content_last', $this->nh_ynaa_content());; 2053 2057 } elseif ($ynaa_var=='yna_settings' || $ynaa_var==$_GET['nh_prefix'].'_yna_settings') { 2054 2058 header($header); … … 2069 2073 echo $end; 2070 2074 } 2075 2071 2076 exit(); 2072 2077 } // END public function nh_ynaa_template_redirect() … … 2170 2175 private function nh_ynaa_articles($id=0, $lim=0, $size=false, $intern = false) 2171 2176 { 2177 do_action('nh_ynaa_articles_pre'); 2172 2178 $allowRemove=1; 2173 2179 $returnarray['error']=$this->nh_ynaa_errorcode(0); … … 2201 2207 2202 2208 if (($_GET[$this->requesvar['option']]==1 && $_GET[$this->requesvar['sorttype']])) { 2209 2203 2210 //$returnarray['uma']['switch'][] = '($_GET[$this->requesvar[\'option\']]==1 && $_GET[$this->requesvar[\'sorttype\']])'; 2204 2211 // The Query … … 2396 2403 $returnarray = apply_filters('nh_articles_array_option', $returnarray); 2397 2404 return array('articles'=>$returnarray); 2398 } elseif (isset($_GET[$this->requesvar['id']]) || $id) { 2405 } 2406 elseif (isset($_GET[$this->requesvar['id']]) || $id) { 2399 2407 $returnarray['changes']=0; 2400 2408 //PostID … … 2560 2568 // $post_ids = false; 2561 2569 if (!$post_ids) { 2562 //var_dump($this->categories_settings); 2570 //var_dump($this->categories_settings); die(); 2563 2571 $orderby = 'date'; 2564 2572 $order = 'DESC'; … … 2637 2645 $returnarray['error']=$this->nh_ynaa_errorcode(15); 2638 2646 } 2639 2647 // var_dump($returnarray); 2640 2648 $returnarray = apply_filters('nh_articles_array', $returnarray); 2641 2649 return array('articles'=>$returnarray); … … 2672 2680 private function nh_ynaa_article() 2673 2681 { 2682 do_action('nh_ynaa_article_pre'); 2674 2683 $returnarray['error']=$this->nh_ynaa_errorcode(0); 2675 2684 require 'include/nh_ynaa_article.php'; … … 3117 3126 $i++; 3118 3127 } 3119 } else { 3128 } 3129 else { 3120 3130 $returnarray['error']=$this->nh_ynaa_errorcode(22); 3121 3131 $ts = time(); … … 3597 3607 { 3598 3608 update_option('nh_ynaa_categories_settings_ts', time()); 3609 update_option('nh_ynaa_teaser_settings_ts', time()); 3610 3599 3611 /* 3600 3612 * We need to verify this came from the our screen and with proper authorization, … … 4542 4554 { 4543 4555 global $post; 4556 4557 if(isset($_GET['post'])) $post = get_post($_GET['post']); 4544 4558 $cat = wp_get_post_categories($post->ID); 4545 4559 if ($cat) { … … 4602 4616 4603 4617 if(data && data.indexOf("Send successful")!=-1) alert('Push send success.'); 4604 else alert(data);4618 else alert(data); 4605 4619 } 4606 4620 $('#nh_ynaa_sendpush').prop('disabled', false); -
yournewsapp/trunk/readme.txt
r1681303 r1899449 6 6 Requires at least: 3.3.0 7 7 Tested up to: 4.7.3 8 Stable tag: 0.8.8. 78 Stable tag: 0.8.8.8 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 82 82 == Change Log == 83 = 0.8.8. = 84 - fix push post id bug 85 86 = 0.8.8.7.1 = 87 - add type to extraRequestParam in homepresets & teaser JSONS 88 - add action nh_ynaa_article_pre, nh_ynaa_articles_pre 89 83 90 = 0.8.8.7 = 84 91 - fix push coding bug … … 472 479 473 480 == Upgrade Notice == 481 = 0.8.8. = 482 - fix push post id bug 483 474 484 = 0.8.8.7 = 475 485 - fix push coding bug
Note: See TracChangeset
for help on using the changeset viewer.