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

Make Categories with using a plugin?

Dose anyone know a plugin that would allow me to post something in two Categories but still support NillaBlog plugin/style if not It would help if someone could make a fast one the point of me doing this is I like to have a home page with all my post in the NillaBlog plugin/style but still have Categories for stuff like Xbox or PS4 so I was thinking if If I could set something too two Categories it should work thanks again for looking at the post.

«1

Comments

  • mtschirsmtschirs ✭✭✭
    edited August 2015

    Here, take these, they are for free: ?:.-!. ;)

  • @mtschirs said:
    Here, take these, they are for free: ?:.-!. ;)

    Are you trying to be funny if so its not working one thing I don't understand about this forums is many of you guys take stuff for a joke when people come the forums its not to see jokes its for support with Vanilla Forums I'm not trying to be a dick but don't comment on my discussion if you can't help me in anyway of complete my discussion.

  • peregrineperegrine MVP
    edited August 2015

    Dose anyone know a plugin that would allow me to post something in two Categories but still support NillaBlog plugin/style i

    I do not know of a plugin. My guess is you could probably hire a developer.
    Perhaps if you mentioned what your budget was, and how much you were willing to spend for this, you might get some developers biting.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I don't know how much you should pay for stuff like this lol.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Nilla Blog is a category and you can have multiple discussions started in that category that use the blog style on posts.

    You can create multiple categories already . You can have a discussion under the Nilla Blog category and also start one in another Category as well using the same name ...

    So either we don't understand what you are asking, or you don't understand how the software works ?

  • Okay what I'm trying to do is be ably to set 2 Categories for each discussion.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited August 2015

    Since you only get one option for each Category to be selected when you start a discussion, the way it works now , you can't. But it may be possible to allow more selections in the category list drop down and have it post in two separate selected Categories.

    So what you need may be a way of selecting more categories to post to via one single discussion post ?

    You can also move the discussion to another category and still keep the original in the same category. Moving a discussion to a different category does not delete the original post .

  • All I'm trying to do lol is be ably to link discussion two Category1 and Category2 do you think this would be hard to make?

  • edited August 2015

    Every time I do it I break the website lol could you try doing it?
    class.nillablog.plugin.php
    http://pastebin.com/Ckq6CeiH

  • who are you talking to and what are you doing?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited August 2015

    Okay my end goal is to make it so Recent Discussions are in the NillaBlog plugin style but last time I ask for help with doing that no one could help so my idea now is to have 2 Categories the first one will be the main Categories for the website home page and I will link it to each post I make and the other one will be a add on one for like Category 2.

    So the end goal is to be ably to link a post too two Categories one that will be the main home page and the other one will be the add one page so like I will have the main page call lasted news and if people don't like to see that or only read about one thing they can look at Categories2 that would be PS4 or PC etc.

    Update post!!

  • peregrineperegrine MVP
    edited August 2015

    It's really not that difficult.

    every line in the plugin

    that starts with the words

    • public function

    add this line below it

    if (!Gdn::Request()->GetValue('b')) return;

    except DO NOT add the line below these two functions.

    • public function SettingsController_NillaBlog_Create($Sender) {
    • public function Setup() {}

    if you clone the plugin, make sure only one of the plugins is enabled or it won't work.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Okay my end goal is to make it so Recent Discussions are in the NillaBlog plugin style but last time I ask for help with doing that no one could help so my idea now is to have 2 Categories the first one will be the main Categories for the website home page and I will link it to each post I make and the other one will be a add on one for like Category 2.

    So the end goal is to be ably to link a post too two Categories one that will be the main home page and the other one will be the add one page so like I will have the main page call lasted news and if people don't like to see that or only read about one thing they can look at Categories2 that would be PS4 or PC etc.

    Sorry took to much time edit the last one lol do you understand what I'm trying to say yet?

  • peregrineperegrine MVP
    edited August 2015

    Okay my end goal is to make it so Recent Discussions are in the NillaBlog plugin style

    just change CategoriesController to DiscussionsController in the plugin.

    search and replace.


    and comment out lines like

    if ( !in_array($Sender->CategoryID, C("Plugins.NillaBlog.CategoryIDs")) )
    return;

    that will make recent discussions look like nilla blog.

    best I can do for you. good luck. probably best to hire someone. not me.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Sorry took to much time edit the last one lol do you understand what I'm trying to say yet?

    Is english not your main language ? maybe post in your native language because if we did not understand before, we understand less now...

  • @peregrine said:

    Could you tell me what part your talking about or edit it for me your self.
    http://pastebin.com/N06VTr2b

    @vrijvlinder said:
    Is english not your main language ? maybe post in your native language because if we did not understand before, we understand less now...

    Sorry I will work on my English.

  • peregrineperegrine MVP
    edited August 2015
    • I'm going to force you to learn, even if you don't want to or think you can't.
    • if you don't cut and paste lines on this forum, I can't help you further with any more questions.
    • It is better to post snippets in the thread here, as far as I am concerned.

    cut and paste lines 75, 86, 118, 146,180 and 208

    in this discussion thread.

    then after you look at them.

    Tell me what controller it says on all those lines. you need to answer this question!

    CategoriesController refers to viewing list of discussions in a speciic category.
    DiscussionsController refers to Recent discussions page

    so your goal is to change CategoriesController to DiscussionsController

    then when you are finished with that

    post your lines 75, 875, 86, 118, 146,180 and 208 with the changes you make.
    in the next comment you make.


    2) starting after line 75 - post all the lines sequences that begin with "if" and end in "return"

    then comment them out.

    To do a single line comment type "//" and all text to the right will be ignored by PHP interpreter.


    3) then comment out this block of lines - you don't need them, you want normal sorting.

    * Sorts blog posts by creation time rather than last comment.
         * @param $Sender
         */
        public function DiscussionModel_BeforeGet_Handler($Sender) {
                $Wheres = $Sender->EventArguments["Wheres"];
                if (!array_key_exists("d.CategoryID", $Wheres) || !in_array($Wheres["d.CategoryID"], C("Plugins.NillaBlog.CategoryIDs")))
                        return;
    
                $Sender->EventArguments["SortField"] = "d.DateInserted";
                $Sender->EventArguments["SortDirection"] = "desc";
        }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:

    • I'm going to force you to learn, even if you don't want to or think you can't.
    • if you don't cut and paste lines on this forum, I can't help you further with any more questions.
    • It is better to post snippets in the thread here, as far as I am concerned.

    cut and paste lines 75, 86, 118, 146,180 and 208

    in this discussion thread.

    then after you look at them.

    Tell me what controller it says on all those lines. you need to answer this question!

    CategoriesController refers to viewing list of discussions in a speciic category.
    DiscussionsController refers to Recent discussions page

    so your goal is to change CategoriesController to DiscussionsController

    then when you are finished with that

    post your lines 75, 875, 86, 118, 146,180 and 208 with the changes you make.
    in the next comment you make.


    2) starting after line 75 - post all the lines sequences that begin with "if" and end in "return"

    then comment them out.

    To do a single line comment type "//" and all text to the right will be ignored by PHP interpreter.


    3) then comment out this block of lines - you don't need them, you want normal sorting.

    * Sorts blog posts by creation time rather than last comment.
    * param $Sender
    */
    public function DiscussionModel_BeforeGet_Handler($Sender) {
    $Wheres = $Sender->EventArguments["Wheres"];
    if (!array_key_exists("d.CategoryID", $Wheres) || !in_array($Wheres["d.CategoryID"], C("Plugins.NillaBlog.CategoryIDs")))
    return;

    $Sender->EventArguments["SortField"] = "d.DateInserted";
    $Sender->EventArguments["SortDirection"] = "desc";
    }

    When the night comes, look at the sky. If you see a falling star (*) , don't wonder (think) why, just make a wish. Trust me, it will come true, because I did it and I found you.

  • peregrineperegrine MVP
    edited August 2015

    as r_j would say.

    a) I'm drunk
    b) you're drunk
    c) someone is drunk.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.