WordPress.org

Ready to get started?Download WordPress

Forums

Plugin tweak help needed - desperately! (19 posts)

  1. ladydelaluna
    Member
    Posted 7 years ago #

    Okay, in my hunt for a way to have the admins ONLY (not site visitors) be able to rate a post, I found this plugin:

    http://design.sneak.co.nz/plugins/ds-rating/

    It's perfect in every way except one: I need to be able to use the rating system to display posts in order from 5 stars to 1 star. And I don't want the stars to show up on the live site either (this is already built into the plugin).

    This should be easy for plugin devs and higher-than-my-level programmers (which doesn't say anything for my level, believe me)... Even the original plugin author made mention of it in the comments:

    "I definitely considered doing that. Ideally I wanted to be able to order posts by rating as well (highest to lowest or vice versa) but didn’t have the time to persue it.

    I don’t think it would be very difficult — it’s just a matter of writing a function that makes the right type of calls to the database and filters using the custom ratings meta data."

    I just don't know about writing functions and calls and filters and such. Normally, I have a programmer I outsource to who does this sort of thing for me - but he's booked up and I need this done by the end of the month.

    I'd be willing to make a PayPal donation or some such if that's what it takes... but it doesn't seem difficult for someone with the knowledge to do it.

    Anyone?

    (If you're only offering paid help - please contact me at lara AT anubismarketing DOT com with what you'd charge me for this. Otherwise, I'm entertaining offers for generousity too... thanks!)

  2. ladydelaluna
    Member
    Posted 7 years ago #

    Anyone? I really need this one last thing to tie up this project of mine. It doesn't sound difficult for a person with the proper knowledge - maybe even a quick fix, could be... no idea.

  3. benzin
    Member
    Posted 7 years ago #

    what ?

    /* Output the relevant XHTML */
    $ds_rating_options = get_option('ds_rating_options');
    if ($ds_rating_options[0] == 'css') {
    /* Output the rating code block, for using CSS to display */
    // echo '..';
    } else if($ds_rating_options[0] == 'images') {
    /* Output an image */
    // echo '..';
    }
    comment out this - if i understand you correct

    Check this page for sorting posts ..
    http://codex.wordpress.org/Template_Tags/get_posts

  4. ladydelaluna
    Member
    Posted 7 years ago #

    comment it OUT?

    I think you're misunderstanding...
    I want the posts to display on the site according to the highest ranking to lowest. I don't want the ranking itself to display, which is already a part of the plugin itself (to disable the stars from showing up on the site)

    According to the plugin author, it involves something entirely different than the solution you provided:

    "I don’t think it would be very difficult — it’s just a matter of writing a function that makes the right type of calls to the database and filters using the custom ratings meta data."

    I've read the link you gave - and it appears that posts can be sorted by any of the fields in the wp_post table - however I need a function or something to sort them by the custom ratings meta data that's provided by the plugin. I think. Something like that.

  5. benzin
    Member
    Posted 7 years ago #

    ok .. the get_posts() is in wp-includes/classes.php a BIG function :/ you could modify that or write your own function

  6. ladydelaluna
    Member
    Posted 7 years ago #

    "you could modify that or write your own function"

    Um. That's why I'm here. I don't know how to write functions. I don't know how to modify plugins. (I did say this in my first post...) I'm a designer and SEO person - I'm not a PHP programmer, that's why I came here looking for help.

    Not for nothing, I appreciate the link you gave and everything, but I think I made it very clear in my first post what I'm looking for here. If you can help me with that, it would be wonderful. If you can't please don't post in the thread, telling me what needs to be done. I know what needs to be done. And I'm seeking help in doing it. Thank you.

  7. yosemite
    Member
    Posted 7 years ago #

    If you can't please don't post in the thread, telling me what needs to be done.

    This isn't your personal thread, this forum is a living document to be used for many. Benzin's response was on topic and obviously not an attempt to hijack.

  8. ladydelaluna
    Member
    Posted 7 years ago #

    I didn't say it was an attempt to hijack. Where the hell did that come from?

    Take your personal opinions of me elsewhere, Yosemite. I wasn't being rude - I was asking for help, and that if one wasn't willing to help, to please not post repeating to me what I already know.

    All I said was that I know what needs to be done, as I clearly illustrated in the first post, but I'm looking for someone to help me do it (or do it for me, for a donation to their PayPal account). I'm not here to learn the details of writing a function - and I've clearly stated that I don't know how. The response "write your own function" was unhelpful. Period. As is your comment, Yosemite. Please stop finding ways to start arguments with me - if you can't be helpful, don't post. That's part of the whole forum rules, not making any "personal thread requirements" here.

    Alas, back to the ORIGINAL TOPIC - Is there anyone else out there who is able and willing to help with this? (Note: Further off-topic attempts to argue with me about forum ettiquette will be ignored.)

  9. benzin
    Member
    Posted 7 years ago #

    write your own function tip was unhelpfull ? did you already know that..

    "the get_posts() function is in wp-includes/classes.php and its a BIG function :/" ?

    "you could modify that or try write your own function" is wery clear and logic ? ( depends if im on the right track :)

    Your respons could be: oh great thanks, i didnt know where to look .. could you give me som assistans ? etc....

    Im not always right.. but i try my best to help..

    and.. get some contact information on your webpage .. i really did a search and used 30 minutes of my precious time :) to help but couldnt email my thoughts

  10. ladydelaluna
    Member
    Posted 7 years ago #

    benzin - I understand, but had you really read what I'd written in the first place, you probably wouldn't have told me to comment out some code for the first answer.

    "Write your own function" - I said in the very first (and subsequent posts): "I just don't know about writing functions and calls and filters and such." - So for you to tell me to do that as a solution, no, that's not helpful.

    I DO thank you for taking the time to try to understand my specific issue, and would more than welcome your help with writing the correct function and output code if you were able and willing to do that, given that you do have a true understanding of what I'm looking to do with this particular plugin.

    This isn't a personal blog here - it's not something I can use "trial and error" with. It's a client of mine, and I need someone who can get it right from the first change of code, within minutes. That's again, why I offered to send a donation to whoever did it for me. But I need someone to either spell it out for me here in the forums, or find someone I can trust with a site that's not my own... do you now understand why your responses really weren't that helpful? Re-read my first post... this isn't something I can "toy" with... I need to know if it can be done, and either told explicitly how (since as I've said before, I'm not a programmer) or shown that I can trust someone else to let them in there to do it for me. That's all I'm looking for here...

  11. ladydelaluna
    Member
    Posted 7 years ago #

    You're not reading, benzin... I put the email address in the first post. *sigh*

    The site in my profile here is my personal site. This is a professional job I'm working on, so I gave my business email address.

  12. benzin
    Member
    Posted 7 years ago #

    Have you tried to send a "order by" value ?

    i dont know where your script saves, in post meta ?

    order by _ds_rating

  13. benzin
    Member
    Posted 7 years ago #

    get_posts('numberposts=10&order=ASC&orderby=_ds_rating');

  14. ladydelaluna
    Member
    Posted 7 years ago #

    I'm not sure where it saves either, but since the ratings feature is related to posts only, then is that where it would be?

    This seems a bit more complicated than just using the orderby value in get_posts... otherwise, wouldn't the plugin author have said "that's all you have to do"?

    (IF this were to work, the order would be DESC (listing from 5-1, not 1-5) - you're actually confusing things here, benzin... by not reading through everything...)

  15. benzin
    Member
    Posted 7 years ago #

    Probably not .. im helping you at same time as im writing 2 plugins to myself, talking in skype, moderate a high traffic forum. My desktop has 25 open windows everything from text-code editors, ftp-clients to ssh terminal windows .. i need a smoke ..

  16. ladydelaluna
    Member
    Posted 7 years ago #

    LOL Now THAT I understand - too much going on at once!

    Thanks for your ideas anyway though... hopefully I can find a programmer who is skilled in sorting results differently than by default to get this done for me.

  17. benzin
    Member
    Posted 7 years ago #

    try this.. if _ds_rating is in the same table
    <?php
    query_posts("cat=1&orderby=_ds_rating&order=ASC");
    ?>

    got to go for now.. bbl

  18. ladydelaluna
    Member
    Posted 7 years ago #

    cat=1&orderby=_ds_rating&order=ASC

    first, I want it for all categories.
    second, I still don't think it's as simple as using the orderby tag.
    third, again, it'd be DESC if this were to work.

    benzin, i appreciate your time, but since you're obviously so busy, i fear that none of this will work. i need someone who can focus on this - as i've said many times already - this isn't a personal site of mine, it belongs to a client. there's no room for errors here, only room for experience and skill. that's what i need.

    that said, if someone can help, please contact me at the email address i gave before: lara AT anubismarketing DOT com

    thanks...

  19. ladydelaluna
    Member
    Posted 7 years ago #

    I'm leaving this as unresolved, however my programmer finally had some time to get to it for me. Don't ask me what he did - I have no clue - but it works beautifully and didn't take him much time (about 2 hours) to get it working perfectly for this site in particular (other sites may be much easier, this one is full of customizations).

    Hopefully someone will figure it out and post it here for everyone... that's the only reason I'm leaving it "unresolved".

Topic Closed

This topic has been closed to new replies.

About this Topic