MediaWiki Page Title Lowercase $wgCapitalLinks = false not working - mediawiki

I am having trouble to set all page title in lowercase.
I have added $wgCapitalLinks = false; but still not working. Please help me.

Try this (add to LocalSettings.php):
$wgHooks['BeforePageDisplay'][] = 'fnSetTitle';
function fnSetTitle(&$out, &$sk) {
$out->mPagetitle = strtolower($out->mPagetitle);
return true;
}

Related

ion-slides bound [pager] will not reappear when switching from false to true based on condition

Following is the html part for ion-slides :
<ion-slides [pager]="showPager" [options]="slideOpts" #slides>
component js file variables initially assigned like this :
pages: number = 1;
showPager: boolean = false;
and conditionally assigned like this:
if(this.pages > 1) {
this.showPager = true;
} else {
this.showPager = false;
}
So, when I change the value of var "pages" , it does not update the pager attribute , can anybody guide me in this.. Thank you so much in advance

How to fix the issues when I update wordpress in php 7

please help me to fix.
I have updated the PHP 5.6 to php7.3.
But the WordPress sites don't work well.
As you can see, the new site's below is not working despite the same code and the same database.
I have replaced the '& new' to 'new' based on the StackOverflow's answer. I appreciate if you give me the answer. Thanks.
Thanks.
I added some codes in the wp-config.php
ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
And I updated the customLoop function in the PeThemeContent.php
public function customLoop($type,$count = 10,$tax = null,$custom = null,$paged = false) {
$args = $this->getPostsQueryArgs($type,$count,$tax,$custom,$paged);
if ($this->current) {
$this->loops[] = $this->current;
}
$this->master->data->postSave();
$this->current = new WP_Query($args);
return $this->current->post_count > 0;
}
So, the issue is solved.

Type script variable is not getting updated in html after calling a function in angular 6

Sample program TS:
thunderSuperDrop$ = false;
public action = {
superDropActivate(){
this.thunderSuperDrop$ = !this.thunderSuperDrop$;
console.log(this.thunderSuperDrop$);
}
}
HTML :
<div class="header-links same-line"
(click)="action.superDropActivate()"></div>{{thunderSuperDrop$}}
Initially the variable thunderSuperDrop$ is set as false and appears in the DOM. Its not getting refreshed after applying the function which works fine.
Try this way
superDropActivate(){
this.thunderSuperDrop$ = true;
console.log(this.thunderSuperDrop$);
}
HTML
<div class="header-links same-line"
(click)="superDropActivate()">{{thunderSuperDrop$}}</div>

I can edit the content before printing?

The first chrome plugin to work. I do not have detailed information.
Before I print the contents of This link I want to get the specific part.
<table class="receiptSectionTable2Col" >
just how can I print the contents of this table. Is this possible?
I think this answer from this question will help you:
HTMLElement.prototype.printMe = printMe;
function printMe(query){
var myframe = document.createElement('IFRAME');
myframe.domain = document.domain;
myframe.style.position = "absolute";
myframe.style.top = "-10000px";
document.body.appendChild(myframe);
myframe.contentDocument.write(this.innerHTML) ;
setTimeout(function(){
myframe.focus();
myframe.contentWindow.print();
myframe.parentNode.removeChild(myframe) ;// remove frame
},3000); // wait for images to load inside iframe
window.focus();
}
Usage in your case:
document.getElementsByClassName("receiptSectionTable2Col")[0].printMe();

Accessing DOM object properties from Chrome's content script

I ran into a strange problem with a content script. The content script is defined as "run_at" : "document_end" in the manifest. After a page is loaded the script inserts an object tag into the page (if the tag with predefined id does not exist yet), and sets some properties in it, such as type, width, height, innerHTML, and title. All works fine here.
function checkForObject()
{
var obj = document.getElementById("unique_id");
if(obj == null)
{
var d = document.createElement("object");
d.id = "unique_id";
d.width = "1";
d.height = "1";
d.type = "application/x-y-z";
d.title = "1000";
d.style.position = "absolute";
d.style.left = "0px";
d.style.top = "0px";
d.style.zIndex = "1";
document.getElementsByTagName("body")[0].appendChild(d);
}
}
checkForObject();
I see the new object in the page html-code with proper values in its properties.
Some time later I need to read the title property of the object in the same content script. The code is simple:
function ReadTitle()
{
var obj = document.getElementById("unique_id");
var value = obj.title; // breakpoint
console.log(value);
// TODO: want to use proper title value here
}
The function is called from background.html page:
chrome.tabs.onActivated.addListener(
function(info)
{
chrome.tabs.executeScript(info.tabId, {code: 'setTimeout(ReadTitle, 250);'});
});
Unfortunately, in ReadTitle I'm getting not what I expect. Instead of current value of the title I see the logged value is:
function title() { [native code] }
If I set a breakpoint at the line marked by // breakpoint comment, I see in the watcher that all object properties including the title are correct. Nevertheless, the variable value gets the abovementioned descriptive string.
Apparently, I have missed something simple, but I can't figure it out.
The answer. It was a bug in the npapi plugin, which hosts the object of used type. My apologies for all who have read the question with intention to help.
The NPAPI plugin used in the object erroneously reported title as supported method.