Plugin Directory

Changeset 492697


Ignore:
Timestamp:
01/20/2012 04:05:46 PM (14 years ago)
Author:
boyska
Message:

Version 2012.01

HUGE changeset:

  • wp 3.3 support
  • new inputs
  • brand new configuration style
  • event functionality moved to a separate (and independent) plugin
  • event now have location and generate valid vCalendar entries
  • seo optimization
  • usability fixes
  • ajax improvements
  • admin UI improvements
  • code cleaning & reorganization: easier to write new parts of indypress
Location:
indypress/trunk
Files:
127 added
2 edited

Legend:

Unmodified
Added
Removed
  • indypress/trunk/indypress.php

    r395150 r492697  
    55Plugin URI: http://code.autistici.org/p/indypress
    66Description: Make your WordPress as an Indypendent Media Center
    7 Author: p(A)skao
    8 Version: 0.5.1
    9 Author URI: paskao@hacari.org
     7Author: boyska, paskao
     8Version: 2012.01
     9Author URI:
    1010License: GPL2
    1111Domain Path: ./languages/
    1212*/
    1313
    14 /*
    15 function this_plugin_first() {
    16     // ensure path to this file is via main wp plugin path
    17     $wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR."/$2", __FILE__);
    18     $this_plugin = plugin_basename(trim($wp_path_to_this_file));
    19     $active_plugins = get_option('active_plugins');
    20     $this_plugin_key = array_search($this_plugin, $active_plugins);
    21     if ($this_plugin_key) { // if it's 0 it's the first plugin already, no need to continue
    22         array_splice($active_plugins, $this_plugin_key, 1);
    23         array_unshift($active_plugins, $this_plugin);
    24         update_option('active_plugins', $active_plugins);
    25     }
    26 }
    27 add_action("activated_plugin", "this_plugin_first");
    28 */
     14// CONFIG
     15$indypress_url = plugins_url( '', __FILE__ ) . '/indypress/';
     16$indypress_relative_path = '/wp-content/plugins/' . str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ )) . 'indypress/';
     17$indypress_path = ABSPATH . 'wp-content/plugins/' . str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ )) . 'indypress/';
    2918
    30 // CONFIG
    31 $indypress_url = plugins_url( '', __FILE__ ) . '/';
    32 $indypress_relative_path = '/wp-content/plugins/' . str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ ));
    33 $indypress_path = ABSPATH . 'wp-content/plugins/' . str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ ));
     19require_once( $indypress_path . 'config.php' );
     20require_once( $indypress_path . 'api/publication.php' );
    3421
    35 require_once( 'config.php' );
    3622
    3723/* --- Modified by Cap --- Start section*/
    38 
    3924load_plugin_textdomain('indypress', '', 'indypress/languages');
    40 
    4125/* --- Modified by Cap --- End section*/
    4226
     27require_once( $indypress_path . 'classes/wizard.class.php' );
     28register_activation_hook( __FILE__, 'do_wizard' );
    4329
    44 // CREATE EVENT TYPE
    45 require_once('classes/common.class.php');
    46 $common = new indypress_common();
     30/* Publication inputs: TODO: move it to publication_common or something like that */
     31    include_once( $indypress_path . 'form_inputs/line.php');
     32    include_once( $indypress_path . 'form_inputs/html.php');
     33    include_once( $indypress_path . 'form_inputs/tinymce.php');
     34    include_once( $indypress_path . 'form_inputs/autocomplete.php');
     35    include_once( $indypress_path . 'form_inputs/if.php');
     36    include_once( $indypress_path . 'form_inputs/checkboxes.php');
     37    include_once( $indypress_path . 'form_inputs/select.php');
     38    include_once( $indypress_path . 'form_inputs/upload.php');
     39    include_once( $indypress_path . 'form_inputs/embed.php');
     40    include_once( $indypress_path . 'form_actions/meta.php');
     41    include_once( $indypress_path . 'form_actions/pre_field.php');
     42    include_once( $indypress_path . 'form_actions/if.php');
     43    include_once( $indypress_path . 'form_actions/filter.php');
     44/* Publication inputs end */
     45
     46require_once( $indypress_path . 'classes/upload.class.php' );
     47$indypress_upload = new indypress_upload();
    4748
    4849// ADMIN PANEL MENU
    4950if( is_admin() ) {
    50 
    51 //  add_action('admin_init', array($common, 'indypress_common_init'));
    52 
    53     require_once( 'classes/next-event.php' );
    54     add_action( 'widgets_init', 'load_next_event_widget' );
    55 
    5651    // LOAD ADMIN COMMON
    57     require_once( 'classes/admin.class.php' );
     52    require_once( $indypress_path . 'classes/admin.class.php' );
    5853    $indypress_admin = new indypress_admin();
    5954    // INDYPRESS ADMIN HOOK
    60 //  add_action( 'admin_init', array( $indypress_admin, 'indypress_admin_init' ) );
    6155    add_action( 'indypress_admin_init', array( $indypress_admin, 'indypress_admin' ) );
    6256
    63 
    6457    // LOAD PUBLICATION SETTINGS
    65     require_once( 'classes/publication_settings.class.php' );
     58    require_once( $indypress_path . 'classes/publication_settings.class.php' );
    6659    $indypress_publication_settings = new indypress_publication_settings();
    6760    add_action( 'indypress_admin_init', array( $indypress_publication_settings, 'indypress_publication_settings' ) );
     61    require_once( $indypress_path . 'classes/form_settings.php' );
     62    $indypress_form_settings = new indypress_form_settings();
     63    require_once( $indypress_path . 'classes/newform_settings.php' );
     64    $indypress_newform_settings = new indypress_newform_settings();
    6865
    6966    // LOAD PUBLICATION ADMIN&AJAX
    70     require_once( 'classes/publication_admin.class.php' );
     67    require_once( $indypress_path . 'classes/publication_admin.class.php' );
    7168    $indypress_publication_admin = new indypress_publication_admin();
    7269    add_action( 'indypress_admin_init', array( $indypress_publication_admin, 'indypress_publication_admin' ) );
    7370
    7471    // LOAD HIDING POST
    75     require_once( 'classes/hide_admin.class.php' );
     72    require_once( $indypress_path . 'classes/hide_admin.class.php' );
    7673    $indypress_hide_admin = new indypress_hide_admin();
    7774    add_action( 'indypress_admin_init', array( $indypress_hide_admin, 'indypress_hide_admin' ) );
    7875
    7976    // LOAD SIGNALING POSTS AND COMMENTS
    80     require_once( 'classes/signal_admin.class.php' );
     77    require_once( $indypress_path . 'classes/signal_admin.class.php' );
    8178    $indypress_signal_admin = new indypress_signal_admin();
    8279    add_action( 'indypress_admin_init', array( $indypress_signal_admin, 'indypress_signal_admin' ) );
    8380
    8481    //LOAD LIVEBLOGGING SETTINGS
    85     require_once( 'classes/live-blogging_settings.class.php' );
    86     $indypress_liveblogging_settings = new indypress_liveblogging_settings();
    87     add_action( 'indypress_admin_init', array( $indypress_liveblogging_settings, 'indypress_liveblogging_settings' ) );
     82//    require_once( $indypress_path . 'classes/live-blogging_settings.class.php' );
     83//    $indypress_liveblogging_settings = new indypress_liveblogging_settings();
     84//    add_action( 'indypress_admin_init', array( $indypress_liveblogging_settings, 'indypress_liveblogging_settings' ) );
    8885
    89     require_once( 'classes/visualization-settings.class.php' );
     86    require_once( $indypress_path . 'classes/visualization-settings.class.php' );
    9087    $indypress_visualization_settings = new Indypress_VisualizationSettings();
    9188    add_action( 'indypress_admin_init', array( $indypress_visualization_settings, 'Indypress_VisualizationSettings' ) );
     
    9794    do_action( 'indypress_init' );
    9895
    99 //  add_action('init', array($common, 'indypress_common_init'));
    10096    // LOAD OPEN PUBLICATION
    10197    $enable_publication = get_option( 'indypress_enable_publication' );
    10298    if( $enable_publication ) {
    103         require_once('classes/publication.class.php');
     99        require_once( $indypress_path . 'classes/publication.class.php' );
    104100        $indypress_publication = new indypress_publication();
     101        require_once( $indypress_path . 'classes/publication_form.class.php' );
     102        $indypress_publication_form = new indypress_publication_form();
    105103        add_action( 'indypress_init', array( $indypress_publication, 'indypress_publication' ) );
    106    
    107104    }
    108105
    109     require_once( 'classes/next-event.php' );
    110     add_action( 'widgets_init', 'load_next_event_widget' );
    111 
    112     // LOAD RIGHT VISUALIZATIO OF AUTHOR POST
    113     require_once( 'classes/publication_theme.class.php' );
     106//    require_once( $indypress_path . 'classes/live-blogging.class.php' );
     107//    $indypress_liveblogging = new indypress_liveblogging();
     108   
     109    // LOAD RIGHT VISUALIZATION OF AUTHOR POST
     110    require_once( $indypress_path . 'classes/publication_theme.class.php' );
    114111    $indypress_publication_theme = new indypress_publication_theme();
    115112    add_action( 'indypress_init', array( $indypress_publication_theme, 'indypress_publication_theme' ) );
    116113
    117114    // LOAD SIGNALING POSTS AND COMMENTS
    118     require_once( 'classes/signal.class.php' );
     115    require_once( $indypress_path . 'classes/signal.class.php' );
    119116    $indypress_signal = new indypress_signal();
    120117    add_action( 'indypress_init', array( $indypress_signal, 'indypress_signal' ) );
    121118
    122119    // LOAD HIDING POSTS AND COMMENTS
    123     require_once( 'classes/hide.class.php' );
     120    require_once( $indypress_path . 'classes/hide_admin.class.php' );
     121    $indypress_hide_admin = new indypress_hide_admin();
     122    add_action( 'init', array( &$indypress_hide_admin, 'register_hide_post_status' ) );
     123    require_once( $indypress_path . 'classes/hide.class.php' );
    124124    $indypress_hide = new indypress_hide();
    125125    add_action( 'indypress_init', array( $indypress_hide, 'indypress_hide' ) );
    126126
    127     //LOAD EVENTS PAGE
    128     require_once('classes/event_page.class.php');
    129     $indypress_eventpage = new indypress_eventpage();
    130     add_action( 'indypress_init', array( $indypress_eventpage, 'indypress_eventpage' ) );
    131127}
    132128
     129    function do_wizard() {
     130        $indypress_wizard = new indypress_wizard();
     131    }
     132
    133133?>
  • indypress/trunk/readme.txt

    r395150 r492697  
    33Tags: indymedia, imc, open publishing
    44Requires at least: 3.0
    5 Tested up to: 3.1
     5Tested up to: 3.3
    66Stable tag: trunk
    77
     
    1313### Features
    1414
    15 * Open publishing
    16 * Different post types: ordinary post, events, liveblog entries (liveblogging
    17   plugin required)
     15* Extremely flexible open publishing support
    1816* Rich interface for open publishing (see below)
    1917* Posts and comments can be hidden (instead of deleted)
    20 * Optional premoderation: see its own section
     18* Posts and comments can be signaled to admin
     19* Premoderation support: see its own section
     20* UI Internationalization
     21* Event support
    2122* Widget for displaying next events
    22 * UI Internationalization
    2323
    2424#### Open Publish form features
    2525
    2626* TinyMCE interface for rich text editing, upload and media embed
    27 * Different "kinds" of categorization: by topic and by localization
    2827* Form validation: if the user is missing some fields, JS warns it immediately
    29   without making it wait an entire POST
    3028* HTML5 form attributes (newest browser will autovalidate some fields)
    3129
     
    3432Indypress does NOT have these features:
    3533
    36 * Custom taxonomy/categorization systems behind the topic/localization one
    3734* Multi language articles: this is not even in our wishlist.
     35
     36== Upgrade notice ==
     37
     38= 2012.01 =
     39
     40HUGE switch: wp 3.3, better configurability; BUT it requires everything to
     41be configured in a different way.  This is not very difficult, but has to be
     42done.  Also, all the "event"-related functionalities has been moved to a
     43separate plugin, which is bundled together.
     44
     45== Frequently Asked Questions ==
     46
     47= It is to difficult to configure! How can I just test it in a easy way =
     48
     49Go to plugin page and activate the "Indypress Base Configuration": this will
     50enable a simple, "standard" configuration
     51
     52= Indypress Base Configuration is fine, but TOO limited; a compromise? =
     53
     54On https://code.autistici.org/trac/indypress/wiki/FormPresets you'll find lot of
     55"presets": settings that has been done, tested, sometimes actually used in
     56production site. Sometime they require a bit of customization for your needs
     57
     58== Screenshots ==
     59
     60These are just samples, but indypress is much more flexible than this!
     61
     621. Typical publish page (on twentyeleven)
     632. Plugin status page, with summary informations
     643. Make some forms accessible only by logged users with some permissions
    3865
    3966== Changelog ==
    4067
    41 **0.5.1**: i18n fixes
     68= 2011.01 =
     69Huge rewrite   
     70
     71= 0.5.1 =
     72i18n fixes
    4273
    4374    boyska (2):
     
    4576          Fix: return of get_indy_publish_permalink
    4677
    47 **0.5**: Introduces i18n
     78= 0.5 =
     79Introduces i18n
    4880
    4981    boyska (4):
Note: See TracChangeset for help on using the changeset viewer.