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.

Users config . An idea

422422 Developer MVP
edited April 2012 in Vanilla 2.0 - 2.8

Is it possible, by a click of a button.. For a user to generate a config panel, consisting of forum version, enabled plugins etc. With no confidential info. That they can paste here when asking for support?

Just an idea

There was an error rendering this rich post.

Best Answer

  • peregrineperegrine MVP
    Answer ✓

    name the file myconfdisplayer.php

    <?php
        $filename = "conf/config.php";
        $fp = fopen($filename, "r");
        if($fp)
        {
        echo "<br /><code><br>";
        echo "<br />&lt;code><br>";
        while(!feof($fp))
        {
        $line = fgets($fp);
        if (preg_match('/Version/',$line))
        {
        echo "Version: $line<br />";
        }
        if ((preg_match('/Plugin/',$line)) && (!preg_match('/GettingStarted/',$line)))
        {
        echo "Plugin: $line<br />";
        }
        if ((preg_match('/Debug/',$line)) || (preg_match('/Errors/',$line)))
        {
        echo "Debugging: $line<br />";
        }
    
        }
        echo "<br />&lt;/code><br>";
        echo "<br /></code><br>";
        }
        ?>
    

    run it
    http://"putyourhosthere"/vanilla/myconfdisplayer.php

    and it displays plugins, version info, and debugging info.


    Version: $Configuration['Conversations']['Version'] = '2.0.18.4';
    Plugin: // EnabledPlugins
    Plugin: $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    Plugin: $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
    Version: $Configuration['Garden']['Version'] = '2.0.18.4';
    Debugging: //Errors
    Debugging: $Configuration['Garden']['Debug'] = TRUE;
    Debugging: $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
    Plugin: // Plugins
    Plugin: $Configuration['Plugins']['OnlyRead']['ButtonLabel'] = 'My New button';
    Version: $Configuration['Vanilla']['Version'] = '2.0.18.4';

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

«1

Answers

  • It's a good idea, but it needs to be created, it's not available at the moment as far as I can see...

    There was an error rendering this rich post.

  • 422422 Developer MVP

    Wonder if one of the plugin gurus here could make it?

    There was an error rendering this rich post.

  • hbfhbf wiki guy? MVP

    If only there were someone around here that knew php and how to write plugins for vanilla....

  • peregrineperegrine MVP
    edited April 2012

    what do you want?

    I don't think a plugin is a good idea, since vanilla might not be functional.
    but they could download a script like this if there was a place to download it from on vanilla forums and cut and paste results.

    place this file in /vanilla directory it will skip database, password private info.

    and run http://"putyourhosthere"/vanilla/myconfdisplayer.php

    <?php
        $filename = "conf/config.php";
        $fp = fopen($filename, "r");
        if($fp)
        {
        while(!feof($fp))
        {
         $line = fgets($fp);    
           if ((!preg_match('/Database/',$line)) &&(!preg_match('/Salt/',$line)) && (!preg_match('/SupportName/',$line)) && (!preg_match('/Last edited/',$line)))
                { 
              echo "$line<br />";
              }  
        }
       }
        ?>
    

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

  • 422422 Developer MVP

    Thats cool, could you show us some demo output? Please

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012
       // Conversations
        $Configuration['Conversations']['Version'] = '2.0.18.4';
    
    
        // EnabledApplications
        $Configuration['EnabledApplications']['Conversations'] = 'conversations';
        $Configuration['EnabledApplications']['Vanilla'] = 'vanilla';
    
        // EnabledPlugins
        $Configuration['EnabledPlugins']['GettingStarted'] = 'GettingStarted';
        $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
        $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
    
        // Garden
        $Configuration['Garden']['Title'] = 'Test';
        $Configuration['Garden']['Cookie']['Domain'] = '';
        $Configuration['Garden']['Registration']['ConfirmEmail'] = TRUE;
        $Configuration['Garden']['Version'] = '2.0.18.4';
        $Configuration['Garden']['RewriteUrls'] = TRUE;
        $Configuration['Garden']['CanProcessImages'] = TRUE;
        $Configuration['Garden']['Installed'] = TRUE;
        $Configuration['Garden']['Theme'] = 'EmbedFriendly';
    
        // Modules
        $Configuration['Modules']['Vanilla']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
        $Configuration['Modules']['Conversations']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
    
        // Plugins
        $Configuration['Plugins']['GettingStarted']['Dashboard'] = '1';
        $Configuration['Plugins']['GettingStarted']['Discussion'] = '1';
        $Configuration['Plugins']['GettingStarted']['Plugins'] = '1';
        $Configuration['Plugins']['GettingStarted']['Categories'] = '1';
        $Configuration['Plugins']['GettingStarted']['Profile'] = '1';
        $Configuration['Plugins']['OnlyRead']['ButtonLabel'] = 'My New button';
    
        // Routes
        $Configuration['Routes']['DefaultController'] = 'discussions';
    
        // Vanilla
    $Configuration['Vanilla']['Version'] = '2.0.18.4';
    

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

  • 422422 Developer MVP

    Thats good, i was thinking more like.

    Vanilla version: xyz

    Plugins enabled:
    Buttonbar v .123
    Voting v. Abc

    Etc

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012

    it could be condensed but it lists all the info that helps debug plugins to with option settings.

    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 April 2012

    slimmed down

               <?php
                $filename = "conf/config.php";
                $fp = fopen($filename, "r");
                if($fp)
                {
                while(!feof($fp))
                {
                 $line = fgets($fp);    
                   if (preg_match('/Version/',$line))
                        { 
                      echo "Version: $line<br />";
                      }  
               if ((preg_match('/Plugin/',$line))  && (!preg_match('/GettingStarted/',$line)))
                        { 
                      echo "Plugin: $line<br />";
                      }  
    
                }
               }
                ?>
    
    
    results
                 Version: $Configuration['Conversations']['Version'] = '2.0.18.4';
                Plugin: // EnabledPlugins
                Plugin: $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
                Plugin: $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
                Version: $Configuration['Garden']['Version'] = '2.0.18.4';
                Plugin: // Plugins
                Plugin: $Configuration['Plugins']['OnlyRead']['ButtonLabel'] = 'My New button';
                Version: $Configuration['Vanilla']['Version'] = '2.0.18.4'; 
    

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

  • 422422 Developer MVP

    Now your talking, thats brilliant. If that info could be formatted for posting on the forums or sharing with devs would be ace.

    This needs to be a core function of vanilla.

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012

    :)

    <?php
    $filename = "conf/config.php";
    $fp = fopen($filename, "r");
    if($fp)
    {
    echo "<br /><code><br>";
    echo "<br />&lt;code><br>";
    while(!feof($fp))
    {
    $line = fgets($fp);
    if (preg_match('/Version/',$line))
    {
    echo "Version: $line<br />";
    }
    if ((preg_match('/Plugin/',$line)) && (!preg_match('/GettingStarted/',$line)))
    {
    echo "Plugin: $line<br />";
    }
    }
    echo "<br />&lt;/code><br>";
    echo "<br /></code><br>";
    }
    ?>
    

    results with cut and paste


    Version: $Configuration['Conversations']['Version'] = '2.0.18.4';
    Plugin: // EnabledPlugins
    Plugin: $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    Plugin: $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
    Version: $Configuration['Garden']['Version'] = '2.0.18.4';
    Plugin: // Plugins
    Plugin: $Configuration['Plugins']['OnlyRead']['ButtonLabel'] = 'My New button';
    Version: $Configuration['Vanilla']['Version'] = '2.0.18.4';

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

  • 422422 Developer MVP

    Smartarse ! Goodonya

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    Answer ✓

    name the file myconfdisplayer.php

    <?php
        $filename = "conf/config.php";
        $fp = fopen($filename, "r");
        if($fp)
        {
        echo "<br /><code><br>";
        echo "<br />&lt;code><br>";
        while(!feof($fp))
        {
        $line = fgets($fp);
        if (preg_match('/Version/',$line))
        {
        echo "Version: $line<br />";
        }
        if ((preg_match('/Plugin/',$line)) && (!preg_match('/GettingStarted/',$line)))
        {
        echo "Plugin: $line<br />";
        }
        if ((preg_match('/Debug/',$line)) || (preg_match('/Errors/',$line)))
        {
        echo "Debugging: $line<br />";
        }
    
        }
        echo "<br />&lt;/code><br>";
        echo "<br /></code><br>";
        }
        ?>
    

    run it
    http://"putyourhosthere"/vanilla/myconfdisplayer.php

    and it displays plugins, version info, and debugging info.


    Version: $Configuration['Conversations']['Version'] = '2.0.18.4';
    Plugin: // EnabledPlugins
    Plugin: $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    Plugin: $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
    Version: $Configuration['Garden']['Version'] = '2.0.18.4';
    Debugging: //Errors
    Debugging: $Configuration['Garden']['Debug'] = TRUE;
    Debugging: $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
    Plugin: // Plugins
    Plugin: $Configuration['Plugins']['OnlyRead']['ButtonLabel'] = 'My New button';
    Version: $Configuration['Vanilla']['Version'] = '2.0.18.4';

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

  • 422422 Developer MVP
    edited April 2012

    Awesome

    Version: $Configuration['Conversations']['Version'] = '2.0.18.4';
    Plugin: // EnabledPlugins
    Plugin: $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    Plugin: $Configuration['EnabledPlugins']['IndexPhotos'] = TRUE;
    Plugin: $Configuration['EnabledPlugins']['Example'] = TRUE;
    Plugin: $Configuration['EnabledPlugins']['CategoryAccordion'] = TRUE;
    Plugin: $Configuration['EnabledPlugins']['Quotes'] = TRUE;
    Plugin: $Configuration['EnabledPlugins']['ButtonBar'] = TRUE;
    Version: $Configuration['Garden']['Version'] = '2.0.18.4';
    Plugin: // Plugin
    Plugin: $Configuration['Plugin']['Example']['TrimSize'] = 100;
    Plugin: $Configuration['Plugin']['Example']['RenderCondition'] = 'all';
    Plugin: // Plugins
    Version: $Configuration['Vanilla']['Version'] = '2.0.18.4';
    
    

    There was an error rendering this rich post.

  • 422422 Developer MVP

    I changed code to pre

    There was an error rendering this rich post.

  • 422422 Developer MVP
    edited April 2012

    Added this to functions: $today = date("F j, Y, g:i a");

    and this after the second echo: echo "Generated".' '.$today.'< br>';

    I think my php is correct ( remove space from < br> )

    There was an error rendering this rich post.

  • 422422 Developer MVP
    edited April 2012

    Added the script inc readme to our downloads section:

    http://vanillaskins.com/downloads/

    Direct download link: Here

    There was an error rendering this rich post.

  • goodonya.

    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 April 2012

    @422

    one suggestion put the two files (readme and program) in a folder (e.g. myconfapp) and then zip the folder.

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

  • 422422 Developer MVP

    thats how its done:

    zip is display_my_configuration.zip

    inside myconfidisplayer.php and readme.txt

    Readme:

    Readme:
    
    This code was made by Peregrine: http://vanillaforums.org/profile/36251/peregrine
    
    To use, just place this php file in your forum directory.
    
    Then point to it, like so: www.mywebsite.com/myforum/myconfdisplayer.php
    
    Change the domain and forum name to suit your setup.
    
    You will see output, generated which contains your forum version and plugins used.
    
    Just copy that output, everything and paste into a new post on the forums, over at vanillaforums.org
    
    So that devs can help you
    

    There was an error rendering this rich post.

Sign In or Register to comment.