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

Votebar 0.2

Discussion in 'Plugins' started by ties, Mar 27, 2010.

  1. ties

    ties Theme & Plugin Development

    Votebar
    Version: 0.2
    Author: Matthis de Wit
    Created on: 2010/03/27
    Last Updated:
    2010/06/04
    Tested on: 1.3.0
    Plugins Required: bookmarking, categories, post_images and either vote or updown_voting
    Plug & Play: No, see instructions
    Supported: Yes

    Description
    Have the ability to create a (external) bar width vote buttons

    Instructions
    1. Upload the "vote_bar" folder to your plugins folder. Install it from Plugin Management in Admin.
    2. Change in the javascript file the 1st variable (var hotaru_baseurl) to your BASEURL (found in hotaru_settings.php)
    3. Change the settings in the settings panel to your wishes
    4. make sure jQuery 1.4+ is loaded
    5. to load the script, replace <YOUR HOTARU URL>:
    HTML:
    <script type='text/javascript' src='<YOUR HOTARU URL>/content/plugins/vote_bar/javascript/vote_bar.js'></script>
    6. with this javascript function you can make a votebar
    Code:
    loadVoteBar('#votebar',{ajaxList:7,cat:'<YOUR CATEGORY>'});
    Votebar options
    ajaxList - int - required - sets the number of items
    cat - string/int - category safe_name/id - optional - only posts from this category or id
    author - string/int - username/userid - optional - only posts from this user
    sorting - string - optional - sort by any of the following filters (use the italic text):
    * new AKA Latest
    * upcoming
    * top-24-hours
    * top-48-hours
    * top-7-days
    * top-30-days
    * top-365-days
    * top-all-time
    * top AKA index/popular
    default is top
    live demo

    Revision History
    v.0.2 2010/05/28 - Nick - Updated for compatibility with the Bookmarking plugin
    v.0.1 2010/03/27 - Ties - Released first version

    Future plans
    horizontal parameter
    loading on interval
    animations
    all together in a flash version, with support for custom graphics

    Please click "Rate Thread" and give this plugin a rating or click the Thank You button. Thank you.

    No cross domain support yet, please wait a little longer, if you want to use this locally be my guest
     

    Attached Files:

    Last edited: Mar 31, 2010
    zigstonk, baadier, williamd and 2 others like this.
  2. baadier

    baadier Well-Known Member

    This looks great, is there any possibility of it being extended as a site widget in the future. I noticed that cross-domain support is planned, but i think if this is extended to maybe show more details and so on then people could have it displayed on blogs hypothetically as a widget?
     
  3. ties

    ties Theme & Plugin Development

    it was planned as an external banner but because i didnt do my homework very well the crossdomain scripting didnt work i found the solution but because some changes are made to 1.1.4 its still just a local thing... Do you mean by widget a Hotaru widget or a widget in general?

    Hint: you can use it external by adding it to a blank page and then load the page in an iframe, its a little work around Gunaxin thought of.
     
    Last edited: Mar 31, 2010
  4. ties

    ties Theme & Plugin Development

    but i was thinking, because it interfered with something, wouldnt it be nice to have a flash version? with the ability to have it (still) custom styled?
    i would of course add the fla for maximum customization options

    but first i have to suffer... testweek :(
    EDIT:
    pros:
    better (maybe automated) graphic layout
    no interference i guess, got to learn a lot about flash
    cons:
    mobile devices like iphone doesnt support flash... maybe automatically revert to html?
     
    Last edited: Mar 31, 2010
  5. Gunaxin

    Gunaxin Well-Known Member

    Ties,

    Wanted to check back in and see if you had time to work on this plugin again. I don't remember exactly where we stood on this, but I would love to get it running. Hit me up via e-mail if you want to go over some of the details and where we ran into some trouble before.
     
  6. Gunaxin

    Gunaxin Well-Known Member

    Actually, with some modifications and hacks, it looks like I have this somewhat functional now. You can see it implemented in the sidebar of http://www.gunaxin.com (possibly NSFW) - Also utilizing different categories (and multiple iframes / php files) I have different queries on each sub site, http://sports.gunaxin.com, http://media.gunaxin.com, etc.)

    I do have a few issues though that I am trying to work through. The first one is in relation to sorting. I have it using the default (Top) however I also use Nick's plugin, order_by_pub_date and this isn't honoring that.

    Nick, I was wondering if you might be able to help me figure out how to get it to use that modified sorting? I've looked at the code and remain mostly puzzled =)

    Here is where Ties is calling the sort stuff :

    Code:
    			$sort = 'top';
    			if($h->cage->get->keyExists('sorting')) $sort = $h->cage->get->noTags('sorting');
    			$sb_base_funcs = new SbBaseFunctions();
    			$sb_base_funcs->prepareListFilters($h, $sort);
    
    Is it possible to somehow just call the function from order_by_pub_date after this? I'm not necessarily looking for the proper way to implement for every situation moving forward, I'd be ok with just getting my particular install to work ;) So if that means editing the function in SB_base instead of using the order_by_pub_date, I'd be ok with that too.
     
  7. Nick

    Nick Well-Known Member

    Try adding this immediately after the code you pasted above:

    PHP:
    $h->vars['orderby'] = 'post_pub_date DESC';
     
    Gunaxin likes this.
  8. Gunaxin

    Gunaxin Well-Known Member

    Have I ever told you that you're my hero?
     
  9. asshu

    asshu New Member

    Excellent tool . I will try it .
     

Share This Page