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

SB Base 1.1

Discussion in 'Deprecated Plugins' started by Nick, Jan 9, 2010.

Thread Status:
Not open for further replies.
  1. Nick

    Nick Well-Known Member

    SB Base (Social Bookmarking Base)
    Version: 1.1
    Author: Nick Ramsay
    Created:
    2009/12/16
    Last Updated: 2010/05/14
    Tested on: Hotaru 1.2.0
    Plugins Required: None
    Plug & Play: Yes
    Supported: Yes

    This plugin is no longer used, and hasn't been since Hotaru 1.2. Please use the Bookmarking plugin instead.

    Description
    This plugin is the base of a social bookmarking website, providing the "list" and "post" templates to display news summaries and individual news articles.

    Instructions
    1. Upload the "sb_base" folder to your plugins folder.
    2. Install it from Plugin Management in Admin.
    3. Edit settings in Admin -> SB Base

    Revision History
    v.1.1 2010/05/14 - Nick - Fix for search results' RSS feed
    v.1.0 2010/05/07 - Nick - Fixes for better caching
    v.1.0 2010/04/14 - Nick - Changes to enable home page overriding
    v.0.9 2010/03/27 - Nick - 1 & 3 month options for post archiving, plus reorganization of post RSS methods
    v.0.8 2010/03/24 - Nick - Bug fix for Upcoming RSS and a new plugin hook before the RSS forwarding redirect.
    v.0.7 2010/03/15 - Nick - Option to redirect RSS feeds through your site to their sources [courtesy of Gunaxin.com]
    v.0.6 2010/03/13 - Nick - Lists ranked by vote are now ranked first by vote, second by recency
    v.0.5 2010/02/26 - Nick - Post filters hidden from user pages (#1243); Added profile navigation link
    v.0.4 2010/02/23 - Nick - Bug fix for user RSS feed, and showing messages above posts
    v.0.3 2010/02/21 - Nick - Bug fixes, cleaner list template and new "sb_no_posts" template
    v.0.2 2010/02/20 - Nick - Code changes for pagination
    v.0.1 2009/12/16 - 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
    skorpyo likes this.
  2. Nick

    Nick Well-Known Member

  3. Nick

    Nick Well-Known Member

    Updated: v.0.4 2010/02/23 - Nick - Bug fix for user RSS feed, and showing messages above posts
     
  4. Nick

    Nick Well-Known Member

    Updated: v.0.5 2010/02/26 - Nick - Post filters hidden from user pages (#1243); Added profile navigation link.

    Edit: I added a quick fix for breadcrumbs to the 0.5 zip a couple of hours after posting it.
     
  5. JonH

    JonH Admin & Design

    Here's a possible SEO benefit with the <h1> tag:
    On the default theme the story page's <h1> tag is on the site name (in header.php), which works good for the home page but the story page i.e. sb_post.php, the <h1> tag would be more SEO friendly if it was on the story title.

    The part I'm not sure of is how to do a "if ($h->post)" or something like that as a conditional statement to switch the h1 tag over to the story title on story pages...Is this possible?
    A few CSS tweaks would keep everything looking the same since Google doesn't crawl style sheets.
     
  6. Nick

    Nick Well-Known Member

    Try

    PHP:
    if ($h->pageType == 'post') {
        
    // stuff
    }
     
  7. JonH

    JonH Admin & Design

    Ooh. :eek: Yep that worked. Found it in the Docs I should check my own sig.
    Here's the hack.
     
  8. Nick

    Nick Well-Known Member

    Updated: v.0.6 2010/03/13 - Nick - Lists ranked by vote are now ranked first by vote, second by recency. No template/css/language updates necessary.
     
  9. Nick

    Nick Well-Known Member

    Updated: v.0.7 2010/03/15 - Nick - Added option to redirect RSS feeds through your site to their sources. No template/css/language updates necessary.

    This was custom work which has kindly been donated back to the Hotaru community by Gunaxin.com - Stuff for Guys.
     
  10. Gunaxin

    Gunaxin Well-Known Member

    Nick,
    I was wondering if you could expand on this some. I'm using the Up/Down voting, and once something hits the front page, the sorting on the home page is always based on Date (newest at the top) and not based on votes at all. Is this supposed to be the case?

    Also in the up/down voting settings, it says 5 votes to make the page, but things are making it with only one vote. I had changed the setting in the normal voting plugin to 1 before I disabled it and enabled this plugin. So I am guessing it is using that setting?

    Last thing is Popular / Upcoming / Latest.
    Popular shows me the front page, and seems to work, however as I noted above, they are just sorted by date. Upcoming shows me nothing, and latest shows me 2 items that have not made the front page (from before I changed the threshold). Based on the content I am seeing each on those pages, it seems like they are all switched. Popular is showing me Latest, Upcoming is showing me Popular, and Latest is showing me Upcoming. Is this something I did wrong, or am I misunderstanding the functionality?
     
  11. Nick

    Nick Well-Known Member

    The front page should be posts with 'top' status, ordered by newest first, just like Digg.com.

    Okay, just checked and this is a bug. I'll address it on the thread for that plugin.

    We'll see if this is still the case after I fix the bug above.
     
  12. Gunaxin

    Gunaxin Well-Known Member

    That makes sense for the normal voting. However Up/Down voting is more like Reddit, so it seems like the front page should function more like Reddit with that type of voting enabled. I don't know the exact formula, but I think its more of a votes per hour type of thing. So something with a ton of vote density could be listed higher than something with more votes, if it was done in less time.

    I guess maybe I misunderstood this :

    Which lists are ranked by vote then?

    I'll install your revised version tomorrow, and re-test for my other questions. Thanks for the quick response.
     
  13. Nick

    Nick Well-Known Member

    "Upcoming" and the "Best from" pages.
     
  14. Gunaxin

    Gunaxin Well-Known Member

    Finally had a chance to play with this some more.

    Latest gives me anything that hasn't made it to Popular, sorted by Date/Time Submitted
    Upcoming gives me anything still eligible to make it to Popular, sorted by Votes
    Popular / Home gives me anything that has gone Popular, sorted by Date/Time Submitted

    So I guess everything IS working how you expect (now that the setting bug is fixed, and I understand how it works). However the Popular page isn't really sorted like Digg. If it was, the articles would be sorted by Date/Time that they went Popular, not by when they were submitted. Currently something can go popular and immediately be placed on the 2nd page. At least that is what I am getting in my testing.
     
  15. Nick

    Nick Well-Known Member

    True.

    Also true, but in my opinion, I think that's a good thing. If a post is slow to become popular then it's probably not deserving of the top position on the front page. If you think about it, it's better this way because the posts that are really popular and get voted up in a matter of hours get top spot on the front page without getting pushed down by something submitted three days ago. So yes, even though it might be put on page 2 of Top Posts, that's better than page 6 of the Latest section from.

    If you did want to sort by date made popular, you'd need an extra column in the posts table to store that date.
     
  16. Gunaxin

    Gunaxin Well-Known Member

    I think sorting by date made popular would be more in-line with what most people would expect if everything else is meant to function like Digg. However I do realize it would require a new field in the database, and that's beyond my capabilities. Maybe if I report a bug, you could add it while you're in there fixing? ;)

    Bug Report : RSS Feed for Upcoming and New -
    /rss/status/upcoming/
    and
    /rss/status/new/

    Both return the same thing, just new. I see the code in there to put the title at the top of the feed, and there is definitely two different buttons on the layouts for these two categories, so it seems the intent was to have both be available as an RSS feed, but the upcoming feed just doesn't work.
     
  17. Nick

    Nick Well-Known Member

    Updated: v.0.8 2010/03/24 - Nick - Bug fix for Upcoming RSS and a new plugin hook before the RSS forwarding redirect (no template or CSS changes necessary).

    @Gunaxin, thanks for pointing out the bug. That's fixed in 0.8. A "sort by published date" option would have to go in your voting plugin because that's where the status of a post ("new" or "top") gets set. You can use the "sb_base_functions_preparelist" hook to override the filters and sort however you like, but don't forget that existing posts don't have a published date. You would have to create a column in the posts table during the vote plugin's install function. Then copy all post_date values into your new column otherwise you'll have nothing to sort by for a while.
     
  18. Gunaxin

    Gunaxin Well-Known Member

    Just installed and confirmed that Bug Fix worked. Thanks!

    As for that other stuff, I think you're just trying to confuse me. I may try my hand at it over the weekend, since you pointed me in the right direction.
     
  19. Nick

    Nick Well-Known Member

    LOL, I'm not even trying! :p

    You might find this Order By Votes plugin I've made useful. If there were a "published date" column, you could make a similar plugin.
     
  20. nothingman

    nothingman Active Member

    Hi Nick, I updated to 0.8 but users are unable to post comments (the comments input box shows up, but after the user clicks the Submit button, nothing happens). To confirm this I reverted back to 0.7 and users were able to post comments again .
     
Thread Status:
Not open for further replies.

Share This Page