PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts

Wednesday, October 19, 2022

[FIXED] How to place content type settings in Orchard CMS Admin?

 October 19, 2022     admin, orchardcms, settings     No comments   

Issue

I recently updated Orchard to 1.10.1 and there seems to be a placement issue with some content type part settings:

  • Orchard 1.9

Drop down with Html above Html flavor settings

  • Orchard 1.10.1

Drop down with Html below Html flavor settings

How can i adjust the placement in a way that my settings (Html flavor settings) will be displayed below the drop down again?

I tried to use shape tracing to create a Placement.info file but to no avail.


Solution

I had to find another way to enforce the ordering as the solution of mdameer does not work and i came up with a simple jQuery solution

$(document).ready(function () {
    // get fieldset with my settings
    var $HtmlFlavorSettings = $(".html-flavor-settings");

    // get flavour drop down
    var $flavorSelection = $HtmlFlavorSettings.closest("form").find("[name$=\"BodyTypePartSettings.Flavor\"]");

    if ($flavorSelection.length > 0)
    {
        // place fieldset with my settings after fieldset with flavour drop down
        $HtmlFlavorSettings.insertAfter($flavorSelection.closest("fieldset"));
    }
});


Answered By - ViRuSTriNiTy
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Sunday, October 16, 2022

[FIXED] How do you enable :has() selector on Firefox

 October 16, 2022     css, css-selectors, firefox, settings     No comments   

Issue

When I check the :has() css selector on caniuse.com, it tells me that since Firefox103 it has been "Supported in Firefox behind the layout.css.has-selector.enabled flag". So how do I find this flag and enable it?


Solution

Go to the Firefox about:config page, then search and toggle layout.css.has-selector.enabled.

enter image description here



Answered By - Cédric
Answer Checked By - Terry (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Thursday, August 25, 2022

[FIXED] How to change the default module docstring in Spyder?

 August 25, 2022     docstring, module, settings, spyder     No comments   

Issue

How to change the default template for new modules in Spyder IDE?

# -*- coding: utf-8 -*-
"""
Created on %(date)s

@author: X
"""

Solution

Preferences > Editor > Advanced settings > Edit template for new modules

changing default docstring for modules in Spyder



Answered By - Abdulrahman Bres
Answer Checked By - Pedro (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Friday, July 15, 2022

[FIXED] How to design a vue-cli app that be configured after build?

 July 15, 2022     settings, typescript, vue-cli-3, web-deployment, webpack     No comments   

Issue

I have a working vue-cli app, that I can build without a problem. Now, I want to package a single build that will be deployed on several servers. My problem is that, depending on the server, I'll have to tweak some simple variables (server port, API token, etc.).

Clearly, it's not a suitable solution to run several builds (based on .env files, or whatever) because of the context. I often get settings information on site and have to configure them quickly.

Before working with Webpack and all its underlying compilation process, I had a classic js file embedding the settings and I would like to produce something similar. For what I know, files created on the public folder are not reachable from vue components (with import directive) and once minified, it's not a solution to tweak settings.

Is it possible to tell vue-cli3 or webpack to keep a specific file or folder "as is"? Or maybe that there is a way cleaner solution?


Solution

Well, just in case someone, one day, will need to do something similar, here is my solution:

  1. I create un config file in the public dir, like settings.json
  2. In the App.vue component, I specify a mounted() method that will be automatically called at component launch (see VueJs components lifecycle if needed). This methods:

    1. Asynchronously query the static settings.json file to get the current file (with Axios in my case)

    2. Store the values in a dedicated store section (see VueX or any simpler store structure). In my case this looks something like:

Long story short:

Store.ts

let store = {
    ...

    // Will receive our config.json file content
    settings: {},
};

export default store;       

App.vue

mounted() {
    Axios.get('./settings.json')
        .then((response) => {
            Store.Settings = response.data;
         })
}

This may not be perfect, but there is no need of an external technology, settings reachable from every component just like your states are in the store.

Let me know if that sounds weird or there is a better solution.



Answered By - Glandalf313
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Friday, July 8, 2022

[FIXED] How to get FB application posts to be public and link clickable?

 July 08, 2022     facebook, posts, privacy, public, settings     No comments   

Issue

I have created a FB app (https://developers.facebook.com/apps/566403306788175) that posts to my FB profile through an external system called Social Oomph. Although the settings on my FB profile are set to Public, the posts from the app are appearing to Friends only.

I cannot see a way inside the FB app itself to set the posts to be Public. How can I do this?

I found this topic that appears to be related but is perhaps out of date, since I can't find any "App activity privacy": Making public posts via Facebook App? nor can I find any reference to Privacy Settings within the app either.

On a related note, the name of my application (which displays under every post the app makes) is not clickable, though I have specified a site URL for the app on the basic settings page.

How can I make sure the link for this app is clickable?

Thanks in advance for any insights anyone can provide.


Solution

By default, the app setting is set to Fiends I guess. Also, whatever setting user has chose for an app remains for all the apps that he is going to authorize in future until he changes the one.

But its possible to change the privacy setting of a feed through Graph API, you can add additional parameter- privacy with your /me/feed call. I'm not sure what sdk or language are you using but you can just add this extra parameter with your call-

Parameter: privacy
Value: EVERYONE

More details here

Please Note

Since a user can also manually sets the privacy of an applicationfrom here- Facebook Settings- the actual privacy applied will be the more restrictive privacy setting between the two.

eg.

If the user has set "Only Me" in the facebook settings, but in app you applied "Public", then the user's preference, i.e. Only Me will be used.
But if the user has set "Public" in the app settings, but in the app you applied "Friends", then the app's setting i.e. "Friends" is used, as it's more restrictive than the User's settings.

Hope that helps.



Answered By - Sahil Mittal
Answer Checked By - Robin (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Wednesday, February 9, 2022

[FIXED] Phpmyadmin: How to add permanent setting for exporting mysql gzipped by default

 February 09, 2022     compression, config, gzip, phpmyadmin, settings     No comments   

Issue

There is a setting under settings > export > compression for default compression method when you hit "export database" (I want gzip).

How to add permanent setting for exporting mysql gzipped by default

I cannot do it permanent. Every time I restart server it is set back to compression none method.

How to make this settings permanent using phpmyadmin config file?


Solution

Update config file config.inc.php in top-level directory.

Add string

$cfg['Export']['compression'] = 'gzip';


Answered By - verybadbug
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing