I'm so excited!

R_JR_J Cheerleader & TroubleshooterMunich Moderator

I've nearly finished my best plugin ever (that was not as hard as it would be for other guys around, here)!

I've discovered that there is a hide/unhide categories feature and thought that would nuke my ExcludeCategories plugin but than I found out that this feature is really clumsy: you can only find it if you look at /categories (which I hardly ever look at) and it does not behave as I would expect it. There is a filter to show the followed categories. But if you have hidden a category, it will stay hidden in the discussions even if you set that filter to "view all"...

Well, I've cloned the categories module (which gave me a hard time), added some option menus to it (thanks to peregrine) and now it is categoriesmenuonspeedwithmorebellsandwhistlesthanyoueverexpected.

Only bad thing by now is the name: CategoriesModulePlusModule is ridiculous. I'll rename it and I will call it AdvancedCategoriesModule. But I have no time for that now and I do not know when I will have that time. There is a minor UI glitch and a not implemented UX enhancement but beside of that it should be pretty complete.
(Yes for sure, I could have packed it up to be clean and upload it as you would normally do, but I'm boasting of pride and can't wait any more to show it!)

Because I do not want to clutter the addons section I just attach it here.

Oops... no Zips allowed here. I have renamed it to pdf.

... so excited... B)


hgtonightLinc
«1

Comments

  • LincLinc Director of Development Detroit Vanilla Staff
    edited May 2014

    Is this a bad time to mention we want to ditch that module and fix that whole feature because we know it's glitchy and weird? :neutral_face: Sorry, don't mean to be a wet blanket... and on the other hand, it's probably going to be a while longer til we do that and it won't be in 2.1 surely. Glad you sorted out your module experiments! :D

    In general, I'd say go ahead and put it in the directory. No use having files flying around the forum.

    UnderDog
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    As I've said, I have to do some clean ups before I'll upload it. Although renaming it would not making any sense, since I'll end up with something like AdvancedCategoriesModuleModule...

    Since I have not hooked into the categories module but copied it, I think taking away the vanilla module wouldn't harm mine. And if you come up with a better and native handling I would not be disappointed ;)


  • peregrineperegrine MVP
    edited May 2014

    Oops... no Zips allowed here. I have renamed it to pdf.

    1. how would one get this file. I downloaded as a pdf and renamed it to zip
    2. I downloaded it as a pdf - nothing
    3. I downloaded as a zip - nothing.

    and why can't you upload a zip - is it not allowed in off-topic.

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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    You cannot use it? So your tension will grow... >:)

    http://vanillaforums.org/addon/categoriesmoduleplus-plugin


    peregrineUnderDog
  • hgtonighthgtonight ∞ · New Moderator

    @R_J said:
    You cannot use it?

    I was able to download it and poke around.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I noticed one thing. not necessarily inherent in your plugin. but with Url returns /vanilla/vanilla/vanilla...... for the the links.

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

    vrijvlinderUnderDog
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    @peregrine said:
    I noticed one thing. not necessarily inherent in your plugin. but with Url returns /vanilla/vanilla/vanilla...... for the the links.

    I noticed that too when I experimented on the MyTabs plugin to make it a module...
    When you go to the link and then want to go to another link in the module, it adds the Url twice and on and on. 404 city.

    I could not figure out why. I tried using the relative url discussions/all and also /discussions /all

    Did not work .

    I removed the first slash from the Url like below and now it works without double

    $this->Data['ShowAllCategoriesUrl'] = Url('categories/settoggle?ShowAllCategories=true&Target='.$this->Data['Url']);
    
            $this->Data['ShowFollowedCategoriesUrl'] = Url('categories/settoggle?ShowAllCategories=false&Target='.$this->Data['Url']);
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I actually ended up doing this ans seems to work with the toggle too but what is the actual url to the followed, is that bookmarked? how to follow so I can test that link ?

    $this->Data['ShowAllCategoriesUrl'] = Url('categories/all/settoggle?ShowAllCategories=true&Target='.$this->Data['Url']);
    $this->Data['ShowFollowedCategoriesUrl'] = Url('categories/all/settoggle?ShowFollowedCategories=false&Target='.$this->Data['Url']);
    
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Okay - it's a quarter to four AM and my evening was in no way enjoyable or relaxing as I hoped it would be, so please excuse if I sound weepy, but: disregarding that it seems not to work for you, can't you sense the awesomeness hidden in this pre-release...?

    No, just joking (and fishing for compliments). Thanks for pointing me to that bug. I'll have a look at it.
    You can set "all categories"/"only followed" as well as hiding/unhiding in your /categories view. I use
    /categories/settoggle?ShowAllCategories=true&Target=discussions
    /categories/settoggle?ShowAllCategories=false&Target=discussions
    /category/togglefollow?categoryid=2&value=1&tkey=YourTransientKey&target=discussions
    /category/togglefollow?categoryid=2&value=0&tkey=YourTransientKey&target=discussions

    I've encountered problems when I was looking with my mobile at my homepage. Maybe that is related. Otherwise I will be somewhat lost, because I do not have anything like /vanilla/vanilla... anywhere


    UnderDog
  • peregrineperegrine MVP
    edited May 2014

    if any of this helps you whip the plugin into stable awesome release.

    are you using apache or nginx r_j?

    I get duplication of vanilla with re-write url TRUE in apache. vanilla 2.1 and vanilla in folder off or root.
    rewrite base in apache /vanilla

    also line 55 has warning notification (if getting rid of warnings of interest to you).

    Notice: Trying to get property of non-object in /var/www/vanilla/plugins/CategoriesModulePlus/modules/class.categoriesmoduleplusmodule.php on line 55

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

  • peregrineperegrine MVP
    edited May 2014

    This change solved my issues: line 61

    plugins/CategoriesModulePlus/modulesclass.categoriesmoduleplusmodule.php

     //  $this->Data['Url'] = Gdn::Request()->Path();
    
           $this->Data['Url'] = Gdn::Request()->Url('', TRUE);
    

    now that I see what the plugin is doing. its pretty cool.

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

    vrijvlinderR_JhgtonightUnderDog
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    @peregrine said:
    I get duplication of vanilla with re-write url TRUE in apache. vanilla 2.1 and vanilla in folder off or root. rewrite base in apache

    I am in a subfolder and got duplication before removing the first slash from the link as you did above.

    After that I got a blank page when I used the link to go to followed categories . The bellow worked for me. It toggles the toggle for the filter links so it works as far as it telling me what I am viewing.

    $this->Data['ShowFollowedCategoriesUrl'] = Url('categories/all/settoggle?ShowFollowedCategories=false&Target='.$this->Data['Url']);

    Using it like you did above give me a link like this and it's a blank page

    http://www.mysite.org/foro/categories/settoggle?ShowFollowedCategories=false&Target=categories/settoggle

  • peregrineperegrine MVP
    edited May 2014

    the problem is the target, not the main url for settoggle

    I don't think you changed what I did.

    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
    edited May 2014

    I changed it just now like you point out but without the all after categories it sends me to a blank page. With the all it is here and this what the url looks like with your change

    http://www.mysite.org/foro/categories/all/settoggle?ShowFollowedCategories=false&Target=http://www.mysite.org/foro/categories

    With the forward slash before the categories link it sends me to blank page. the above is the only that works for me.

  • peregrineperegrine MVP
    edited May 2014

    I don't know. I just downloaded the original plugin and made the one change above in
    http://vanillaforums.org/discussion/comment/207620/#Comment_207620

    and every link works for me.

    r_j will have his own fixes. and you can test with him after his changes.

    if you can't get to
    the link on your site

    http://www.mysite.org/foro/categories

    that is more of a problem with your site, isn't it?

    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

    That is not what I said.

    I downloaded the plugin made the only change you did, got a blank page, removed the first slash in the link got a blank page. Added all in the link and it works fine.

    It could be that because it is in a subdirectory that is an issue. The only thing I can say is make an install in a sub and see for yourself. I am not making this up. :(

    peregrine
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    Also , the original categories module shows up as well, and if I select not to display it, the one RJ made won't show either... :(

    I removed the check to see if Categories module Use , that way I can disable the original module and use the one RJ made.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    That's on purpose: I wanted to make sure that everyone sees the superiority of my module! HARHARHAR

    I've based the module on a clone and simply haven't removed that dependence yet
    First I make it working on my server and then I will look for what might be the problem with different setups (apache, root folder is what I have. No changes to the original. htasses than setting RewriteBase)


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @peregrine said:

    now that I see what the plugin is doing. its pretty cool.

    
    

    That's all I wanted to hear... ;)

    Thanks for all that testing. It makes me feel a little bad because what you are testing is in no way ready (although I do not think I would have found that strange Url bug).


  • @vrijvlinder said:
    That is not what I said.

    I downloaded the plugin made the only change you did, got a blank page, removed the first slash in the link got a blank page. Added all in the link and it works fine.

    It could be that because it is in a subdirectory that is an issue. The only thing I can say is make an install in a sub and see for yourself. I am not making this up. :(

    I think you make a very good point.

    When developing plugin, Perhaps, one should put vanilla forums in a folder (.e.g. /vanilla), rather than root (/) when testing, for the very reason that these type of issues will be found that will not arise when testing in root folder.

    BTW, my testing was done in a folder. /vanilla

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

    Linc
«1
Sign In or Register to comment.