Plugin Directory

Changeset 1787169


Ignore:
Timestamp:
12/14/2017 05:02:34 PM (8 years ago)
Author:
thekrotek
Message:

Updated stuff.

Location:
recent-topics-for-ipboard/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • recent-topics-for-ipboard/trunk/helpers/fields.php

    r1441522 r1787169  
    44# ------------------------------------------------------------------------
    55# The Krotek
    6 # Copyright (C) 2011-2016 thekrotek.com. All Rights Reserved.
     6# Copyright (C) 2011-2017 thekrotek.com. All Rights Reserved.
    77# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
    88# Website: http://thekrotek.com
  • recent-topics-for-ipboard/trunk/helpers/widget.php

    r1482973 r1787169  
    44# ------------------------------------------------------------------------
    55# The Krotek
    6 # Copyright (C) 2011-2016 thekrotek.com. All Rights Reserved.
     6# Copyright (C) 2011-2017 thekrotek.com. All Rights Reserved.
    77# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
    88# Website: http://thekrotek.com
  • recent-topics-for-ipboard/trunk/ipbrecent.php

    r1483875 r1787169  
    128128                            $query .= "LEFT JOIN ".$this->prefix."core_sys_lang AS l ON lang_default = 1 ";
    129129                            $query .= "LEFT JOIN ".$this->prefix."core_sys_lang_words AS w ON (w.word_key = CONCAT('forums_forum_', f.id) AND w.lang_id = l.lang_id) ";
    130                             $query .= "WHERE t.forum_id".($forums ? ($this->getOption('action', 'exclude') == "exclude" ? " NOT IN" : " IN")." (".implode(', ', $forums).")" : "");
    131                             $query .= (!$this->getOption('closed', '0') ? " AND t.state = 'open' AND t.approved > 0" : "")." ";
    132                             $query .= ($this->getOption('empty', '0') ? " AND t.posts <= 1 " : "");
    133                             $query .= "ORDER BY t.last_post DESC LIMIT 0, ".$this->getOption('topics', '5');
     130
     131                            $where = array();
     132       
     133                            if ($forums) {
     134                                $where[] = "t.forum_id ".($this->getOption('action', 'exclude') == "exclude" ? "NOT IN" : "IN")." (".implode(', ', $forums).")";
     135                            }
     136       
     137                            if (!$this->getOption('closed', '0')) {
     138                                $where[] = "t.state = 'open' AND t.approved > 0";
     139                            }
     140       
     141                            if ($this->getOption('empty', '0')) {
     142                                $where[] = "t.posts <= 1";
     143                            }
     144                           
     145                            $query .= "WHERE ".implode(" AND ", $where)." ORDER BY t.last_post DESC LIMIT 0, ".$this->getOption('topics', '5');
    134146
    135147                            $topics = $ipbdb->get_results($query, 'ARRAY_A');
     
    149161                                $query .= "FROM ".$this->prefix."forums_posts AS p ";
    150162                                $query .= "LEFT JOIN ".$this->prefix."core_members AS m ON m.member_id = p.author_id ";
    151                                 $query .= "WHERE p.topic_id = ".esc_attr($topic['topic_id'])." ORDER BY p.pid ".($postmode == 'first' ? "ASC" : "DESC")." LIMIT 0, 1";
     163
     164                                $where = array();
     165                   
     166                                $where[] = "p.queued = 0";
     167                                $where[] = "p.pdelete_time = 0";
     168                                $where[] = "p.topic_id = ".esc_attr($topic['topic_id']);
     169                               
     170                                $query .= "WHERE ".implode(" AND ", $where)." ORDER BY p.pid ".($postmode == 'first' ? "ASC" : "DESC")." LIMIT 0, 1";
    152171
    153172                                $post = $ipbdb->get_row($query, 'ARRAY_A');
  • recent-topics-for-ipboard/trunk/readme.txt

    r1482973 r1787169  
    55Tags: forum, forum bridge, ipboard, ips community suite, recent topics, forum topics
    66Requires at least: 4.0
    7 Tested up to: 4.6
     7Tested up to: 4.9.0
    88Stable tag: 1.0.0
    99License: GPLv2 or later
  • recent-topics-for-ipboard/trunk/settings.php

    r1441522 r1787169  
    44# ------------------------------------------------------------------------
    55# The Krotek
    6 # Copyright (C) 2011-2016 thekrotek.com. All Rights Reserved.
     6# Copyright (C) 2011-2017 thekrotek.com. All Rights Reserved.
    77# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
    88# Website: http://thekrotek.com
Note: See TracChangeset for help on using the changeset viewer.