In MediaWiki is there a way to force a group of pages to have a particular skin? - mediawiki

The reason I am keen to do this is that we have a wiki which works great, but I would like to store help pages for an internal application in the wiki and link to those pages direct from the app. Although we wouldn't have concerns with people seeing the non-article stuff (i.e. the help pages) when viewing the pages from the rest of the wiki, for it to be streamlined when viewed from the application I thought it would be ideal if I gave it a simplified skin which I would design.
I have already found out that URLs can have the useskin= added (e.g. as is done in the Preview Skin page within the User Preferences pages), but following the links will revert you to your normal chosen skin.
Is there perhaps some way to adjust the skin, so that all the links contain useskin=? (I think this might have issues, since you appear to need the full pagename for useskin to work (e.g. ..../w/index.php?title=blah....&useskin=cologneblue as opposed to the short URLs).
If this isn't a smart way to go, I could consider different approaches (I run the box the wiki is on and could create a distinct wiki perhaps, although there might be disadvantages to this, such as needing to combine the user tables and maybe this would still pick up the user's preferred skin unless I re-coded things).
Any sensible suggestions gratefully received! Let me know if there's any more info you might need or if I need to clarify any points about my objective.
[I did submit this on the MediaWiki.org Support Desk page, but it got no response... I hope my question isn't that bad!!]

You could put all your content in its own namespace, then set the skin for that namespace using this extension (I've used it, it works well enough):
http://www.mediawiki.org/wiki/Extension:SkinPerNamespace

If you don't want to lock them all into a single namespace, you can also use the SkinPerPage extension to mark the pages individually.

Why not change the default skin to the skin you want?

Related

TYPO3 9.x and slug history

In pre v9.5 websites I used realurl.
When you change the site-title from tileV1 to tilteV2 the page could be accessed with domain.tld/titlev1.html AND domain.tld/titlev2.html.
The realurl path of titlev1 was marked as MovedPermanent (and redirects) to titlev2 and an expire date for the v1 is sent to the browser (+30 days).
My editors don't care a lot about SEO and the rest. They copy pages, deleting the content, moving them around the pagetree - nobody cares about the slug, often this is default-titlexx.html.
With realurl this was less painful compared to the native URL-handling in TYPO3.
I could not find any documents/websites discussing the problem.
Am I missing some option to set? How do you solve this?
Training the editors to double check the slug, but this only works for 2 days then I get the next error report: The page is broken cause a page has moved...
Thanks for any help in this issue!
There are some differences between TYPO3 9 and 10. In 10 you have additionally functionality which handles this:
when changing a slug, TYPO3 offers to change the slugs of the subpages - the editor gets a choice to do this or not
redirects will get created automatically, here you also have the choice to allow redirects for subpages as well.
You might also want to look at the extensions that are available for TYPO3 9 which try to enhance the Slug handling, e.g. sluggi. (I have not used this myself, but it looks like it may be helful).
There are also a number of open issues about Slug handling and redirects.
What I would recommend
Think about updating to 10. There are not quite so many breaking changes and you might find the update quite painless. Or look at the slug extensions.
Familiarize yourself with the slug and redirect handling (in v10). (Yes, the documentation may be incomplete but a lot of it is self-explanatory. Just test changing Slugs on some pages with subpages and move a page and the functionality should reveal itself).
Using permissions (possibly also workspaces) you can restrict what editors may do. You might also want to restrict editing to some pages (e.g. editlock, permissions). If they can't handle something responsibly, maybe they should only have restricted access. (I realize this is not so easy to solve, we have the same problem and defining very fine-grained permissions makes it impossible to handle at some point. Also, the editors should be able to create new pages).
Sorry, I don't have all the answers right now. To be honest, our site is a little messed up in this respect currently, because of using TYPO3 9 for a while and not handling this problem. At some point, the URLs of subpages start to deviate and then it is difficulty to get it cleaned up.
What is better now, though: In realurl the editors often did not fill out the URL segment and then the URL changed every time the page title changed. This is now handled in a better way, I think, where you explicitly have to define the URL.

Can I integrate grapejs website builder into my own website

Does anyone know if I can integrate GrapeJS into my own website so clients could build their own websites using it? IF anyone has done this, how easy is it and are there downsides?
This question is pretty open ended, but I'll take a shot at it.
The short answer is yes, you can use Grapesjs to allow clients to make their own sites; however, the details matter.
Grapesjs by default doesn't know anything about your stack, website structure, metadata, etc. You will need to either supply plugins or implement those features yourself. I've worked on a project for a company that used Grapesjs to implement single page apps and I'll include just some of the tweaks we had to manage.
Hiding certain layers that only confuse average users.
Hiding pretty much all of the styling, and using traits to allow people to pick from some predefined styles.
Take the html, css on store and generate the final html page, and store it in our static serving folder on the server.
Implement a wrapping "App" component that has traits for the different metadata we want users to control (open graph metadata, title, etc)
and those are just the big things, I'm sure I am forgetting several small ones.
For your application, you'll also need to implement a custom trait for links / buttons that allows you to link from one "page" to another. As well as, a way to allow a user to pick which page to work on.
The long answer is Yes, but Grapesjs is only the starting point.
Yes you can.
However it is not straightforward.
If you want to build a Drag Drop Editor like GrapeJS Demo, here is the Source Code - https://github.com/artf/grapesjs-preset-webpage
You can see an implementation at https://codegres.org/dragdrop

Tagging HTML elements with the source file

Problem
So we have quite a big project with lots of different Partial Views and a client side data binding framework (Knockout.js in our case).
One of the more problemtic parts is that is getting harder and harder to figure out which partial view is rendering an element that I see on my page.
So I need to debug this particular DIV. Okay, where do I find it?
Usually I try to find a very specific class or ID close by this element and do a search through the whole platform - far from ideal.
Question
So I was thinking about the following; tagging all elements (in debug mode) with the source file where they have been generated.
Right now I'm thinking about something like a precompiler that adds a data-source="" to every element. I might refer to an ID within a dictionary to prevent repeating all the long filenames.
Before I'm reinventing the wheel:
is there already something similar?
are there better alternatives?
We're using ASP.NET MVC, but any hints to how other platforms do this are perfect too.
If you are using Visual Studio, I highly recommend the Web Essentials extension. Among many great features, it has one called "Inspect Mode", part of the larger "Browser Link" feature, that does exactly what you are looking for; it identifies the file that a particular DOM element came from. It might be worth a shot if that option is open to you.
#Dirk, as per my understanding your issue is to easily identify the element/view. Adding data-source can be an option but before that have a look at this link
Editing Styles and DOM - Chrome Dev Tools
This page has many demonstrations which might be helpful to your problem. Furthermore, I do agree with Kevin suggestion.

How to view differences between two html documents?

I'm working on a help system with hundreds of pages written in HTML.
I want to give those HTML pages to multiple people so they can make changes.
Before I upload their modified documents, I need some way (such as color coding) to check and fix their changes. For example, I want to see all the changes marked in red or some other visual cue. What is the best way to do this?
Use Eclipse as Diff Tool
Use a diff tool. I really like SourceGear's DiffMerge, and it is free!
Diff will work as others have said.
However, I'd be leery as an admin to be having to deal with hundreds of pages of HTML edited by multiple people. This is SCREAMING for a CMS or Document Management System of sorts to deal with exactly this problem. It would be more than easy enough to save each version (as Stackoverflow does on edits) so that you could pick and choose between the best ones. Another huge advantage would be eliminating the repetitive nature of common elements, such as headers, doctype declarations, etc. I wouldn't even want to begin to think how much fun it would be to try to unify all that and get it 100% compliant....
There are Help systems out there for just this purpose if you're not up to setting this up yourself. My company uses Kayako, but there are dozens to choose from, many free.

Using a form to change css stylesheet

I use about a dozen different templates for several different vertical markets that I customize for CLients. I add custom Headers, footers and links and develop a color pallet and font used based on their preferences.
I would like to have a form that updates their own css files after the Client logs in and also offer a upload for their own custom logos, headers footers etc, these could be in html or jpg,png format, to be included in their sites.
Does anyone know of a program or scripts that can do this, or do I need to write it myself.
Thanks
AFAIK there is an abundance of Content Management solutions that would include various flavours of this functionality, but you're looking for it in isolation. My suspicion is that you're going to have to write it yourself.
Just to clarify: when the user logs in to your application, you want it to draw specific style elements based on preferences set for their account (or for general preferences set against their organisation)?
It sounds like you want to store all this information in a database and have styles inserted into the HTML on page render. If you want something that would actually create a stylesheet and write it to the filesystem, as I said before, it's likely that you'll have to build the functionality to your specific needs.
This type of thing is in the domain of a Content Management System. So, you have a couple of choices.
Try to integrate your work into an existing CMS like drupal, joomla, DotnetNuke, etc (depending on what language you are coding in); or,
Build your own.
You can certainly leverage existing components such as a rich text editor (like the one you used to post the question) in combination with writing the files to a DB or straight to the file system.
Either way, you have a fair amount of work ahead of you.
try something with php, Maybe a script like this?