HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

[Blog Application Addon] Blog posts based on user role instead of category

This discussion is related to the Blog addon.
RaizeRaize vancouver ✭✭
edited February 2011 in Vanilla 2.0 - 2.8
This is a great application, and I'm really glad that someone started it.

I don't know exactly how much customization this request would require, but could posting be switched from category based posts to role based posts?

The reason I'm asking is that as the administrator/founder of my forum, I'm the only one who (at this point) will be creating proper, full length posts - but they need to be categorized into their appropriate topics/sections. If I stick all my posts into category 1, then it creates unorganized discussions, which isn't good at all.

Any suggestions? I'd be willing to compensate for time if anyone is willing to help customize this app (for everyones use).

"BlogThis" is a plugin for Vanilla 1 that provides similar functionality to your app. Instead of posting everything from one category to the blog page, the administrator has the choice of "promoting" any new discussion to be a blog post. This selectivity is role based, and is a good clean solution I think...any thoughts?

Comments

  • edited August 2010
    My blog mod is very much built around the use of a category, so changing that behaviour would probably be like rewriting the whole thing.. What might be a solution would be using tags, which should be fairly straightforward to add. :)
  • Great work, chi.

    Though I must admit that share the same sentiments as @Raize.

    While your plugin is a great idea, and some people would rather have a cleanly integrated and simple blog for their vanilla site, there should also be a standalone and separate-featured blog to compete with wordpress's.

    I took a look over the application, and what it would take to change it over to it's own database. You are correct, this would take a decent bit of coding, and you may have to re-create features already provided in vanilla.

    I would like to help out with this, though, @chi1. Perhaps a dashboard page to choose to use the first category or not? this would be A LOT more code than it sounds. ^^

    Do you use github? It would be perfect to share code without spamming VF.org ^^
  • RaizeRaize vancouver ✭✭
    @zodiacdm @chi1

    this is very well done maybe it'll help: http://vanillaforums.org/addon/364/blogthis

  • @zodiacdm I've already customized the codebase quite some to handle pretty specific needs, so I don't really have the original codebase left, except for the package on the addon site, which means I'm not actively working on it and quite frankly don't have that much of an interest in it :P .

    You are completely free to take my package and put it on github to continue development. I might help a little, but I don't plan to spend any big amounts of time maintaining it. That could be your job, if you wish :)
  • Fair enough, I am just starting out with open source code, so I am happy to maintain source.

    I will go ahead and upload it sometime in the near future ;)
  • A V2 version of Blogthis would be fantastic. It is a really great plugin!
  • I first installed this in my plugins folder and couldn't figure out why it wasn't visible on my plugins page. Duh it's an application. 1 step forward.

    When I enable this application and go to the blog page it is empty except for a link that says "More posts". The only content on my testing V2 forum is an imported V1 forum. Will this work for imported discussions? Thank you.
  • RaizeRaize vancouver ✭✭
    I'm guessing that as long as they are in the right category it will work... it has to be category "1"
  • Category 1? I assume this is the first category made in my V1 install? If so, there are 73 discussions there, none of which show up on the "blog".
  • One way to find out which one is your category ID is by going to the dashboard->categories and clicking "Edit" for every category. The URL in your addressbar will then show something like /vanilla/settings/editcategory/ID. That is the ID for that category. If you want to, you can change the $BlogcategoryID variable on line 31 in applications/blog/controllers/class.blogcontroller.php to what you wish.
  • Thanks @chi1 ! That was my problem. For some reason all of my categories are in the mid-sixtys. I had assumed the first category I created would be #1.

    Thanks again!
  • The blog is looking great now except the images are too large. MaxImageSize works great inside discussions. Is there a way to get it to resize images on the blog page as well?
  • Using it now. It works great inside discussions but doesn't resize images on the blog page. They are still too large.
  • RaizeRaize vancouver ✭✭
    edited October 2010
    darnit... so close eh lol
  • How to properly install? (I can not understand)
  • UnderDogUnderDog MVP
    edited February 2011
    How to properly install? (I can not understand)
    after you've unzipped the .zip file you will see another file:
    blog-0.1
    unfortunately, this file has no extension. You can simply rename this file to the following:
    blog-0.1.tar
    then try to unzip (untar) this file and you will see the actual structure that was meant to be in the .zip file.
    The error here was that a file, which was actually a .tar.gz file, was renamed to a .zip file, which is really confusing.

    http://www.vanillaforums.org/discussion/14673/blog-application-addon-first-test-results-comments
  • Just to note, this application does not support Smarty ".tpl" type templates as far as I can see, at least not without modding. The available variable list is as follows:

    {$Assets} {$BodyClass} {$BodyID} {$Path} {$SCRIPT_NAME} {$TransientKey} {$User}

    The $Assets array is empty and there is no discussion data available.

    It should also be noted that anything beyond showing an initial list of "n" entries on the "/blog" page simply leads back the standard forum view. This is strictly a way of applying a template to a short list of discussions in a specific category.

    Cheers

  • As a followup, this functionality should be replicatable as a plugin. You can probably use the "BeforeDiscussionContent" event to add the message body to the discussion array if a specific category ID is chosen and then you would just need to add an exception in the discussions template for the category you want to use as the blog one so it displays to your liking. You can can also use a .htaccess directive if you want a custom URL for the blog. In my case, I am using the blog as the default front page so this works:

    RewriteCond %{REQUEST_FILENAME} /index.html RewriteRule ^(.*)$ forum/index.php\?p=/categories/blog [QSA,L]

    I should note that I am using Smarty templates. If you are handling this via the stock PHP variation, you could take care of this via discussions.php and the corresponding helper_functions.php file.

    Cheers

  • I'm so sorry, I really hope I'm not missing anything. I love the idea for this plugin, and it's exactly what I need- but I'm afraid I can't seem to get it to work. I have it installed properly, and I am definitely putting my posts under "category 1", but they aren't showing up.

    Right now I have category 1 as a "Display root categories as headings." but even when I don't it doesn't work. I've tried everything, moving it to it's own section, not having anything under it, having things under it, etc. Nothing shows up under "blog".

    Any ideas?
Sign In or Register to comment.