1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Media Select 0.4

Discussion in 'Plugins' started by Nick, Nov 30, 2009.

  1. Nick

    Nick Well-Known Member

    Media Select
    Version: 0.4
    Author: Nick Ramsay
    Created: 2009/11/29
    Last Updated:
    2010/06/04
    Tested on: Hotaru 1.3.0
    Plugins Required: None
    Plug & Play: Yes
    Supported: Yes

    Description
    This plugin adds a choice of "News", "Video" or "Image" to Submit Step 2, therefore tagging each post with a media type that can be used by other plugins. Media Select also adds a media choice to the category bar which allows users to filter posts to their choice of media.

    Instructions
    1. Upload the "media_select" folder to your plugins folder. Install it from Plugin Management in Admin.

    Notes
    By default, all existing posts are given the "news" media type. You can change the media type on old posts from their individual edit pages. An example of a plugin using this media type is Video Inc, which will embed videos into posts with type "video" (if their url points directly at a video).

    Revision History
    v.0.4 2010/05/22 - Nick - Moved Media RSS from SB Base into this plugin
    v.0.3 2010/04/22 - Nick - Moved menu into a template and added plural for "news" language item
    v.0.2 2010/01/02 - Nick - Updated for compatibility with Hotaru 1.0
    v.0.1 2009/11/30 - Nick - Released first version

    Please click "Rate Thread" and give this plugin a rating. Thank you.

     

    Attached Files:

    Last edited by a moderator: Feb 6, 2010
    scaza likes this.
  2. angolanmade

    angolanmade Well-Known Member

    Any idea how one would go about displaying the videos option of this plugin in the category menu?
     
  3. ties

    ties Theme & Plugin Development

  4. Nick

    Nick Well-Known Member

    What do you mean? There aren't any video options in this plugin, and it already adds News, Images and Video to the category bar, under "Media".
     
  5. ties

    ties Theme & Plugin Development

    i think he wants an extra button (video) after the media dropdown
    oke you need to modify hotaru\content\plugins\media_select\media_select.php
    goto line 205, press enter
    and add this:
    PHP:
    echo "<li><a href='" $h->url(array('media'=>'video')) . "'>" $h->lang['media_select_videos'] . "</a>\n";
     
    Last edited: Mar 29, 2010
  6. angolanmade

    angolanmade Well-Known Member

    Yes this plug-in adds the "Media" under the category bar, what if i wanted to just display Videos, Images alongside my other categories?
     
  7. angolanmade

    angolanmade Well-Known Member

    Im assuming i can just replace this code:

    Code:
     /**
         * Add media options to category bar
         */
        public function category_bar_end($h)
        {
            echo "<li><a href='" . $h->url(array('media'=>'video')) . "'>" . $h->lang['media_select_videos'] . "</a></li>\n";
            echo "<ul class='children'>\n";
            echo "<li><a href='" . $h->url(array('media'=>'text')) . "'>" . $h->lang['media_select_text'] . "</a></li>\n";
            echo "<li><a href='" . $h->url(array('media'=>'video')) . "'>" . $h->lang['media_select_videos'] . "</a></li>\n";
            echo "<li><a href='" . $h->url(array('media'=>'image')) . "'>" . $h->lang['media_select_images'] . "</a></li>\n";
            echo "</ul></li>";
        }
    With This:
    Code:
    echo "<li><a href='" . $h->url(array('media'=>'video')) . "'>" . $h->lang['media_select_videos'] . "</a></li>\n";
    echo "<li><a href='" . $h->url(array('media'=>'image')) . "'>" . $h->lang['media_select_images'] . "</a></li>\n";
     
  8. ties

    ties Theme & Plugin Development

    yes it would be like this, but any update of this plugin will remove the changes you have made as the file is overwritten
    Code:
        /**
         * Add media options to category bar
         */
        public function category_bar_end($h)
        {
              echo "<li><a href='" . $h->url(array('media'=>'video')) . "'>" . $h->lang['media_select_videos'] . "</a></li>\n";
              echo "<li><a href='" . $h->url(array('media'=>'image')) . "'>" . $h->lang['media_select_images'] . "</a></li>\n";
         }
     
  9. Nick

    Nick Well-Known Member

    Updated: v.0.3 2010/04/22 - Nick - Moved menu into a template and added plural for "news" language item
     
  10. Moset

    Moset New Member

    Is it possible to make so that if i click an category and then click image in media, so i only see images from that category. It works with top 24h etc, so it would be really coll if u could fix this :D Thanks or if its to hard to make i can understand i have read some php but i cant really code yet ^^
     
  11. Nick

    Nick Well-Known Member

    It's not currently possible and not very easy to do either, sorry.
     
  12. ChaFF

    ChaFF Donor Donor

    Can we agree a position of following two plugins please? (media select and post images)
    For media select - thumbnails reflected on the right side and in post images the position is at the left...
     
  13. scaza

    scaza Active Member

    Also having problems downloading this zip with mac firefox.
     
  14. objective

    objective New Member Donor

    Try decompressing it with stuffit expander rather than the macs built in decompressor.
     
    scaza and Nick like this.
  15. scaza

    scaza Active Member

    Thanks, it does work with stuffit expander! But it still might be worth figuring out why this is happening as it's the first time I've encountered it after 2 years with the mac and I exchange zip files on a frequent basis(using a different 3rd party expander) with pc users for work and have never encountered this issue before.
     
  16. Nick

    Nick Well-Known Member

    Well, I work in Vista, and I use this very speedy utility to zip files, including the .zip in this thread:

    http://free-backup.info/justzipit.html

    So perhaps that causes the issue. I've never used a Mac in my life and have no access to one, so I can't test these things.
     
  17. objective

    objective New Member Donor


    I think it may be your utility as I only have to use stuffit expander for your plugins etc. Just tested Jons more from plugin and it unzipped correctly using the built in mac unarchiver whereas your TOS antispam decompresses to a cpgz file, double click that and I get another zip file and that repeats indefinitely.
    Having said all that stuffit expander is free , it solves the problem and so I am happy to leave it at that.
     
  18. frytec

    frytec Member

    pls, how can i add media select to rss autoreader so i can choose the default media type for a campain?
     

Share This Page