On 6/20/05, Jamie Bliss <astronouth7303(a)gmail.com> wrote:
On 6/19/05, Jordi Domingo <jordidr(a)gmail.com>
wrote:
Hello, only three questions (I didn't find
nothing similar googling
archives) and I'd almost finished my app...;)
- Downloads: I enabled the upload funcionality usuing functions form
specialupload, integrating it when you press the button appearing in
edit mode (the "save changes"). My apllication based in Mediawiki
modifies a file of pure text that I have previously uploaded...but how
I get a link to download the file?. I mean, if uload was thought to
images, then putting the image you could download it wih right button
of the mouse, but it is a uplaoded text file, that I have to
download....there's any function to do this, or simply I remade one of
the navigation links to point the file? (rough method, I suppose; but
if there's a specific function to download files as there is one to
upload file, would be better...)
I believe the Image object is what you are looking for.
Ok, in /includes/image.php there's functions like geturl or
getimagepath. I'll see if there's made some function similar to offer
download. If not, as I said I'll just get the url and offer the file
as a link in the upper menu...
- Dinamic
logo: I change in localsettings.php the image to be loaded
in the logo; however I would like to change the logo according to
change of "screen"; this would be when I enter in index.php and I know
what action is done, but doesnt' work. I printed a var to screen to
know if I was getting well the path, and it's correct. Not critical,
but if there's a way of do it...
I assume you are refering to $wgLogo. If you want to change it based
on the request, I would look into using an extension function (so you
can use $wgRequest).
Yes, $wgLogo. But the problem is that I comment in index.php
# $action = $wgRequest->getVal( 'action', 'view' );
and remade it according to an extenal file, assigning differents
actions and differents logos. The actions are catched, but not the
logos.
Also, doesn't seem to work if I change $wgLogo in article or editpage...
Note: oops, just now I remember I have one of this images as $wglogo
in localsettings.php. I'll try to comment that line...
-Installing my
application: to do my application I have based on
Mediawiki. To the present moment, the instructions would be
1.install mediawiki 1.4.0 and
2.copy all the files I have modified overwriting the older ones, but
careful with localsettings.
I can't simply say "copy the files" because my aplication uses the
database for users (not for text). Can I modify the installing program
to integrate my apllication, and reduct it to a single step
(substitute the Article.php by my Article.php, etc...) I suppose it
work, yes? And I suppose there's no problem with that, as I inform
continously that is based and powered by Mediawiki, being open source,
yes?
If you've modified the original source files, I'd using a diff/merge
application.
You can make all the changes you want, it's open source. ;) You may
want to be more specific and clearer.
I haven't altered the database (I just don't use cur table). I altered
index.php, localsettings.php, /languages/languageca.php, and some of
/includes (also adding new files as Article2.php). So, I have the
changes more or less "in mind" - and I don't remember any not referred
to PHP.
Seeing the internal organization of the mediawiki tar, I suppose I
just can overwrite my modified files (and add the new ones); as for
the installation program, I see /config/index.php and
install-utils.inc as files to be altered to personalize the
installation (putting messages of "based on wediawiki", of course).
Then, as there's no problem being open source (and crearly saying it's
mediawiki-lamp based) I could do a new tar with my application name,
and so the installation program of my application would be simplified
to only install Mediawiki (with my incorpored changes).
-- Jamie
----------------------------
Lot of thanks
Jordi