bootstrap integration with wordpress and datatable changes whole wp-admin background as white? - wordpress

I am using DataTables 1.10 and bootstrap downloaded from Datatables CDN link source.When I am integrating both with wordpress plugin, bootstrap changes the background color as white(#ffffff) for the whole wordpress admin panel and plugin page by default.Not getting why this happened ? This should not happen as i have seen in the examples.Please help me to sort this out. Thanks in advance

I believe you are probably enqueuing the CSS for whole WP admin, rather than just that specific plugin settings page. Also, if the background for body / container is changed, probably you are enqueuing some generic styles file (which sets style for body element). It's the easiest to see why this happens from Chrome's console (or Firebug or similar tool) - click "Inspect element" on the changed background, and see what CSS file does it come from.
Also you might want to check this free WordPress plugin that integrates DataTables in WordPress: http://wordpress.org/plugins/wpdatatables/

Related

How to change height of default wordpress embed link "windows"

could anyone tell me if it's possible to make all these(in picture) wp-default links with class .wp-embed .post same height so that it won't look horrible like in picture.enter image description here I know that it is programmed so that the height addapts to text size inside it.
How do i do that, i can't find they way how to overwrite that with CSS. Is it only achievable by PHP / if so how - i can barely read PHP for now...
There are two separate questions here:
How do I change the css on a wordpress site?
The answer is that it will depend on the setup of your site.
-- You may have access to edit the css for the theme by going to Dashboard -> Appearance -> Editor and then finding the style.css
-- You may also have access to edit the css file through manually editting the file on the server.
-- if those first two options don't work, and you are able to add plugins, you can add a plugin to let you add css to the page. Simple Custom Css is one such plugin.
How do I fix this particular css problem?
To answer this question I would need to see more of the css and html for this page

custom CSS code for DiscordApp

I Just need some Custom CSS code to change my Chat text a bit on an app called DiscordApp,
Auto Scroll To bottom of Page
Custom Text Size
Custom Avatar Text Channel Size
Link to DiscordApp
Link to Example CSS sheet for a random Theme
To inject custom CSS and JS into Discord, you'll need a third party plugin such as BetterDiscord
For the case of BetterDiscord, you have to follow their tutorial for the CSS changes. You can also dive into the settings and add it straight into custom CSS.
TLDR
Create a MyCSS.theme.css file with a META-tag and CSS
//META{"name":"My custom CSSScript","description":"Mine.","author":"Me","version":"1.0"}*//{}
.my-css-class{
/*Example...*/
}
Save this file to %AppData%\BetterDiscord\themes
Reload Discord with Ctrl+R and activate your theme, if you hadn't already
If you want to quickly try out themes or Javascript, hit the Ctrl + Shift + I keycodes. It'll open the developer tools of Discord
Auto Scroll To bottom of Page sounds more of a JS function though, you can easily achieve it by creating a scrollToBottom.plugin.js file containing at least
//META{"name":"ScrollDown"}*//
window.scrollTo(0,document.body.scrollHeight);
the function being inside of a button you place on screen. Discord supports jQuery, so pure javascript isn't even necessary.
The steps for adding javascript plugins is about the same, but inside of the plugins folder instead, and they're called MyPlugin.plugin.js
Note: installing unofficial third party tools or software might leave you prone to hacks, leaks and other security issues.

Wordpress editor showing white text

I have a problem with a Wordpress site, the editor is showing the text as white (on a white background) so unless you highlight the text, you can't see it. This is only in the admin section of the site, the front-end doesn't seem to be affected
I have found where the css is changing the text to white ( /wp-includes/css/editor.min.css ):
.js .tmce-active .wp-editor-area{color:#fff}
I have removed this and cleared the cache (even tried a different browser) but it's still showing in the editor.
Also, the 'Visual' and 'Text' buttons don't work.
Any ideas?
I have gone through an disabled each plugin, one at a time but it still is a problem.
Check your javascript console. If you see an error like:
"post.php?post=2840&action=edit:2783 Uncaught ReferenceError: tinymce is not defined"
Then the loading of wp-tinymce.php failing. Because the editor hasn't loaded, it appear as if your text is white, or "invisible" in the editor. This can be worked-around by adding:
define('CONCATENATE_SCRIPTS', false);
(Per Tijmen above, or https://wordpress.stackexchange.com/a/63172/118510)
(I use WP Fastest Cache plugin which has it's own concatenation, so if I use that plugin, then I'm OK skipping the default Wordpress concatenation.)
The root problem, however, is that a request to:
/wp-includes/js/tinymce/wp-tinymce.php?c=1&ver=4506-20170408
Is failing or receiving a 404. This could be due to a security restriction on your hosting or CDN.
Let's start with the obvious: is your Wordpress install completely up-to-date, including all plug-ins, themes etc?
It could help to actively declare the color to be black, instead of simply removing the line of CSS you removed, so:
.js .tmce-active .wp-editor-area{color:#000000}
Alternatively, this issue has been known to be caused by several plugins, such as PS Disable Autoformatting, however that instance was a few years ago. Did you recently install a plug-in? If so, try disabling that plug-in to see if that returns the editor to normal.
If none of this solves the issue, you can also try downloading Wordpress and replacing the /wp-includes/js/tinymce/ folder. Although it's unlikely, it's not impossible that something went wrong during an update or so.
If nothing else works, according to this link, you can open your wp-config.php file and add the following line at the very top after the php opening tag.
define('CONCATENATE_SCRIPTS', false);
I have just fixed this problem and thought it would be worth mentioning this basic check to others. If you are installing another theme or a second theme that installs it's own set of plugins, make sure you don't have any existing plugin composers installed or still activated. This can cause the conflict that makes the text white and the tabs to not work.
For me, I had both CMSMasters Content Composer (From previous theme) and WPBakery Visual Composer (From new theme) installed and active, which gave me this exact issue. I had also tried replacing the tinymce file and adding the extra line to wp-config, but none of these worked. Deactivating CMSMasters Content Composer fixed the white text issue for me.
Go into your account settings and check "Disable the visual editor when writing" ... Now try your page and/or post again. You should have text, not in white, and now you should be able to edit your page. Of course, you won't have a visual editor and that isn't any fun.
I think this eventually is a server problem where there are not enough resources for all the block rendering for both javascript and css. In Chrome, check the 'performance' of the page in developer tools ... it's likely less than 30.
For me, the problem was caused by the way the wordpress editor interacts with vue.js in my plugin's custom admin page.
Specifically, the white-text issue on the editor was caused by being inside of a v-if. There must be some conflict in how v-if renders the content which breaks TinyMCE if it is inside of the v-if.
The fix was as simple as switching to v-show. This causes the TinyMCE to be rendered once on page load and then just hidden as needed. Using v-show causes the editor text and toolbar rendered normally.

Django CMS Deleting HTML5 Tags and Attributes

I am having a big time issue with solving a problem. I have a placeholder called main for the content region of the page. I was building that region in the cms. Everything was going great until I attempted to add an embedded video contained in an iframe. When I save django cms completely removed the iframe and left an empty div. So I attempted to use prettyphoto light box to open the video by clicking on an image. The code I added to the page through the cms is:
<a rel='prettyPhoto[youtube]' href="https://www.youtube.com/embed/mqVZF_yb8C0?autoplay=1&start=1765&iframe=true" data-rel="prettyPhoto">Click Image</a>
When I saved, django cms completely removed the data-rel attribute from the link which is obviously needed for the js. So I went a step further and adapted the code of the data attribute to:
rel="prettyPhoto"
and the cms also removed that attribute! Also anytime I add an html5 tag like article of section it hates that too! What gives here? Am I doing something wrong? Any advice would be appreciated. 
Aaron,
Thanks.
Please see the discussion at https://github.com/divio/django-cms/issues/1529. We use html5lib to clean the contents of the text plugin (this cannot be turned off for security reasons).
What you'll want to do is write a custom plugin (possibly one that can be embedded inside text plugins).

WordPress (3.5.1) Theme Media Upload gets frozen

I've read some of the topics here but did not found a solution for me. When I try to set a feature image to the post/portfolio the media upload window gets frozen(cant even close it down - pressing esc does the trick) and also can't set the feature image, upload an image, ..
If trying this in IE 8 I get a pop up error when opening the media upload(pressing set feature image) with this content "Out of memory at line 2!"
I am using the Wordpress version 3.5.1, thanks in advance for a posibble solution.
TNX!
May add that the IE8 also gives errors for:
wp-admin/js/media-upload.min.js?ver=3.5.1 and
wp-includes/js/tinymce/tiny_mce.js?ver=358-23224,
if switching to themeeleven the upload works ok, but not in my theme.
If uploading works fine in a default Wordpress theme like twentyeleven or twentytwelve, that means there is a javascript conflict with your theme, esp. indicated by the IE8 errors. Possibly a plugin, but most likely the theme.
Look at http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list?replies=4 to see if your theme (or a plugin) is listed as problematic and to learn how to check for javascript errors that will impact the Wordpress admin area.
Use Firebug with Firefox, or use the developer tools in Chrome or Safari or IE to see what javascript is loading on your site and see any errors and conflicts.

Resources