Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • If you are using version wordpress 3.9 or 3.9.1 forget it, it will not work, instead use mqtranslate.
    If you are using wordpress 3.8.3, just edit the file qtranslate.php on line 90, and change the define('QT_SUPPORTED_WP_VERSION', '3.8.1'); to define('QT_SUPPORTED_WP_VERSION', '3.8.3');

    Thread Starter brunokassss

    (@brunokassss)

    There is an alternative way of doing the same thing the shortcodes on the individual pages?

    Thread Starter brunokassss

    (@brunokassss)

    Bah, wordpress 3.9 sucks ??

    Thread Starter brunokassss

    (@brunokassss)

    But in some cases it is useful to have shortcodes in TinyMCE. There is no way to show them again in this version?

    Thread Starter brunokassss

    (@brunokassss)

    The shortcode generator icon disappear in WordPress 3.9 because TinyMCE is updated to version 4, and I don’t know how to show it again.

    I wanted basically the same thing. Filtering the images so it appears only the ones of MultiPostThumbnail.
    For example, in this case i’m filtering the thumbnails that are in featured image:

    $args = array(
    ‘posts_per_page’ => 3,
    ‘meta_key’ => ‘_thumbnail_id’,
    );

    Is not possible to do the same thing, but in secundary image?

    Thread Starter brunokassss

    (@brunokassss)

    Ok, I already have find out how to do this. In line 131 in functions.php ‘category_name’ => ” , I only needed to put the category name.

    Thread Starter brunokassss

    (@brunokassss)

    I find out an alternative way to add the widget more than once. For example, this is the code to add the widget once:

    // The widget to show the mini calendar
    function widget_init_events_calendar() {
      // Check for required functions
      if (!function_exists('wp_register_sidebar_widget'))
        return;
    
    function widget_events_calendar($args) {
        extract($args);
        $the_title = stripslashes(get_option('events_calendar_widget_title'));
        $the_cats = stripslashes(get_option('events_calendar_widget_cats'));
        $widget_title = empty($the_title) ? __('Calendar','calendar') : $the_title;
        $the_events = minical($the_cats);
        if ($the_events != '') {
          echo $before_widget;
          echo $before_title . $widget_title . $after_title;
          echo $the_events;
          echo $after_widget;
        }
    }
    
    function widget_events_calendar_control() {
        $widget_title = stripslashes(get_option('events_calendar_widget_title'));
        $widget_cats = stripslashes(get_option('events_calendar_widget_cats'));
        if (isset($_POST['events_calendar_widget_title']) || isset($_POST['events_calendar_widget_cats'])) {
          update_option('events_calendar_widget_title',strip_tags($_POST['events_calendar_widget_title']));
          update_option('events_calendar_widget_cats',strip_tags($_POST['events_calendar_widget_cats']));
        }
        ?>
        <p>
           <label for="events_calendar_widget_title"><?php _e('Title','calendar'); ?>:<br />
           <input class="widefat" type="text" id="events_calendar_widget_title" name="events_calendar_widget_title" value="<?php echo $widget_title; ?>"/></label>
           <label for="events_calendar_widget_cats"><?php _e('Comma separated category id list','calendar'); ?>:<br />
           <input class="widefat" type="text" id="events_calendar_widget_cats" name="events_calendar_widget_cats" value="<?php echo $widget_cats; ?>"/></label>
        </p>
        <?php
      }
    
    //this widget can only be used once in exactly 1 of the sidebars
      wp_register_sidebar_widget('events_calendar',__('Calendar  Events HomePage','calendar'),'widget_events_calendar',array('description'=>'A calendar of your events in the HomePage.'));
      wp_register_widget_control('events_calendar','events_calendar','widget_events_calendar_control');
    }

    So what you have to do is to reapeat the same code but changing the name of the functions and the name that is in the wp_register_sidebar_widget and wp_register_widget_control, for example:

    // The widget to show todays events in the sidebar
    function widget_init_calendar_today() {
      // Check for required functions
      if (!function_exists('wp_register_sidebar_widget'))
        return;
    
      function widget_calendar_today($args) {
        extract($args);
        $the_title = stripslashes(get_option('events_calendar_widget_title'));
        $the_cats = stripslashes(get_option('events_calendar_widget_cats'));
        $widget_title = empty($the_title) ? __('Calendar','calendar') : $the_title;
        $the_events = minical($the_cats);
        if ($the_events != '') {
          echo $before_widget;
          echo $before_title . $widget_title . $after_title;
          echo $the_events;
          echo $after_widget;
        }
      }
    
      function widget_calendar_today_control() {
        $widget_title = stripslashes(get_option('events_calendar_widget_title'));
        $widget_cats = stripslashes(get_option('events_calendar_widget_cats'));
        if (isset($_POST['events_calendar_widget_title']) || isset($_POST['events_calendar_widget_cats'])) {
          update_option('events_calendar_widget_title',strip_tags($_POST['events_calendar_widget_title']));
          update_option('events_calendar_widget_cats',strip_tags($_POST['events_calendar_widget_cats']));
        }
        ?>
        <p>
           <label for="events_calendar_widget_title"><?php _e('Title','calendar'); ?>:<br />
           <input class="widefat" type="text" id="events_calendar_widget_title" name="events_calendar_widget_title" value="<?php echo $widget_title; ?>"/></label>
           <label for="events_calendar_widget_cats"><?php _e('Comma separated category id list','calendar'); ?>:<br />
           <input class="widefat" type="text" id="events_calendar_widget_cats" name="events_calendar_widget_cats" value="<?php echo $widget_cats; ?>"/></label>
        </p>
        <?php
      }
    
      wp_register_sidebar_widget('todays_events_calendar',__('Calendar  Events Main','calendar'),'widget_calendar_today',array('description'=>'A list of your events today'));
      wp_register_widget_control('todays_events_calendar','todays_events_calendar','widget_calendar_today_control');
      }

    This is not the best way to do things, but it works. I expeact the next realease of plugin cames with multiple widget.

    Thread Starter brunokassss

    (@brunokassss)

    Instead of using wp_register_sidebar_widget that can only be used once in exactly 1 of the sidebars, try to use Register Widget. It will give you a lot of work to change this but please try to change it in the next version Kieran O’Shea.

    Thread Starter brunokassss

    (@brunokassss)

    Ok, responsive it’s easy, I haved go to the line 133 (shortcode.php), and changed the value $embebed to: “$embed .= ‘<object type=”application/x-shockwave-flash” data=”‘ . $src . ‘” width=”100%” height=”‘ . $player->height . ‘”>’;”.
    Or I can force the object to change the value, for example, in the css file I puted:
    #player_div1 object object{
    width: 100%;
    }

    Thread Starter brunokassss

    (@brunokassss)

    By the way it is possible for this be responsive?

Viewing 11 replies - 1 through 11 (of 11 total)