Plugin Directory

Changeset 1187794


Ignore:
Timestamp:
06/25/2015 10:14:14 PM (11 years ago)
Author:
sanderonline
Message:

Bugfixes and added some new stuff

Location:
oypie/trunk
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • oypie/trunk/js/text-button.js

    r1186453 r1187794  
    2929                                label: 'Mapnavigatie',
    3030                                'values': [
    31                                     {text: 'Ja', value: ' nonav="1"'},
    32                                     {text: 'Nee', value: ''}
     31                                    {text: 'Ja', value: ''},
     32                                    {text: 'Nee', value: ' nonav="1"'}
    3333                                ]
    3434                            },{
     
    3737                                label: 'Transparantheid',
    3838                                'values': [
    39                                     {text: 'Ja', value: ' trans="1"'},
    40                                     {text: 'Nee', value: ''}
     39                                    {text: 'Nee', value: ''},
     40                                    {text: 'Ja', value: ' trans="1"'}
     41                                ]
     42                            },{
     43                                type: 'listbox',
     44                                name: 'voorkeuren',
     45                                label: 'Voorkeursinstellingen',
     46                                'values': [
     47                                    {text: 'Nee', value: ''},
     48                                    {text: 'Ja', value: ' pref="1"'}
    4149                                ]
    4250                            },{
     
    5462                    onclick: function() {
    5563                        editor.windowManager.open( {
    56                             title: 'Album toevoegen',
     64                            title: 'Prijslijst toevoegen',
    5765                            body: [{
    5866                                type: 'listbox',
  • oypie/trunk/oypie.php

    r1186464 r1187794  
    44Plugin URI: http://sanderonlinemedia.nl/oypie;
    55Description: This plugin is for photographers who use the service 'OYPO'. In this plugin you can generate shortcodes for your pages and posts. The shortcode generator can you find under 'Tools' > 'SanderOnline'.
    6 Version: 1.1.1
     6Version: 1.1.2
    77Author: SanderOnline Media / Sander Dijkstra
    88Author URI: http://sander-dijkstra.nl/
     
    1010*/
    1111
    12 include("shortcode.php");
    13 include("widget.php");
    14 
    15 // Add OYPO
    16 
     12// Load shortcodes and widget
     13require_once("shortcode.php");
     14require_once("widget.php");
    1715
    1816// Add options page
    1917add_action( 'admin_menu', 'oypie_menu' );
    20 
    21 
    2218
    2319wp_enqueue_script('jquery');
     
    2521function oypie_menu() {
    2622    add_menu_page("", "OYPie", 'oypie', "oypie", "oypie_home_page",'dashicons-camera', 76 );
    27     add_submenu_page("oypie", "OYPie - Help", "Help", 0, "oypie_help", "oypie_help_page");
     23    add_submenu_page("oypie", "OYPie - Help", "Informatie", 0, "oypie_help", "oypie_help_page");
     24    add_submenu_page("oypie", "OYPie - Albumgenerator", "Albumgenerator", 0, "oypie_album", "oypie_album_page");
     25    add_submenu_page("oypie", "OYPie - Prijslijstgenerator", "Prijslijstgenerator", 0, "oypie_price", "oypie_price_page");
     26    add_submenu_page("oypie", "OYPie - Voorkeuren", "Voorkeuren", 0, "oypie_preference", "oypie_preference_page");
    2827    remove_submenu_page( 'oypie', 'oypie' );
    2928}
     
    3332   
    3433function oypie_price_page() {
    35     require_once("price_page.php");
     34    require_once("pages/price.php");
    3635    }
    3736   
    3837function oypie_help_page() {
    39     require_once("help_page.php");
     38    require_once("pages/help.php");
    4039    }
    4140
    4241function oypie_album_page() {
    43     require_once("album_page.php");
     42    require_once("pages/album.php");
     43}
     44function oypie_preference_page() {
     45    require_once("pages/preference.php");
    4446}
    4547
     
    7476add_action('admin_enqueue_scripts', 'oypie_tc_css');
    7577
     78function oypie_admin_css() {
     79    wp_enqueue_style('oypie', plugins_url('css/admin.css', __FILE__));
     80}
     81 
     82add_action('admin_enqueue_scripts', 'oypie_admin_css');
    7683?>
  • oypie/trunk/readme.txt

    r1186464 r1187794  
    2727
    2828== Changelog ==
     29
     30= 1.1.2 =
     31Preferences added, old shortcode generators have been updated.
     32
    2933
    3034= 1.1.1 =
  • oypie/trunk/shortcode.php

    r939329 r1187794  
    55 */
    66function oypo_output($atts) {
     7   
    78   extract(shortcode_atts(array(
    89      'type' => '',
    910      'id' => '',
    1011      'wl' => '',
    11       'trans' => '1',
    12       'nonav' => '1',
     12      'trans' => '',
     13      'nonav' => '',
    1314      'css' => '',
    14       'colors' => ''
     15      'colors' => '',
     16      'pref' => ''
    1517   ), $atts));
    1618   
     19   
     20   if($pref == '1') {
     21    // Load preferences
     22    global $wpdb;
     23    $preferences = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'oypie_pref'");
     24    $preferences = explode('\/', $preferences);
     25   
     26    // Set preferences, this overrules the settings of the shortcode!
     27    if($preferences[1] != NULL){
     28    $colors = $preferences[1];
     29    }
     30    if($preferences[2] != NULL){
     31    $css = $preferences[2];
     32    }
     33    if($preferences[3] != NULL){
     34    $wl = $preferences[3];
     35    }
     36    if($preferences[4] != NULL){
     37    $trans = $preferences[4];
     38    }
     39       
     40   }
     41
    1742   $identical = $id;
    1843   
     
    2752    $out_id = "";
    2853   }
    29 
     54   
    3055   //Transparcency
    3156   if($trans == 1) {
     
    5277   //Custom css link
    5378   if($css != NULL){
    54     $array = get_headers($css);
    55     $string = $array[0];
    56     if(strpos($string,"200")) {
    5779        $out_css = "var css='".$css."';
    5880        ";
    5981    } else {
    60         $out_css = "";
    61     }
    62     }else{
    6382        $out_css = "";
    6483    }
Note: See TracChangeset for help on using the changeset viewer.