piersoft
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: RSS feed title doubledinstead remove wp_title_rss(), remove bloginfo_rss(‘name’);
so when you use https://domain.com/?feed=rss2&cat=5 for example, your title rss will be: Title ? Category Archive
Forum: Plugins
In reply to: [EasyAPNs] [Plugin: EasyAPNs] increment Badgei’ve used:
/**
* Increment Message Badge
*
*
* <?php
* $db = new DbConnect();
* $db->show_errors();
* $apns = new APNS($db);
* $apns->newMessage(1, '2010-01-01 00:00:00');
* $apns->incrementMessageBadge(1); // HAS TO BE A NUMBER
* $apns->queueMessage();
* ?>
*
*
* @param int $number
* @access public
*/
public function incrementMessageBadge($number=NULL){
if(!$this->message) $this->_triggerError(‘Must use newMessage() before calling this method.’, E_USER_ERROR);
if($number) {
$sql = “SELECTapns_messages
.message
FROMapns_messages
INNER JOINapns_devices
ONapns_messages
.fk_device
=apns_devices
.pid
ANDapns_devices
.modified
<apns_messages
.modified
WHEREapns_devices
.pid
= ‘{$this->message[‘send’][‘to’]}’ ORDER BY `a$
if($result = $this->db->query($sql)) {
if($result->num_rows) {
while($row = $result->fetch_array(MYSQLI_ASSOC)) {
$last_message = json_decode($row[‘message’]);
}
}
}
if(isset($last_message)) {
$number += (int)$last_message->aps->badge;
}
if(isset($this->message[‘aps’][‘badge’])) $this->_triggerError(‘Message Badge has already been created. Overwriting with ‘.$number.’.’);
$this->message[‘aps’][‘badge’] = (int)$number;
}
}with “.$wpdb->prefix.” before .apsXXX and in apns.php i’ve substituted addMessageBadge(1) with incrementMessageBadge(1) but don’t works!!
please helpme
Forum: Plugins
In reply to: [EasyAPNs] Solved: delivery time don't setexcuse me. don’t work correctly.