I've made a parser hook extention that parses the tags <php> and </php> into
the tags for actual php code. it is working so far, but somthing in
wikimedia keeps adding additional code to the closing bracket, rendering it
non-functional.
This is my extention:
$wgExtensionFunctions[] = "wfembededphp";
function wfembededphp() {
global $wgParser;
$wgParser->setHook( "php", "renderscript" );
}
function renderscript( $input, $argv ) {
$output = "<?php $input ?>";
return $output;
}
This is the code i'm testing, it is simply typed into the wiki page like
normal.
<php>
print "this is some php code";
</php>
This is what it shoudl look like in the page source:
<?php
print "this is some php code";
?>
This is what it ACTUALLY gives me:
<p><?
print "this is some php code";
</p>
<pre>?>
</pre>
The additional tags of </p> and <pre> contained within the php code are
screwing it up and causing nothing to display, instead of running the script
as it should.
I think that the wiki is parsing more tags into the final code, after the
code has been rendered how i want it. I would think that a solution would
be to get my extention to run after all other rendering on the page is done.
But i don't know how to do that, and i think there must be an easier way.
I'm pretty new to php, so please don't be overly technical. thanks!
--
View this message in context: http://www.nabble.com/Need+Help%3A+Embeding+php+scripts+in+wiki+pages.-t171…
Sent from the WikiMedia General forum at Nabble.com.
In v1.5.x, if the high resolution version of an image was very large,
the image page would show a smaller version with a link to download
the high res version. Since upgrading to 1.6.6 it looks like the the
image page now shows the high res version regardless of its size.
(1000px wide +)
Is this due to a setting that i didn't transfer over when i upgraded
to 1.6
or a deliberate change in the software ?
thanks
Hi list,
I am trying to install mediawiki-1.6.5 on Solaris 9 sparc, please see the log from Mediawiki below:
Please include all of the lines below when reporting installation problems.
PHP 5.0.4 installed
PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
Have XML / Latin1-UTF-8 conversion support.
PHP is configured with no memory_limit.
No zlib support.
Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions
GNU diff3 not found.
Couldn't find GD library or ImageMagick; image thumbnailing disabled.
Installation directory: /thirdparty/local/apache2/htdocs/wiki
Script URI path: /wiki
Environment checked. You can install MediaWiki.Generating configuration file...
Database type: mysql
PHP is linked with old MySQL client libraries. If you are using a MySQL 4.1 server and have problems connecting to the database, see http://dev.mysql.com/doc/mysql/en/old-client.html for help.
Attempting to connect to database server as ...success.
Connected to 5.1.9-beta; You are using MySQL 4.1 server, but PHP is linked to old client libraries; if you have trouble with authentication, see http://dev.mysql.com/doc/mysql/en/old-client.html for help.
Error selecting database wikidb: 1044 Access denied for user ''@'aegdevd001' to database 'wikidb'
I am getting the following error:
Error selecting database wikidb: 1044 Access denied for user ''@'aegdevd001' to database 'wikidb'
I gave all the privileges to wiki user on wikidb database:
mysql> show grants for 'wiki'@'localhost';
+-------------------------------------------------------------------------------------------------------------+
| Grants for wiki@localhost |
+-------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wiki'@'localhost' IDENTIFIED BY PASSWORD '*A5DB2D927D6DF94DA5E1CE4B293AEAAB4D8304EA' |
| GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON `wiki`.* TO 'wiki'@'localhost' |
| GRANT ALL PRIVILEGES ON `wikidb`.* TO 'wiki'@'localhost' |
| GRANT ALL PRIVILEGES ON `wikidb`.`wikidb` TO 'wiki'@'localhost'
I am not understanding why the Mediawiki installation is failing, please help.
Thanks in advance
Raj |
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I tried with style="border: 0" and it worked, I will change it to border: none; if that is the preferred way.
See my new template below. Now this leads to a new question. If I have tons of stuff that I want in a nested table is there a way to globally apply the style="border: none" to every cell rather than be having to explicitly set it on every cell as I did below?
{| width="75%" cellpadding=0 cellspacing=0 style="background-color: #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| style="border: 0" width="50" valign="top" | '''Note:'''
| style="border: 0" | {{{1}}}
|}
~Eric
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Alexis Moinet
Sent: Tuesday, June 06, 2006 10:25 AM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] properly nesting tables
try style="border: none;"
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| style="border: none;" width="50" valign="top" | '''Note:'''
| style="border: none;" | Sometimes you have to wait a bit.
|}
Frederich, Eric P2173 a écrit :
> Does anyone know how to get rid of this?
> I found that if I put the following in MediaWiki:Common.css I can get
> rid of those borders if I set the nested table to use class="hrm".
>
> table.hrm {
> }
>
> table.hrm th, table.hrm td {
> border: 0;
> }
>
> Is there a way I can override this in the template itself rather than
> using a class?
>
> I tried putting border: 0, and border="0" on this line...
> | border="0" width="50" valign="top" | '''Note:'''
>
> But that didn't get rid of it.
> I would much rather fix this in the templates than use some class to get
> rid of the borders but I don't know where to put it.
>
> Thanks,
> ~Eric
>
>
> -----Original Message-----
> From: mediawiki-l-bounces-T31ubCBy5U6GglJvpFV4uA(a)public.gmane.org
> [mailto:mediawiki-l-bounces-T31ubCBy5U6GglJvpFV4uA@public.gmane.org] On Behalf Of Frederich, Eric
> P2173
> Sent: Monday, June 05, 2006 4:19 PM
> To: MediaWiki announcements and site admin list
> Subject: [Mediawiki-l] properly nesting tables
>
> So I finally got the wikitable css stuff working to make my tables look
> pretty whenever I say class="wikitable".
> Now my problem is if I wanted to have a non-wikitable inside of it.
>
> I have a template called Box Note that looks like this....
>
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | {{{1}}}
> |}
>
> ...
>
> It looks very nice and doesn't show any internal borders around each
> cell.
> But if I use it nested within a wikitable now all of a sudden I see the
> borders in the note.
> This happens if I use the template above for a note or if I were to
> manually nest the table as shown below (so if anyone wanted to try this
> out they wouldn't have to create and save a template).
>
> So my question is how do I get rid of all of that style info and
> properly nest two tables with different styles?
>
> Thanks,
> ~Eric
>
> {| class="wikitable"
> |-
> | valign="top" |
> * click this
> * press that
> * hit okay
>
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | Sometimes you have to wait a bit.
> |}
> |
> [[Image:Screenshot 01.jpg|200 px]]
> |-
> | valign="top" |
> * Press Enter
> |
> [[Image:Screenshot 02.jpg|200 px]]
> |-
> | valign="top" |
> * fill out form
> * cross your fingers
> * hit enter
> |
> [[Image:Screenshot 03.jpg|200 px]]
> |}
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l-T31ubCBy5U6GglJvpFV4uA(a)public.gmane.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
> -----Original Message-----
> From: mediawiki-l-bounces(a)Wikimedia.org
> [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Simon Renshaw
> Sent: Tuesday, 6 June 2006 5:42 AM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] Email setup
>
> Forgot to put my settings in the other email so here they are.
>
> This is what I have:
>
> $wgEmergencyContact = "wiki(a)castortech.com";
> $wgPasswordSender = "wiki(a)castortech.com";
> $wgEnableEmail = true;
> $wgEnableUserEmail = true;
>
> $wgSMTP = array(
> 'host' => "smtp.globetrotter.net",
> 'IDHost' => "castortech.com",
> 'port' => 25,
> 'auth' => false,
> );
>
[snip]
>From a noob grasping at straws here, try formatting the array as
follows:
$wgSMTP = array (
"host" => 'smtp.globetrotter.net',
"IDHost" => 'castortech.com',
"port" => "25",
"auth" => false
);
Just out of interest, once again from a noob, your domain appears to be
"castortech.com" whilst your email server is "smtp.globetrotter.net".
I've got auth set to false as I'm behind my companies firewall, running
only on our internal network, but you appear to be "jumping domains"
here castortech.com -> globetrotter.net so shouldn't you have to log in
to globetrotter to send emails hence auth should be true with a
username and password? I just ask as I'm unaware of what your internal
network structure is.
Regards,
Andrew Lowe
p.s. And yes I know I've probably used all of the wrong terms, "jumping
domains" etc, to describe the situation but I think I've got the idea
across......
Does anyone know how to get rid of this?
I found that if I put the following in MediaWiki:Common.css I can get
rid of those borders if I set the nested table to use class="hrm".
table.hrm {
}
table.hrm th, table.hrm td {
border: 0;
}
Is there a way I can override this in the template itself rather than
using a class?
I tried putting border: 0, and border="0" on this line...
| border="0" width="50" valign="top" | '''Note:'''
But that didn't get rid of it.
I would much rather fix this in the templates than use some class to get
rid of the borders but I don't know where to put it.
Thanks,
~Eric
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Frederich, Eric
P2173
Sent: Monday, June 05, 2006 4:19 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] properly nesting tables
So I finally got the wikitable css stuff working to make my tables look
pretty whenever I say class="wikitable".
Now my problem is if I wanted to have a non-wikitable inside of it.
I have a template called Box Note that looks like this....
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| {{{1}}}
|}
...
It looks very nice and doesn't show any internal borders around each
cell.
But if I use it nested within a wikitable now all of a sudden I see the
borders in the note.
This happens if I use the template above for a note or if I were to
manually nest the table as shown below (so if anyone wanted to try this
out they wouldn't have to create and save a template).
So my question is how do I get rid of all of that style info and
properly nest two tables with different styles?
Thanks,
~Eric
{| class="wikitable"
|-
| valign="top" |
* click this
* press that
* hit okay
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| Sometimes you have to wait a bit.
|}
|
[[Image:Screenshot 01.jpg|200 px]]
|-
| valign="top" |
* Press Enter
|
[[Image:Screenshot 02.jpg|200 px]]
|-
| valign="top" |
* fill out form
* cross your fingers
* hit enter
|
[[Image:Screenshot 03.jpg|200 px]]
|}
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>>> Doesn't work for me...changed both images/tmp *and* images/math to
>>>> 777 permissions and both are user nd group apache. Web server
>>>> running as user and group apache, apache user is definitely in
>>>> apache group.
>> Have you tried debugging texvc to work out exactly which step is
>> failing? If you look at the OCaml source for texvc, specifically the
>> render.ml file, you'll see this block:
>> (* Commenting this block out will aid in debugging *)
>> Sys.remove (tmpprefix ^ ".dvi");
>> Sys.remove (tmpprefix ^ ".aux");
>> Sys.remove (tmpprefix ^ ".log");
>> Sys.remove (tmpprefix ^ ".tex");
>> Sys.remove (tmpprefix ^ ".ps");
>> Try temporarily removing those lines to see which temporary files get
>> left behind. (Remember to recompile texvc!)
Aghghghghghhghghgh!
Problem is solved.
I was looking in includes/Math.php to attempt to get some further information, and puzzled by changing that file not changing the output on my browser (despite using Ctrl+F5).
I thought this was odd, so went to 'edit this page' to ensure I wasn't receiving a cached version....and it works. The existing page hasn't changed but the edit does.
For those with similar problem, I'm not sure what actually fixed it - make sure your permissions are set to 0777 for images/math and images/tmp (or your equivalents). Also make the folders user and group the same as your web server (e.g. chown apache.apache images/tmp).
If it doesn't work, check under 'edit this page'!
Thanks to those who tried :)
--Rob
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
1. pleaaaase help me, i have to find out the user passwords, where are they?
2. i change localphp settings, but it takes no effect, why?
thnx for response
>>>> Doesn't work for me...changed both images/tmp *and* images/math to
>>>> 777 permissions and both are user nd group apache. Web server
>>>> running as user and group apache, apache user is definitely in
>>>> apache group.
>> Have you tried debugging texvc to work out exactly which step is
>> failing? If you look at the OCaml source for texvc, specifically the
>> render.ml file, you'll see this block:
>> (* Commenting this block out will aid in debugging *)
>> Sys.remove (tmpprefix ^ ".dvi");
>> Sys.remove (tmpprefix ^ ".aux");
>> Sys.remove (tmpprefix ^ ".log");
>> Sys.remove (tmpprefix ^ ".tex");
>> Sys.remove (tmpprefix ^ ".ps");
>> Try temporarily removing those lines to see which temporary files get
>> left behind. (Remember to recompile texvc!)
David,
Cheers for the reply - make sure you reply to the list so any useful info gets archived!
Commenting the codeblock didn't help - no extra temp files, no extra info (I did recompile :D)
Can any MediaWiki hackers inform me how to get the Wiki to display some slightly more useful info about the failure?
Pretty please??
--Rob
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
On 06/06/06, Martin Ceronio - BIS <martin.ceronio(a)za.sabmiller.com> wrote:
> Hello Morten and Rowan,
Firstly, it's probably best to folow up conversations you see in
mailing list archives to the mailing list, rather than picking out the
e-mail addresses of participants, who may no longer be involved in the
topic, or may not even check that address any more. Also, of course,
this reply wouldn't show up in any archives for people to search out
in the future (it will now, because I've added the list to the CC
field). Just a tip for the future.
> I found the same problem with PNG images as described at
> http://mail.wikipedia.org/pipermail/mediawiki-l/2005-August/006421.html.
>
> However, I'm pretty sure it's not an IE problem, since the image I use for
> my site's logo is also PNG, and it handles the transparency without problems
> (when viewed in IE).
Looking at that conversation, I'm pretty sure that at least that
problem *was* an IE issue, and I suspect yours may be too - the fact
that your logo is a PNG doesn't prove anything, the crucial question
is whether *the image you've been having problems with*, without
uploading it anywhere, displays correctly in IE.
The key thing you need to know is that there are 2 types of
transparency that can be used in PNGs - simple 'palette' transparency,
and 'alpha' transparency. One simply defines one of the colours in the
file as 'transparent', and is also how transparency works in GIFs; the
other allows every pixel in the image to have a *degree* of
transparency, allowing the image to blend nicely into whatever
background you happen to place it on.
The problem is, Internet Explorer doesn't know how to display 'alpha'
transparency properly, and creates an ugly grey background to the
image instead. PNG images with only 'palette' transparency will work
fine, just as GIF images would - but you have to have saved the file
with the right (or, as it were, wrong) options.
> Also, I have removed the |##px| parameter from my
> [[Image]] tag, and it still gives the same problem.
I think you've got this the wrong way round - what seemed to be
happening in the conversation you linked to was that the code for
resizing images was (either by accident or design) converting 'alpha'
transparency into 'palette' transparency when resizing PNGs. The
result being that the resized image didn't look as good in browsers
that support alpha transparency properly, but became transparent in
IE. Whether this still happens, I've no idea.
> I am wondering if this has something to do with the way it is processed
> during uploading.
As far as I know, no processing of the image is done during uploading;
in various circumstances, the image will be resized *during display*,
which may have side-effects, but viewing the original image, at
original size, should behave exactly the same after you've uploaded it
as before.
All that said, I could, of course, be completely wrong.
But if so, I'm not the person to ask, as I have other things to do right now. :P
Happy wikification!
--
Rowan Collins BSc
[IMSoP]