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.
Options

Ported my 11 Years old Phpbb and testing... ;)

Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
edited August 2013 in Vanilla 2.0 - 2.8

Hi there Vanilla People... ;)

Ported my old Forum to Vanilla and playing around with it... its really amazing and easy... ;)
But as always in the beginning, there are some Questions:

The biggest Reason for moving 2 Vanilla was to achieve the look & Feel of Facebook, cause the new generation of Internet Users (at least my new Members.. ;) ) have enormous Problems with the old style PhpBB forum... don't ask, I'm shocked as well... :D:D:D

I spend some days with Vanilla and the Plugins and must say, thats coming near to my goals.. ;)

Here my questions:

  1. its crucially necessary to give my users easy and working Mobile access.
    The basic Mobile style is doing this purpose, however the ImageUpload Plugin has problems getting the Pictures, as from the Gallery or from the Cam of my Android Tablet & phone as follows:
    a. Android ICS on Phone with Opera and stock Browser not working
    b. Android JB on Tablet with Opera not working
    c. Android JB on Tablet with Stock browser working (puts in an URL Link) !! ;)
    Will test IPhone soon.. :)

I would like the easiness of Whatsapp here... ;)

  1. Is it possible to get the Discussions like in Facebook in DESCENDING DATE ORDER and the Editor on the top?

Thanx for any Help on this...

Cheers,

Dr. Sommer ;)

«1

Comments

  • Options

    Mobile support of image uploads is sporadic anyway, regardless of what software you are using for your forum. It is either no support or a million different methods all with their own quirks.

    It is not helped by the mobile camera culture meaning that people now expect to upload huge images with no pre-formatting, and expect it to be pre-formatted in browser, or totally naive about the whole thing.

    Reversing the order of the discussion is possible with hooks.

       public function CommentModel_AfterConstruct_Handler($CommentModel) {
                $CommentModel->OrderBy('c.DateInserted', 'desc');
        }
    

    You could make the theme hook with that in.

    To place the comment box on the top, could either be done with javascript/jquery or you make a copy of
    applications/vanilla/views/discussion/index.php and place it in views/discussion/

    The bit after the bottom pager, would then be moved to above the top pager.

    How well it will work in practice I'm not exactly sure.

    grep is your friend.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2013

    Okeeee... :D I'm sorry, I didn't mention, that I'm an absolute Beginner in programming... :D

    After spending HOURS of searching, i found this on "Theme Hooks":

    http://vanillaforums.org/search?Search=Theme+Hooks&Type=Pages

    It was a little bit confusing, because i was searching in the Documentation and the Output was from the Community... is there e glitch in the Search function, or did i miss something?

    I red this post:
    http://vanillaforums.org/discussion/22738/how-to-properly-use-class-theme-hooks

    and then I searched with google and found this:

    http://vanillaforums.org/docs/theme-hooks

    Now I'm totally confused, because in the first post the "class.MyThemeNamethemehooks.php" is in the theme folder, but in the Documentation it says plugin folder...
    Tried both, nothing is working... :D

    that could also be because of the lack of programming skills... :D

    so do I do it so (the name of my Theme is EnigmaGreen):

    File Name = class.EnigmaGreenthemehooks.php (where to put it? )

    <?php if (!defined('APPLICATION')) exit();
    
    class EnigmaGreenThemeHooks implements Gdn_IPlugin {
    
    public function CommentModel_AfterConstruct_Handler($CommentModel) {
                $CommentModel->OrderBy('c.DateInserted', 'desc');
        }
    
    
    
    }
    

    Hope somebody can push me in the right direction.. :D

    THANX.. ;)

    p.s.: also the formating of this post is not working... it looks fine in preview, but then the formating dissapears after post...
    (Using Opera Browser)

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    You can use ~~~ before and after to preserve whitespace.

    You should put your theme hooks file in your themes folder, e.g. /themes/EnigmaGreen/class.enigmagreenthemehooks.php.

    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.

  • Options
    LincLinc Detroit Admin

    Image uploading does work in iOS 5+ because Apple added it to Mobile Safari in that version. Android will be as varied and splintered as the platform is. Unfortunately that's not something we can control, it's entirely the browser's functionality effecting that.

  • Options

    @Dr_Sommer said:
    File Name = class.EnigmaGreenthemehooks.php (where to put it? )

    File Name =class.enigmagreenthemehooks.php

    Put it in /themes/EnigmaGreen/

    <?php if (!defined('APPLICATION')) exit();
    
    class EnigmaGreenThemeHooks implements Gdn_IPlugin {
    
    public function CommentModel_AfterConstruct_Handler($CommentModel) {
                $CommentModel->OrderBy('c.DateInserted', 'desc');
        }
    
    
    
    }
    

    Yes, that's perfect.

    There was an error rendering this rich post.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2013

    Thanks everybody for your Help, i really appreciate it.. ;)

    But still no luck.. ;(

    Now i get this error (immediately after activating the theme) :

    (FYI: changed Theme to "Grayscale Green" ;) )

    Fatal error: Class grayscalegreenthemehooks contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Gdn_IPlugin::Setup) in /var/www/caba/CaBaFoRuM/themes/Grayscale Green/class.grayscalegreenthemehooks.php on line 6

    Looking through the Internet and as the error says, i have to abstract either the class, or "implement the Method"...

    if i abstract the class, i get this error (this error comes only when i try to open one discussion!):

    Fatal error: Cannot instantiate abstract class grayscalegreenthemehooks in ....Forum/library/core/class.pluginmanager.php on line 505

    and i couldn't find anything to explain me how to "implement the Method"...

    As mentioned, I'm an absolute beginner but I'm trying.. ;)

    Thanks

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2013

    Did it on 2 Themes: Grayscale Green and EnigmaGreen... will now check out the default Theme.. ;)

    p.s.: Same errors... ;(

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited August 2013

    try one of mine , GreenGlass is cool and it has a matching mobile theme GreenGlassMobile

    http://vanillaforums.org/addon/greenglass-theme

  • Options

    @Dr_Sommer this isn't to do with the theme I'd recommend using extends Gdn_Plugin rather than implements Gdn_IPlugin

    btw themehooks can be topical e.g.

    class.myreverseorderthemehooks.php

    <?php if (!defined('APPLICATION')) exit();
    
      class MyReverseOrderThemeHooks extends Gdn_Plugin {
        public function CommentModel_AfterConstruct_Handler($CommentModel) {
             $CommentModel->OrderBy('c.DateInserted', 'desc');
        }
      }
    

    you can also have more than one themhook file.

    grep is your friend.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    @vrijvlinder: Yes, its a really nice one... ;)
    But the same errors... ;(

    @x00:

    Thanks, now there are no errors, but also no effect... the order is still Ascending..

    Tried with 2 Themes, Grayscale Green and default...

    If you like to see it:
    http://caba.de/CaBaFoRuM/index.php?p=/discussion/2505/order-of-discussion

    I think I should reconsider this Ordering thing.. it seems to break the Philosophy of the vanilla Forum software, when it is so hard to get it working... ;)

  • Options

    sorry I looked deep in bowels the comment model and this should be the code

      public function CommentModel_AfterConstruct_Handler($CommentModel) {
        $CommentModel->OrderBy(array('c.DateInserted desc','c.CommentID'));
      }
    

    note the OP is still at the top. But it can be moved. You can't use plugins like voting as they also change the order.

    grep is your friend.

  • Options

    certainly you would have to experiment whether it is really worth it. But it is certainly possible.

    If you want the blog style. make the OP stand out, and the comments in a different style. Then you can place the comment box in-between the Op and the comments.

    grep is your friend.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    @X00: Thanks very much for your help, but still no result... still ordering Ascending order...

    Tried different combinations of "c.DateInserted" "desc" and "c.CommentID", no luck

    in PhpMyAdmin the sorting is functioning as expected, with just sorting "DateInserted":

    SELECT *
    FROM GDN_Comment
    ORDER BY DateInserted DESC

    noooooo clue.... :D:D:D

    I have to go deeper on this "CommentModel", found this:
    http://www.vanilla-wiki.info/vdocs/class_comment_model.html#ad535eaad328d4eeb7fb9368c7a8a1d35

    but no solution for me... :D

    Never give up... :D

  • Options
    x00x00 MVP
    edited August 2013

    You are using Voting plugin. this already changes the order, which it is why is not working.

    grep is your friend.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    ARGHH!! YESS!!! That was the Problem!! Didn't think about that!!

    THANK YOU sooooo much, x00.... it works as described... ;)

    I'll now try the rest of your suggestions above.. ;)

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    OKeee...... i think i came a good way further... ;)

    http://caba.de/CaBaFoRuM/index.php?p=/

    here the (maybe) last two Questions before finishing porting:

    1. How to move the panels from right to left?
    2. How to mark all discussions as viewed FOR ALL USERS? (like the "All Viewed plugin", just for all users)

    I think that would then be it.... finished porting.. ;)

    Thanx in advance... ;)

    p.s.:
    I'll try to put some text for others about my Problems and Solutions, thanks to you... ;)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    How to move the panels from right to left?

    #Panel{
    float:left;
    }
    

    How to mark all discussions as viewed FOR ALL USERS? (like the "All Viewed plugin", just for all users)

    this will hide the "new" part

    .DataList .Meta strong {
    display:none;
    }
    
  • Options

    @Dr_Sommer said:
    p.s.:
    I'll try to put some text for others about my Problems and Solutions, thanks to you... ;)

    In the Vanilla Wiki please. I'll help when email is not sent from Wiki, etc.

    Extra question for you. Do you want to turn on rewrite Urls? See if your site still works then. Nothing special, just see if you think it looks better that way.

    1. How to mark all discussions as viewed FOR ALL USERS? (like the "All Viewed plugin", just for all users)

    There is a mysql table. For every user you have to give an entry for every discussion. So if you have 1000 users and 1000 discussions you will get ... 1 million records.

    I would enable the 'AllViewed' plugin and let the users do it themselves.

    1. How to move the panels from right to left?

    It's pure CSS what you need to do to move the panel.

    Check out my themes. They are really simple. I have 1 theme with the 'panel' on the left and one theme with the 'panel' on the right. You can compare the 2 CSS files and see what you need to do. Big chance V-Doc will stop by to help a little.

    There was an error rendering this rich post.

  • Options

    Let me quote myself:

    @UnderDog said:
    I would enable the 'AllViewed' plugin and let the users do it themselves.

    You can also 'Archive' the discussions, so if your users wish to read old discussions, they just go there. Nothing like a fresh, clean, completely read forum.

    Last thing. Check your 'Discussion' and 'Comment' tables. What is the value in the 'Format' columns? Will you be using ButtonBar and Markdown?

    There was an error rendering this rich post.

Sign In or Register to comment.