Forum Replies Created

Viewing 13 replies - 16 through 28 (of 28 total)
  • Plugin Author Lyubomir Gardev

    (@rolice)

    Sorry, I was away for some time, since I broke the SVN repo and I had to fix it. Now it is ok.

    So..

    Now you have two option from plugin or theme of yours you could attach to filters mentioned above or to use the two fields in the settings. In both cases your hook or text in the textareas should be something like:

    JOIN Clause:
    LEFT JOIN wp_postmeta AS post_sorter ON (wp_posts.ID = post_sorter.post_id AND post_sorter.meta_key = 'price')

    ORDER BY Clause (ASCending or DESCending):
    CAST(post_sorter.meta_value AS DECIMAL(12,2)) ASC

    PS: Tell me if it worked out.

    Plugin Author Lyubomir Gardev

    (@rolice)

    Is it going postmeta?

    Plugin Author Lyubomir Gardev

    (@rolice)

    The new features are added. With them custom sorting you should be able to make complex sorting. However, it requires SQL knowledge and it will also disable the sorting by the position factor, since the value would not be taken from there.

    Plugin Author Lyubomir Gardev

    (@rolice)

    Issue confirmed will check it and will write back.

    Plugin Author Lyubomir Gardev

    (@rolice)

    Please update your version and tell me if the issue is fixed.

    Plugin Author Lyubomir Gardev

    (@rolice)

    Thank you for your report. I have isolated the problem, as you may know post metadata is stored in longtext column in the database. So I have fixed it by casting the column as UNSIGNED INT just in ordering, which solved the problem.

    I will make few tests tomorrow and will publish an update. The new version contains new stuff also, but I was not deploying it, because of a problem with media, which I cannot reproduce (possibly conflict with some other plugin).

    Will write here tomorrow (I am in different timezone) with more information.

    Plugin Author Lyubomir Gardev

    (@rolice)

    The front-end control of sorting will be included in further releases.
    In order to make it extensive and applicable I had added SQL statements where the user could design its own sorting, since the tables and columns for sorting may vary. By default, WordPress does not have rating, as far as I know, so with each rating plugin the mechanism will also vary. This way it will be plugin independent.

    From programming view point it will have two filters:

    1. post_sorter_join
    2. post_sorter_order

    Where the filters would accept the current SQL where if they want they could modify it directly, for example from another plugin.

    However, I need to perform additional tests and to inspect a problem with gallery/media which have been reported, before I put the new version.

    Plugin Author Lyubomir Gardev

    (@rolice)

    @belljr56, its strange problem, one other man had reported it also as I see. I couldn’t reproduce it in versions above 3.5. What version are you using? I have asked the other reporter for feedback, but I would like to ask you too, could you send me a screenshot, thanks.

    @oakhillman, the changes are ready, but I need to test them carefully and it would be good to resolve the issue with the gallery. Its might be something small.

    Plugin Author Lyubomir Gardev

    (@rolice)

    Thanks for the feedback. Could you send me detailed information of your situation like WP version and screenshots? Also, if you could find the error from the logs also and paste it here, it would be quite useful.

    I tried to reproduce your problem, but it works on my versions (v3.5+).

    Plugin Author Lyubomir Gardev

    (@rolice)

    Thank you for you feedback @oakhillman, at fist.
    I will consider adding such options in the next release and will fix this issue.

    Comming soon. 😀

    Plugin Author Lyubomir Gardev

    (@rolice)

    Yes, this makes sense. I will add such feature in next release.

    Thank you!

    Same problem here, again v3.3.1.

    I’m trying to create a solution.

    PS: I have a solution. There is a case in the CVGVideo_Render funciton in

    cool-video-gallery.php

    plugin file. Where the match of the short-code is directly placed on screen (streamed out to browser), by echoing the HTML, instead of replacing the match.

    The problem is located inside the following if statement:

    if(isset($attributes['mode'])) { // This is at line 602 on my version

    Just replace:

    <script type='text/javascript' src='<?php echo $this->plugin_url?>cvg-player/swfobject.js'></script>
    <div>
    <?php
    $video_display = '<div id="mediaplayer_vid_'.$arguments['videoId'].'"><object width="'.$options_player['cvgplayer_width'].'" height="'.$options_player['cvgplayer_height'].'" style="" id="playerID_Video'.$arguments['videoId'].'" data="'.$this->plugin_url.'cvg-player/player.swf" type="application/x-shockwave-flash">';
    $video_display .= '<param value="'.$full_screen.'" name="allowfullscreen">';
    $video_display .= '<param value="transparent" name="wmode">';
    $video_display .= '<param value="file='.$video['filename'].'&image='.$video_preview.'&height='.$options_player['cvgplayer_height'].'&width='.$options_player['cvgplayer_width'].'&autostart='.$autoplay.'&controlbar='.$options_player['cvgplayer_controlbar'].'&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&skin='.$this->video_player_url . 'skins/' . $options_player['cvgplayer_skin'] . '.swf'.'&volume='.$options_player['cvgplayer_volume'].'&mute='.$mute.'&stretching='.$options_player['cvgplayer_stretching'].'" name="flashvars">';
    $video_display .= '<embed width="'.$options_player['cvgplayer_width'].'" height="'.$options_player['cvgplayer_height'].'" flashvars="file='.$video['filename'].'&image='.$video_preview.'&skin='.$this->video_player_url . 'skins/' . $options_player['cvgplayer_skin'] . '.swf&volume='.$options_player['cvgplayer_volume'].'&mute='.$mute.'&controlbar='.$options_player['cvgplayer_controlbar'].'&stretching='.$options_player['cvgplayer_stretching'].'" lightcolor="0x557722" frontcolor="0xCCCCCC" backcolor="0x000000" wmode="transparent" autostart="'.$autoplay.'" allowscriptaccess="always" allowfullscreen="'.$full_screen.'" quality="high" name="playerID_Video'.$arguments['videoId'].'" id="playerID_Video'.$arguments['videoId'].'" style="" src="'.$this->plugin_url.'cvg-player/player.swf" type="application/x-shockwave-flash">';
    $video_display .= '</object></div>';
    
    echo $video_display;
    ?>
    <div style="float:left;width:<?php echo $options_player['cvgplayer_width']; ?>px;height:auto;margin-bottom:20px;" >
    	<div style="float:left;">
    		<input type="image" src="<?php echo $this->plugin_url?>images/video-button-embed.png" onclick="generate_embed('<?php echo $arguments['videoId'];?>');"/>
    	</div>
    	<div id="embed_content_<?php echo $arguments['videoId'];?>" style="float:left;display:none;padding-left:5px;padding-top: 3px;width: 85%;">
    		<textarea id="embed_text_<?php echo $arguments['videoId'];?>" style="border:medium none;width:<?php echo $options_player['cvgplayer_width'] - 85; ?>px;"></textarea>
    	</div>
    </div>
    </div>
    <br clear="all" />
    <?php
    return;

    with:

    <script type='text/javascript' src='<?php echo $this->plugin_url?>cvg-player/swfobject.js'></script>
    <?php
    $result = '<div>';
    
    $video_display = '<div id="mediaplayer_vid_'.$arguments['videoId'].'"><object width="'.$options_player['cvgplayer_width'].'" height="'.$options_player['cvgplayer_height'].'" style="" id="playerID_Video'.$arguments['videoId'].'" data="'.$this->plugin_url.'cvg-player/player.swf" type="application/x-shockwave-flash">';
    $video_display .= '<param value="'.$full_screen.'" name="allowfullscreen">';
    $video_display .= '<param value="transparent" name="wmode">';
    $video_display .= '<param value="file='.$video['filename'].'&image='.$video_preview.'&height='.$options_player['cvgplayer_height'].'&width='.$options_player['cvgplayer_width'].'&autostart='.$autoplay.'&controlbar='.$options_player['cvgplayer_controlbar'].'&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&skin='.$this->video_player_url . 'skins/' . $options_player['cvgplayer_skin'] . '.swf'.'&volume='.$options_player['cvgplayer_volume'].'&mute='.$mute.'&stretching='.$options_player['cvgplayer_stretching'].'" name="flashvars">';
    $video_display .= '<embed width="'.$options_player['cvgplayer_width'].'" height="'.$options_player['cvgplayer_height'].'" flashvars="file='.$video['filename'].'&image='.$video_preview.'&skin='.$this->video_player_url . 'skins/' . $options_player['cvgplayer_skin'] . '.swf&volume='.$options_player['cvgplayer_volume'].'&mute='.$mute.'&controlbar='.$options_player['cvgplayer_controlbar'].'&stretching='.$options_player['cvgplayer_stretching'].'" lightcolor="0x557722" frontcolor="0xCCCCCC" backcolor="0x000000" wmode="transparent" autostart="'.$autoplay.'" allowscriptaccess="always" allowfullscreen="'.$full_screen.'" quality="high" name="playerID_Video'.$arguments['videoId'].'" id="playerID_Video'.$arguments['videoId'].'" style="" src="'.$this->plugin_url.'cvg-player/player.swf" type="application/x-shockwave-flash">';
    $video_display .= '</object></div>';
    
    $result .= $video_display;
    
    $result .= '    <div style="float: left; width:' . $options_player['cvgplayer_width'] . 'px; height: auto; margin-bottom: 20px;">';
    $result .= '        <div style="float: left;">';
    $result .= '            <input type="image" src="' . $this->plugin_url . 'images/video-button-embed.png"
                                                        onclick="generate_embed(\'' . $arguments['videoId'] . '\');"/>';
    
    $result .= '        </div>';
    $result .= '        <div id="embed_content_' . $arguments['videoId'] . '" style="float: left; display: none; padding-left: 5px ;padding-top: 3px; width: 85%;">';
    $result .= '            <textarea id="embed_text_' . $arguments['videoId'] . '"
                                                        style="border: medium none; width: ' . ($options_player['cvgplayer_width'] - 85) . 'px;"></textarea>';
    $result .= '        </div>';
    $result .= '    </div>';
    $result .= '</div>';
    $result .= '<br style="clear: both;" />';
    
    return $result;

    This is working for me (WordPress version 3.3.1). I use separate concatenations with $result, beause of debugging, you may use only one or directly to return the value…

    I am unsure why the author had done that in this way, but also keep in mind, it might be for reason and would be, probably replaced in other versions.

    Thread Starter Lyubomir Gardev

    (@rolice)

    I’m glad that I could help for improving this nice and useful plugin. 🙂

Viewing 13 replies - 16 through 28 (of 28 total)