MediaWiki question

daragon

Limp Gawd
Joined
Feb 17, 2005
Messages
224
I have an interesting php coding problem.

I have the directory of a mediawiki writen mostly in php. I have been asked to change a picture on one of the pages and I can't find where that page is created or anything resembling the code around the picture.

Is their any sort of standard to creating a page or can someone please instruct me as to how to find out where to make this change to the code.

Specifics: on links to internal and external sites from inside the mediawiki a small arrow pointing up appears. He wants me to change that to a different icon for links to internal sites. What makes it fun is that I don't know php.
 
You don't mention which version of MediaWiki you're using, but the versions I've worked with use CSS to place the uparrow picture on external links.
 
My version uses CSS selectors as well, but I don't know what I'm looking for. I've searched for the files structure and most of the idividual files (in the code) for the pictuse it calls, but I can't find anything. I don't even know what file the references are in.
 
All external links in MediaWiki have class="external", which you could easily see by inspecting the HTML source of any page with an external link.

You will want to look in the CSS for a corresponding selector, which will be something like:

Code:
a.external

or

Code:
.external

Looking at the CSS on Wikipedia, it is:

Code:
#bodyContent a.external,
#bodyContent a[href ^="gopher://"] {
	background: url(external.png) center right no-repeat;
	padding-right: 13px;
}

The "background" property describes the picture content and position that is used.
 
I placed the code in the right place, and am waiting for the server to refresh to see if it worked, but I want to check the syntax with you guys. Is this proper use of href? The purpose is to identify what urls link inside the network, so it needs to catch everything with the same suffix.

#bodyContent a.external[href*="suffix.com"], #bodyContent a.external[href*="longsuffix.com"] {

It seems to me that it should be:
#bodyContent a.external[href="*suffix.com"], #bodyContent a.external[href="*longsuffix.com"] {
 
I got it working. The code given to me was correct and I was placing it in the right place, but the server wasn't checking the repository for the latest version. neway, it works. Thanks guys!!
 
Back
Top