I am developing a MediaWiki extension and I would like it to be able to pull simple configuration settings from a MediaWiki page that can be edited when and if certain things are added such as a category. I am quite unsure how I would go about doing something like this. any help would be appreciated/
Typically, on-wiki settings would be stored in the MediaWiki namespace. There are no built in methods for getting and setting such configuration setting, so you will have to parse those pages manually. For a (quite complex) example, see how the sidebar is built from MediaWiki:Sidebar in Skin.php
A more user friendly approach, of course, would be to create a simple special page, that gets and sets the configuration settings from the database. Depending on your exact needs, that might be almost as simple to build.
Related
I had a PHP Website which had a "admin.php" page, where I could set some special settings like activating an infobox e.g.
Now I am rebuilding my Website with TYPO3 and I am asking myself, how I have can make something like a "admin.php" where I can do settings.
Can someone help me with that? I hope I could explain my issue so you understand it, otherwise please tell me if you didn't get the point of it!
TYPO3 is a Content Management System, the M stands for what you are searching for! As user with administrator role, there are multiple modules where you can configure extensions, change output of things, ....
So it could be the Constant Editor what you are looking for, otherwise ask a more concrete question.
The BackEnd, which you access by domain.tld/typo3/ is the place where all modifications to the FrontEnd output is done. That includes the normal content of text and images or other Content-Elements like plugins, records like news or tt_address and of course pages to get the structure.
Here an editor also decides the visibility of content.
The BackEnd is also the area where the behaviour of the site is configured, mostly with TypoScript. With TypoScript you can configure the behaviour of Plugins or the general rendering of pages.
maybe you had all configurations in one admin.php file, in TYPO3 the configuration might be distributed to different places, but as there are very much possibilities to configure there are also much places to configure.
I have a site with a really old version of Joomla, upgrade it or not is not my decision, so I have to work with this version (1.5.15).
The problem is on the site, the home page it's ok, loads all css and js, but when I access to another menu item I get: 404 Component not found, but the component exists, and also the url to access to resoruces (css, img, js, etc) is not correct, for example this is the url www.mypage.com, the url of resources is like /plugins/system/rokbox/themes/light/rokbox-style.css, when I access to another menu item the url is like www.mypage.com/index.php/resource_location.
What can I do? Why is this happening?
There are several options to consider:
Someone made a mistake: and changed the SEF configuration, maybe they just disabled SEF or routing or changed the .htaccess;
Someone attacked your site: pretty easy with your Joomla version.
In either case if you lack documentation or information you need to explore the differences, just load a working backup on a folder i.e. working_backup on the same server and run a diff:
diff -qrwbBE working_backup public_html
This will give you a list of different files, if there are none, go check the plugin configuration maybe a plugin was disabled such as SEF, else open them and see what changed.
If you do not have a working backup, download Joomla 1.5.15 from the Joomla version history site and run the same command, you will get a longer list including any 3rd party extensions; but it's reasonable that the issue lies with core Joomla or a SEF extension, it will be easy to pick it up.
Remember to clear the cache: the error may no longer be there but be cached, and the site might lack permissions to update the cache.
I'm looking at a site under development (at my wife's work). It's being built with Joomla 2.5.x, and it's using a Kunena template for the forum.
Each page on the site uses a single URL with PHP variables, e.g. www.sitename.com/index?option=com_content&view=article&id=96&Itemid=101.
However, on the demo site, the suffix is always .html even though the content is CMS/database-generated.
What I want to know is:
Why does the site at my wife's work use .php?...?
Where in the backend administration portal (to which I have access) are the settings for each view (presumably using a MVC framework)? Or are they only available by editing the PHP files directly?
Thanks.
Addendum
I found this documentation which helps explain #1. Still would like an answer to #2.
First, you should never edit a Joomla file directly. If there is ever somethign you can't do via a setting, override the file. Any changes you make in core files, besides potentially breaking things, will get overwritten on an update.
In terms of settings in general every view has an options button and you set default settings for the component there. There are then in general individual settings in items and menu items that override the defaults.
Kunena has more complex configuration and thus has its own complete UI.
Joomla has a setting for using either the raw url (which your site is using) or "Search engine friendly" (SEF) urls. The demo site not only uses SEF urls but also adds an html suffix to the end. The html really means nothing to the system and is just there. You could turn that off and the system would operate the same just without '.html'. (Locations would look like folders instead of files, I guess.)
If you access your administration system (www.sitename.com/administrator, most likely), you can go to Site->Global Configuration. Make sure you are on the "Site" tab and you should see SEO settings on the right side. These settings will change the urls between the demo's version and your own.
To use the mod_rewrite bit, you may have to convert an htaccess.txt file to .htaccess on the server: http://docs.joomla.org/How_do_you_convert_an_htaccess.txt_file_into_a_.htaccess_file%3F
To add a bit more, the demo site's url is ultimately converted back into the url that you see on your wife's work's site. The system operates based on option, view, id, and Itemid variables. The SEO settings convert this into search engine friendly phrases which I think help both search engines and people!
First off, this isn't really a programming question but more of a programming concept question. Basically, I've built a bespoke PHP framework to speed up deployment on my end and I want some kind of plugin system in place that will allow me to add specific features to the base of the framework (like the SQL class or maybe a Twitter package) that will allow me to throw them into a folder and not have to actually edit the base for every new project.
Any ideas of the best way of going about this?
Here is a nicely written post by #ircmaxell on how to do that and what are the options:
Handling Plugins In PHP
Also check out:
Best way to allow plugins for a PHP application
what im doing in my cms:
for each plugin i make a folder latin-named of this plugin's name.
i create a /translations folder in there too. Check here.
have a single php file that has 2 basic functions, the plugin_install and plugin_uninstall (you know, things to happen on install/unistall like tables creation/drop)
create a special page of your system that reads these plugins, installed and not and give an on/off switch so users can install/unistall them.
load these single files mentioned above by a single call to include_once on top of your index page (or administration page) so to include whatever functionality they offer.
enabled plugins will be loaded (include_once) from your main page, and also their functionality, so each plugin can call each other's as well.
In drupal, it's possible to create a "build", also known as "install profile" or "distribution" that basically combines several modules and your settings for them. So the next time you setup the same exact site, you don't have to re-configure all the modules.
Does Joomla have a similar concept, and what is it called? Please reference documentation as well if possible.
The concept is very simple - you just need to get a clean installation, install all the extensions you want and configure them the way you need.
Then it is enough to copy the files and the database to a new location and change the settings in the configuration file (configuration.php). That is all.
It is a very simple process and can easily be automated with a simple php script. I once did an asp.net app which was deploying new installations of joomla within seconds.
You could try something like http://www.akeebabackup.com/
This allows you to take a snapshot of a site and export it anywhere.