Plugin Directory

Changeset 1209824


Ignore:
Timestamp:
07/30/2015 04:39:13 PM (11 years ago)
Author:
aghajoon
Message:

UPDATE NEW VERSION BpStickers

Location:
buddypress-sticker/trunk
Files:
74 added
74 deleted
3 edited

Legend:

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

    r1175909 r1209824  
    33/*
    44 * Plugin Name: Bp Stickers
    5  * Version: 1.0
     5 * Version: 1.1
    66 * Author: asghar hatampoor
    77 * Author URI: http://webcaffe.ir
     
    1212
    1313if ( !defined( 'BPST_PLUGIN_VERSION' ) )
    14     define( 'BPST_PLUGIN_VERSION', '1.0.0' );
     14    define( 'BPST_PLUGIN_VERSION', '1.1.0' );
    1515
    1616if ( !defined( 'BPST_PLUGIN_DIRNAME' ) )
     
    6767      <div class='smiley-buttons'style='display: none;'>";
    6868     
    69      foreach (self::replace_with_st() as $codes => $imgs) {     
     69     
     70    foreach (self::replace_with_st() as $codes => $imgs) {     
     71         $filename =  preg_replace('/.[^.]*$/', '', $codes);
    7072         $icon = BPST_PLUGIN_URL. 'images/sticons/'. $imgs.'';
    71          $html.="<img src='$icon' data-code='$codes' class='smiley' /> ";
    72           }
    73    
     73         $html.="<img src='$icon' data-code=':$filename:' class='smiley' /> ";
     74          }
    7475     $html .="</div>";
    7576     echo apply_filters( 'list_stickers',$html);   
    7677    }
     78   
     79function replace_with_st(){
     80$dir = BPST_PLUGIN_DIR."images/sticons/";
     81if ($opendir = opendir($dir)) {
     82  $images=array();
     83  while (($file = readdir($opendir)) !==FALSE) {
     84   if($file != "." && $file != "..") {
     85    $images["$file"]=$file;
     86   }
     87  }
     88}
    7789
    78 function replace_with_st(){     
    79             if ( !isset( $icons ) ) {
    80         $icons = array(
    81             ':A:' => "st_1.png",
    82             ':B:' => "st_2.png",
    83             ':C:' => "st_3.png",
    84             ':D:' => "st_4.png",
    85             ':F:' => "st_5.png",
    86             ':G:' => "st_6.png",
    87             ':H:' => "st_7.png",
    88             ':I:' => "st_8.png",
    89             ':J:' => "st_9.png",
    90             ':K:' => "st_10.png",
    91             ':L:' => "st_11.png",
    92             ':M:' => "st_12.png",
    93             ':N:' => "st_13.png",
    94             ':O:' => "st_14.png",
    95             ':P:' => "st_15.png",
    96             ':Q:' => "st_16.png",
    97             ':R:' => "st_17.png",
    98             ':S:' => "st_18.png",
    99             ':T:' => "st_19.png",
    100             ':U:' => "st_20.png",
    101             ':V:' => "st_21.png",
    102             ':W:' => "st_22.png",
    103             ':X:' => "st_23.png",
    104             ':Y:' => "st_24.png",
    105             ':Z:' => "st_25.png",
    106             ':AA:' => "st_26.png",
    107             ':AB:' => "st_27.png",
    108             ':AC:' => "st_28.png",
    109             ':AD:' => "st_29.png",
    110             ':AF:' => "st_30.png",
    111             ':AG:' => "st_31.png",
    112             ':AH:' => "st_32.png",
    113             ':AI:' => "st_33.png",
    114             ':AJ:' => "st_34.png",
    115             ':AK:' => "st_35.png",
    116             ':AL:' => "st_36.png",
    117             ':AM:' => "st_37.png",
    118             ':AN:' => "st_38.png",
    119             ':AO:' => "st_39.png",
    120             ':AP:' => "st_40.png",
    121             ':AQ:' => "st_41.png",
    122             ':CLAP:' => "st_42.png",
    123             ':LIKE:' => "st_43.png",
    124             ':UNLIKE:' => "st_44.png",
    125             ':(V):' => "st_45.png",
    126             ':QE:' => "st_46.png",
    127             ':EX:' => "st_47.png",
    128             ':ZZZ:' => "st_48.png",
    129             ':POO:' => "st_49.png",
    130             ':Cut1:' => "Cut-the-Rope1.png",
    131             ':Cut2:' => "Cut-the-Rope2.png",
    132             ':Cut3:' => "Cut-the-Rope3.png",
    133             ':Cut4:' => "Cut-the-Rope4.png",
    134             ':Cut5:' => "Cut-the-Rope5.png",
    135             ':Cut6:' => "Cut-the-Rope6.png",
    136             ':Cut7:' => "Cut-the-Rope7.png",
    137             ':Cut8:' => "Cut-the-Rope8.png",
    138             ':Cut9:' => "Cut-the-Rope9.png",
    139             ':Cut10:' => "Cut-the-Rope10.png",
    140             ':Cut11:' => "Cut-the-Rope11.png",
    141             ':Cut12:' => "Cut-the-Rope12.png",
    142             ':Cut13:' => "Cut-the-Rope13.png",
    143             ':Cut14:' => "Cut-the-Rope14.png",
    144             ':Cut15:' => "Cut-the-Rope15.png",
    145             ':Cut16:' => "Cut-the-Rope16.png",
    146             ':Cut17:' => "Cut-the-Rope17.png",
    147             ':Cut18:' => "Cut-the-Rope18.png",
    148             ':Cut19:' => "Cut-the-Rope19.png",
    149             ':Cut20:' => "Cut-the-Rope20.png",
    150             ':Cut21:' => "Cut-the-Rope21.png",
    151             ':Cut22:' => "Cut-the-Rope22.png",
    152             ':Cut23:' => "Cut-the-Rope23.png",
    153             ':Cut24:' => "Cut-the-Rope24.png",
    154            
    155 
    156         );
    157         }
    158         return $icons;
     90   return $images;     
    15991   }
    160 
    16192
    16293function bp_st_translate_sticker( $content) {
    16394    global $bp;
    16495      foreach( self::replace_with_st() as $codes => $imgs) {
     96      $filename = preg_replace('/.[^.]*$/', '', $codes);
    16597      $icon = BPST_PLUGIN_URL. 'images/sticons/'. $imgs.'';
    166            $code[] = $codes;
     98           $code[] =":$filename:";
    16799           $img[] = "<img src='$icon' class='smiley' /> ";                 
    168100        }
  • buddypress-sticker/trunk/css/bp-sticker.css

    r1175909 r1209824  
    1212.bp-smiley-button .buddypress-smiley-button{
    1313    padding: 15px; 
    14   background: url('../images/tm_icon_like.png') no-repeat  ;
     14  background: url('../images/sticon.png') no-repeat  ;
    1515  float: right;
    1616  margin-top: 5px;
  • buddypress-sticker/trunk/readme.txt

    r1175909 r1209824  
    44Requires at least: 3.8
    55Tested up to: 4.2
    6 Stable tag: 1.0.0
     6Stable tag: 1.1.0
    77
    88BuddyPress stickers Allow Users to add stickers in activity posts and message by clicking on icons
     
    1111
    1212BuddyPress stickers Allow Users to add stickers in activity posts and message by clicking on icons
     13
    1314
    1415== Installation ==
     
    2526= What other configurations do I need =
    2627No. This plugin needs no configuration.
     28if need more sticker, you can go to cpanel and upload custom sticker in bp-sticker/images/sticons.
     29
     30
    2731
    2832== Screenshots ==
     
    3236== Changelog ==
    3337
     38= 1.1.0 =
     39- Adedd admin can upload custom stickers in folder plugin(images/sticon).
    3440
    3541= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.