Mediawiki custom namespaces id change - namespaces

I am currently working on an internal Mediawiki and we are using a lot of custom written extensions.
Because we did no know better, defined custom namespaces for our own extensions and articles with an id that is smaller than 3000.
For example:
define('NS_bla', 1100);
$wgExtraNamespaces[NS_bla] = "bla";
define('NS_bla_TALK', 1101);
$wgExtraNamespaces[NS_bla_TALK] = "bla Talk";
We did this with several different extensions. Now we read on the official documentation (http://www.mediawiki.org/wiki/Extension_default_namespaces) that custom namespaces should use id's that are 3000+.
Therefore my question: How can we easily change the IDs of the namespaces on the production instance, without messing up with our current dataset? How could we tackle this problem? I could not find any information on the Mediawiki documentation.
Thank's a lot in advance and
Cheers from Germany,
Fabian

To answer the question, you would need to update the page table with the new namespace ID:
http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#Use_a_database_query
To fit this to your occassion, it would be:
UPDATE page
SET page_namespace = 3000
WHERE page_namespace = 1100
You shouldn't have to replace the page_title since these articles are already in another namespace.
Just please remember to back up your database before trying this.

Related

TYPO3 name of language file?

So I'm currently working myself through the following introduction about extension developement for TYPO3:
https://docs.typo3.org/m/typo3/book-extbasefluid/9.5/en-us/4-FirstExtension/4-make-products-persistent.html
There it says
TYPO3 is able to group all records of an extension in the new record wizard. To define the name of this group, create a language file in the directory EXT:store_inventory/Resources/Private/Language/ and add the key extension.title.
What do I therefore have to name the language file (you might also want to check the link) for it to work and what exactly is meant by "add the key extension.title"?
Filenames of language files are created with several patterns
typo3conf/ext/extkey/Resources/Private/Language/locallang_db.xlf
Is used in Backend i.e. for displaying the name of the tables, names of fields in the backend edit form, plugins etc. Naming convention here is rather strict. i.e.:
<trans-unit id="tx_extkey_domain_model_yourmodel.name">
<source>Name</source>
</trans-unit>
can be used in the TCA of your model like:
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:extkey/Resources/Private/Language/locallang_db.xlf:tx_extkey_domain_model_yourmodel.name',
'config' => [...],
],
typo3conf/ext/extkey/Resources/Private/Language/locallang.xlf
Is used in FrontEnd, so for an instance
<trans-unit id="my_list_header">
<source>This is list of my elephants</source>
</trans-unit>
can be accessed within your Fluid template like
<h1><f:translate key="my_list_header"/></h1>
Note: as you can see naming convention for id/key, in this case, is more flexible, then in case of *_db.xlf files.
typo3conf/ext/extkey/Resources/Private/Language/locallang_csh_tx_extkey_domain_model_yourmodel.xlf
Is for adding CSH - Content Sensitive Help
<trans-unit id="name.description">
<source>That's just the record's name Sherlock!</source>
</trans-unit>
In Backend looks like:
You can also add [fieldname].details node to XLIFF file and then it will allow displaying more detailed help for the field in the popup window.
<trans-unit id="name.details" xml:space="preserve">
<source>Sherlock Holmes (/ˈʃɜːrlɒk ˈhoʊmz/ or /-ˈhoʊlmz/) is a fictional private detective created by British author Sir Arthur Conan Doyle.</source>
</trans-unit>
TIP
Although learning of creating TYPO3 extensions from the scratch is quite romantic I'd suggest starting from installing extension_builder extension and creating own extension's skeleton within minutes or even seconds. It will create most of the required elements, like SQL insertion, language files, TCA and TypoScript configuration files and many more, so you can investigate it against tutorial easier.
About the key
I may be wrong, just don't remember now, probably extention.title was some approach in a pre-Extbase way, years ago. Nowadays I didn't meet it in any extension which works with ver 9.x or 10.x. It's obviously missing part in documentation you mentioned in yor question and it should be rather fixed there, to be more detailed.
I would have thought that your file should be extention.title

Angular 4 Dynamically Create Component from User Definable input

I'm looking to build an App in Angular 4 that would allow components to be dynamically created from storage (database, url, server stored file). The goal is to allow users to build there own components to create custom dashboards to view data.
I've been looking through google and stackoverflow to see if something like this has been achieved, but I have not seen anything to point me in the right direction.
If this is possible would anyone be willing to explain or link me to a resource to help me get started on this?
Thank you in advance
You can check these out:
https://medium.com/front-end-hacking/dynamically-add-components-to-the-dom-with-angular-71b0cb535286
https://angular.io/guide/dynamic-component-loader
I prefer number 1 because it provides a very detailed & clear guide.

generating two files by using workflows in Teamsite

I need your help/suggestion in teamsite(V6.7) coding for generating two files by using workflows means "How to generate a page at two different locations (in same branch) by using two different tpl files(desktop.tpl and mobile.tpl) but same DCR(abc.xml)"
I also guessed the idea/scenario that if any Perl script can be added in existing Workflow and while submitting the desktop file by using workflow to desktop location (/servername/default/main/sitefoldername/desktopsite/) then this workflow will also generate the same named file in mobile location(servername/default/main/sitefoldername/mobilesite/mobilepages/)
Please let me know if this kind of script can be developed
It would be a great help for me if you can provide your best solution into this.
Update the {iw-home}/local/config/templating.cfg to include the multiple presentations, one for each of your tpl file. You can use formAPI to set the location of the generated files.
Regards!
Yes, you can definitely generate two pages at a time.
You need to update the "templating.cfg" file and add all the different .tpl file names that you want to use but after doing this just try to generate some files using UI to cross check whether you are able to get the options for tpl selections if yes then you can proceed with the coding stuff. Also, you can refer some of these files: iwgen.ipl, iwpt_compile.ipl, iwtmplconfig.ipl and iwregen.ipl.
Please mark the solution and vote if it is useful.
Thanks!

Rename Taxonomy label in editor bolt-cms

I would like to rename the default tab value of Taxonomy in the backend page editor. I didn't find anything in the twig or yml files that would address this. Any ideas?
I checked with bolt developers and there is no way currently to do this. One potential option was to use the messages file but it was not recommended.
As you can imagine, since this isn't supported via the public configs, this will need a bit more advanced plugging together.
Here is a way to add an additional resource to the stack of translations.
https://gist.github.com/rossriley/c74fdee4fec3eaffb12f
This is a technique to add your own messages onto the translation stack without touching the underlying core files.
After creating this, you'll need to add your new service provider to the app, which you normally will bootstrap either in your index.php or a custom bootstrap file.

Personal wiki: changing the names of several pages

In my wiki I sent in a request to add a new namespace called 'Exchange', however adding the new namespace will delete all pages with the name 'Exchange:blahblah'. So I would need to change the page name for all these pages before requesting to add the namespace. The problem is that there are just under 1000 pages such as 'Exchange:blahblah' and changing the names of all of them would take up too much time.
My question is how, if possible, can I change the names of all these pages without having to manually alter the name individually. That is, if I wanted to change every exchange page from 'Exchange:blahblah' to 'Exchange1:blahblah', then is there a quick and easy way to change them all. All the pages are under the same category, if that helps.
Any advice would be greatly appreciated.
Add the namespace then run php maintenance/namespaceDupes.php --fix --move-talk from shell. See its documentation for details.