Plugin Directory

Changeset 1430832


Ignore:
Timestamp:
06/05/2016 01:06:38 PM (10 years ago)
Author:
aghajoon
Message:

Update bp-stickers 1.4 fixed css/bp-sticker.css.

Location:
buddypress-sticker/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • buddypress-sticker/trunk/bp-sticker.php

    r1221429 r1430832  
    33/*
    44 * Plugin Name: Bp Stickers
    5  * Version: 1.3
     5 * Version: 1.4
    66 * Author: asghar hatampoor
    77 * Author URI: http://webcaffe.ir
     
    1212
    1313if ( !defined( 'BPST_PLUGIN_VERSION' ) )
    14     define( 'BPST_PLUGIN_VERSION', '1.3.0' );
     14    define( 'BPST_PLUGIN_VERSION', '1.4.0' );
    1515
    1616if ( !defined( 'BPST_PLUGIN_DIRNAME' ) )
     
    9393         $filename =  preg_replace('/.[^.]*$/', '', $codes);
    9494         $icon = BPST_PLUGIN_URL. 'images/sticons/'. $imgs.'';
    95          $html.="<img src='$icon' data-code=':$filename:' class='smiley' /> ";
     95         $html.="<img src='$icon' data-code=':$filename:' class='bpsmiley' /> ";
    9696        }   
    9797     $html .="</div>";
     
    102102
    103103function replace_with_st(){
    104 $dir = BPST_PLUGIN_DIR."images/sticons/";
    105 if ($opendir = opendir($dir)) {
     104$images_dir = BPST_PLUGIN_DIR."images/sticons/";
     105if ($opendir = opendir($images_dir)) {
     106$file_display = array(
     107    'jpg',
     108    'jpeg',
     109    'png',
     110    'gif'
     111);
    106112  $images=array();
     113  $times = array();
    107114  while (($file = readdir($opendir)) !==FALSE) {
    108    if($file != "." && $file != "..") {
    109     $images["$file"]=$file;
     115  $file_type = strtolower(end(explode('.', $file)));
     116
     117   if($file != "." && $file != ".."&& in_array($file_type, $file_display) == true) {
     118    $images["$file"]=$file; 
     119     $times[] = filemtime($images_dir  . $file) . ',' . $file;
    110120   }
    111   }
    112 }
     121    }
     122 
     123   closedir($opendir);
     124}
    113125
     126array_multisort($images, SORT_NUMERIC, $times);
    114127   return $images;     
    115128   }
  • buddypress-sticker/trunk/css/bp-sticker.css

    r1221429 r1430832  
    11
    22
    3 .smiley{
     3.bpsmiley{
    44display: inline !important;
    55border: medium none !important;
  • buddypress-sticker/trunk/js/bp-sticker.js

    r1221429 r1430832  
    3535});
    3636jq(document).ready(function(){
    37 jq('.smiley').live('click',function(){
     37jq('.bpsmiley').live('click',function(){
    3838   
    3939    var $this=$(this);
  • buddypress-sticker/trunk/readme.txt

    r1221429 r1430832  
    33Tags: BuddyPress, activity, Sticker, message
    44Requires at least: 3.8
    5 Tested up to: 4.2
    6 Stable tag: 1.3.0
     5Tested up to: 4.5
     6Stable tag: 1.4.0
    77
    88BuddyPress stickers Allow Users to add stickers in activity posts and message by clicking on icons
     
    3535
    3636== Changelog ==
     37= 1.4.0 =
     38- Added new stickers.
     39- Fixed css .
     40- Fixed show stickers sort by date .
     41
    3742= 1.3.0 =
    3843- Fixed ajax load stickers in comment.
Note: See TracChangeset for help on using the changeset viewer.