Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Badges

Try Vanilla Forums Cloud product

River MVP

About

Username
River
Joined
Visits
1
Last Active
Roles
Member, Developer
Points
594
Badges
10
  • Re: pn.js

    @onefifty said:
    I'm trying to place this plugin into the theme "Glass". I've tried every Url path I can think of. I've tried bones, cards, I even tried throwing salt over my shoulder, turned my hat around backwards; I not sure what to do with this think. I know this, I'll stay at it until I fugure it out.

    If you stated your problem clearer it might be easier. Do you see a menu item for privacy?
    what error if any do you get. also what links are you trying? where is your forum folder?
    are you using rewrite urls? Is your .htaccess correct?

    in the meantime....

    if you want the plugin to work with the standard mobile theme and bittersweet theme.

    • I suggest you test the following code with BitterSweet and see if it works and pops up a message.

    I looked at the PrivacyNotice plugin and gave it a haircut and a shave (got rid of code that seemed superfluous )

    • Look at the PrivacyNotice/default.php

    • and look for class PrivacyNoticePlugin extends Gdn_Plugin {

    • delete the lines IMMEDIATELYAFTER class PrivacyNoticePlugin extends Gdn_Plugin { to the END of the plugin and replace with

       public function PluginController_PrivacyNotice_Create($Sender) {
                  $Sender->Render('PrivacyNotice', '', 'plugins/PrivacyNotice');
       }
      
       public function Base_Render_Before($Sender) {
                if ($Sender->Menu) {
                   $Sender->Menu->AddLink("",T('Privacy-Info'),'plugin/PrivacyNotice', "", array('class'=>'Popup')   );             
                }
        }
       }
      

    after getting plugin working the Bittersweet, test with Glass theme.

    you may just be able to add or change for the glass Theme.

    $Sender->Menu->AddLink("Menu",T('Privacy-Info'),'plugin/PrivacyNotice', "", array('class'=>'Popup') );

    DISABLE the PrivacyNotice Plugin
    RE ENABLE the PrivacyNotice Plugin
    (optionally goto routes and remove the unnecessary route).
    if you still have problems post an image with error with BitterSweet and then with Glass.
    The assumption is the the privacynotice.php resides in PrivacyNotice/views folder and you editing that file
    also upgrade forum to vanilla 2.5.1

    alternatively you can use https://open.vanillaforums.com/addon/basicpages-application as mentioned above, or https://open.vanillaforums.com/addon/extrapage-plugin or https://open.vanillaforums.com/addon/simplepages-plugin

    there are hundreds of easy ways to accomplish adding a popup privacy notice or a static privacy page.

    Always best to test with core themes to determine issue.

    vrijvlinder
  • Re: Advanced editor with BBCode - color and size buttons?

    @Caylus said
    So I've found that in plugins ->editor ->class.editor.plugin.php I can edit getAllowedEditorActions to enable a color button.

    ('color' => true).

    or you could use https://vanillaforums.org/addon/aeconfig-plugin instead of editing plugin directly.

    But if I use the BBCode inputformatter, that button doesn't seem to do anything.

    True. it probably only works with wyiswyg due to js to handle for bbcode does not exist in the plugin

    Anyone an idea how to adapt the advanced editor so that it'll add a "color=" bb tag when you press a certain color button?

    Also, is there a button already for text size I can activate somewhere?


    no buttons for size (except for h1 and h2 which is not presented in markdown) but there are some classes allowed for different text sizes when used with span.

    Thanks in advance for any ideas :D

    h e llo w orld

    Someone might have a solution. I see that you are up against 3 factors.

    creating a new toolbar item or clicking an existing toolbar item and having it insert a bbcode, as well as making sure the js converts it to a whitelisted item.

    you pretty much have to use classes and assign them to spans, otherwise you would could get XSS attacks with the style command, and you wouldn't want user to use unlimited font-size probably.

    if you look at the editor js you see it uses different js depending on the formatter.

    you see depending upon wysiwyg vs. bbcode different js files get loaded.

    so you need to either add some js to do what you might want to do probably based on the js that is loaded

    e.g. wysihtml5-0.4.0pre.js does the work for the wysiwyg combined with the whitelisting of advanced.js

    and BBCode uses buttonbar.plus.js to translate and act upon things.

    https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/plugins/editor/js/editor.js#L1754

    so you can add things and change arrays with public function EditorPlugin_InitEditorToolbar_Handler

    then you need to make sure your js interacts properly and translates to a whitelisted item.

    you can look at sketchfab addon on integrating to toolbar and you can look at premhide or spoiler for other ideas to replace things.

    you could also try adding bbcode as a case but it will probably break other things.

    https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/plugins/editor/js/editor.js#L1511

    regarding colors you could make a dropdown menu with new color and values and test for operation the way buttonbar.plus.js

    although ultimately I think someday the editor will be cleaned up and the disparate parts cleaned up.

    X

    kind or ironic though, to use bbcode format period for new posts, when you have a toolbar menu to produce the effects one-click with other formatters.

    vrijvlinderCaylus
  • Re: File failed to upload

    If you created your own forum, you have to determine if you are using the apache web server! or some other server!

    do you know?, some of us don't.

    if you are not using apache, anything anyone tells you about .htaccess means nothing. Because .htaccess is used by Apache and not by other common web servers. (i.e. nginx, IIS).

    to get more focused help, provide real information that is more complete, bits and pieces trickling through results in more guessing and voodoo.

    https://vanillaforums.org/discussion/comment/241979/#Comment_241979
    https://vanillaforums.org/discussion/comment/242829/#Comment_242829

    you could do most of the work yourself, if you can follow instructions and search the forum for key information.

    Bottom line.
       if you don't get rewrite url's working you will continue to have problems with other things as well.
       try to avoid IIS server if possible, it is often "easier for novices to use linux when setting up vanilla", and vanilla ofter has problems with IIS. 
    
    avoid IIS, not many people have good experience with it on this forum, or if they are capable with IIS, they don't come here to provide much help.
    check for errors in error log and check for js console errors (which you have).
    a complete listing of your php info
    posting of config.php with passwords and salts and emails removed.
    screenshots of the media table for the media id that is not updating in your next attempt.
    screenshots of permissions and ownership of uploads folder and sub folders
    disable broken plugins which you have enabled.
    remove unused non-core plugins, especially plugins that are not compatible with 2.2.1
    make sure you are not using strict mode with sql, when testing.
    check error logs for mismatched table names - upper and lower case can affect things.
    
     read the tutorials on troubleshooting.  the FAQ.  and the installation instructions.
     search for the threads where people have had trouble,  pretty much all the reasons for images not uploading have been discussed, "search images broken, pictures broken, failed to upload, etc,  and it is a logical process.
    

    if you do decide you want help, and want to provide the necessary info. please post the screenshots not links to other places and provide all the info requested.

    I am guessing you don't use apache because you had so many issues with $Configuration['Garden']['RewriteUrls']=TRUE;
    I am also guessing because you haven't told us. So my guess could be wrong :(

    Double Bottom Line:

    You will probably be struggling for another few months till eternity if you use IIS. although I provided a link to a link that for iis rewriting might help you (but might not). Just want to warn you about IIS.
    You will be much happier with linux and apache or linux and nginx, or at the very least use Apache or nginx when working with vanilla and plugins, and you might get better support here.

    https://vanillaforums.org/discussion/28420/frequently-asked-questions

    https://lunarpages.com/apache-vs-iis-which-web-server-should-you-choose/

    vrijvlinder
  • Re: How to remove this?

    Do you know what your server is?

    • If you don't I suggest you ask your host and then post what web server you use!

    • aside from the mandatory config statement for rewriting urls

    in conf/config.php change or add this line to:

    $Configuration['Garden']['RewriteUrls'] = true;

    your web server must be capable of rewriting urls.

    once you provide your web server type, you can get better help.

    ask your host to allow your server to rewrite urls, and if you are using Apache or something compatible that recognizes .htaccess, you must be able to override things via .htaccess.

    if your server does not recognize .htaccess (e.g. IIS, Nginx) you need to create your own file that vanilla does not provide to rewrite the urls for vanilla, provided your server is set allow rewrites.

    the readme which NO ONE apparently reads.

    https://github.com/vanilla/vanilla/blob/master/README.md says:

    Vanilla is compatible up to PHP 5.6 (the current release) and we always recommend using the lastest stable PHP release whenever possible. PHP 7.0 compatibility is expected in 2.3.
    
    To use our social plugins, PHP's OpenSSL support must be enabled.
    
    Vanilla ships with a .htaccess file required for Apache support. <b>Nginx and IIS require additional configuration.</b>
    

    if your server is apache the readme does not tell you, but you must configure the .htaccess properly.

    if you use apache ....

    https://vanillaforums.org/discussion/comment/220157/#Comment_220157

    apache type forks may not be totally compatible.

    vrijvlinderJamesbro
  • Re: Some adjustments to more clearly see Ask a Question in Q & A 1.2.1 (new discussion button).

    @okhawaja said:
    I followed the steps in the first 3 comments from the top, and it all works fine, but I get this big error when I click Unanswered Questions in the menu.

    I

    A professional TIP - if you are not using Q & A version 1.2.1 - you are in the wrong discussion.

    A second professional tip - If you are not using Vanilla 2.1 - you are in the wrong discussion

    A third tip - warnings are warnings - turn off debugging if you don't want warnings.

    with Q & A 1.2.4

    -1 ignore everything you have read above regarding changes, since you do not have the same versions.

    all you need to make big buttons

    -2 $Configuration['Plugins']['QnA']['UseBigButtons'] = TRUE;

    in 1.2.4 you will see public function discussionController_render_before($sender) { you might change discussion to discussions.

    you might also comment this part out, not sure.

    if ($Sender->Data('Discussion.Type') == 'Question') {
    $Sender->SetData('_CommentsHeader', T('Answers'));
    }

    you also need to change

    -3 in the module

    use return instead of echo.

    return Anchor(T('Ask a Question'), '/post/question', 'Button BigButton NewQuestion');

    as far as I can tell this version Version' => '1.3', also might have bugs. https://github.com/vanilla/addons/blob/master/plugins/QnA/class.qna.plugin.php#L11

    if you are totally confused, then start a new discussion - list your version of vanilla, and your version number of QNA and what you want to accomplish.

    if you are not confused , then start a new discussion - list your version of vanilla, and your version number of QNA and what you want to accomplish.

    then read the FAQ to sort modules. https://vanillaforums.org/discussion/comment/232501/#Comment_232501

    and

    https://vanillaforums.org/discussion/28420/frequently-asked-questions

    It would be great if this add-on were updated and bug-free in the add-ons with the ability to use big buttons.

    If a discussion was started two years ago - good idea to start a new discussion - since the odds are things have changed.

    vrijvlinder