User talk:Dl33t
From GTALUG
Comments on stuff. :-)
Actually, this is for our comments to you. =) Welcome! -- Sy / (talk) 08:36, 27 Apr 2005 (EDT)
- I'm going to enable image uploading sometime soon.. it appears that the need is there. Also, it's very nice that you're getting into the swing of things.. =) -- Sy / (talk) 18:17, 3 May 2005 (EDT)
- Will do, trying to get myself reorganized. :-) -- dl33t::talk 20:06, 14 May 2005 (EDT)
Maybe move the t-shirt stuff to wish list? It should really have a page all its own. -- Sy / (talk) 19:25, 14 May 2005 (EDT)
- Yeah, maybe. Not sure if wish list is the right spot though. I'll leave it here for a few days yet, and see what happens on the issues front. -- dl33t::talk 20:06, 14 May 2005 (EDT)
[edit]
CSS & Site Presentation
- Is there a way to add css in a post? I've been fiddling in the Sandbox, but it looks like MediaWiki is stripping style params out of html tags.
- I'd like to be able to update or modify the CSS for div#bodyContent for some pages. Alternatively, create a div or table whose style I can specify.
- As an example, I'd like to be able to set a background for my user page.
- Is it a good idea? If so, do we need to generate some guidelines?
--- dl33t::talk
- I did a smidge of searching through http://meta.wikimedia.org/wiki/ and the handbook but I could find no reference to such magic as user-defined CSS. I'm going to say that almost certainly there is no way in MediaWiki to add user-created CSS', probably for security and consistancy reasons. User-defined div.. that I don't know for sure either. I wonder if tabling would have functionality like adding background images.. hrm. -- Sy / (talk) 09:01, 29 Apr 2005 (EDT)
(above moved from Village pump)
- I take it you have this wrapped up. I remember seeing some notes which allow a user to make a custom css for their own subsection of the wiki. Have you played with that at all? -- Sy / (talk) 08:21, 6 Jun 2005 (EDT)
- Not yet, very difficult finding time to do much of anything lately. :( If I remember correctly, I think the CSS can be set in span tags.
[edit]
Interrupted during Customizable MediaWiki/RSS Engine test - Temp Storage - Current time is 28minutes
This is the home page, this hack is also mentioned here: http://meta.wikimedia.org/wiki/User:Sysy/Scott_Elcomb%27s_RSS_hack
#!/usr/bin/perl
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use SAL::DBI;
# // Configuration
my $mediawiki_name = 'MyWiki';
my $mediawiki_url = 'http://localhost/mediawiki/index.php';
my $mediawiki_description = 'This is MyWiki';
# // Get parameters
my $q = new CGI;
my $self_url = $q->script_name();
my $user = $q->param('u');
my $pass = $q->param('p');
# // Setup database interface
my $dbo_factory = new SAL::DBI;
my $dbo_data = $dbo_factory->spawn_mysql('localhost','wikidbuser','wikidbpass','wikidb');
my $dbo_data2 = $dbo_factory->spawn_mysql('localhost','wikidbuser','wikidbpass','wikidb');
# // NOTE: SAL stores SQL datasets as 2D arrays, accessible like so: $dbo_data->{data}->[$recordNum][$fieldNum]
# // Authenticate the user and password
my $SQL_auth_query = qq[SELECT count(user_id) FROM user WHERE (user_name='$user') AND (user_password = md5(concat(user_id,'-',md5('$pass'))))];
$dbo_data->execute($SQL_auth_query);
if ($dbo_data->{data}->[0][0] != 1) { die('Not Authorized!'); }
# // Get the user's watchlist
my $SQL_watchlist_query = qq[SELECT a.wl_title, a.wl_namespace FROM watchlist AS a, user AS b WHERE (a.wl_user=b.user_id) AND (b.user_name='$user')];
# // NOTE: The SAL execute method returns the width and height of the dataset...
my ($w, $h) = $dbo_data->execute(qq[$SQL_watchlist_query]);
# // Start the RSS document
my $canvas = qq[<rss version="0.91">
<channel>
<title>$mediawiki_name</title>
<link>$mediawiki_url</link>
<description>$mediawiki_description</description>
<language>en-us</language>
];
# // Loop through the items
for (my $i=0; $i <= $h; $i++) {
my $mediawiki_item_title = $dbo_data->{data}->[$i][0];
my $mediawiki_item_namespace = $dbo_data->{data}->[$i][1];
my $SQL_item_query = '';
if ($mediawiki_item_namespace == 0) {
my $mediawiki_item_link = $mediawiki_url . '/' . $mediawiki_item_title;
$SQL_item_query = qq[SELECT a.old_text FROM text AS a, page AS b WHERE (a.old_id = b.page_latest) AND (b.page_title='$mediawiki_item_title')];
$dbo_data2->execute($SQL_item_query);
my $mediawiki_item_description = $dbo_data2->{data}[0][0];
$canvas .= qq[ <item>
<title>$mediawiki_item_title</title>
<link>$mediawiki_item_link</link>
<description>$mediawiki_item_description</description>
</item>
];
}
}
# // Close the RSS document
$canvas .= qq[ </channel>
</rss>
];
# // And send it to the client
print "Content-type: text/xml\n\n" . $canvas;
Output:
<rss version="0.91">
<channel>
<title>MyWiki</title>
<link>http://localhost/mediawiki/index.php</link>
<description>This is MyWiki</description>
<language>en-us</language>
<item>
<title>Main_Page</title>
<link>http://localhost/mediawiki/index.php/Main_Page</link>
<description>Wiki software successfully installed.
Please see [http://meta.wikipedia.org/wiki/MediaWiki_i18n documentation on customizing the interface]
and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] for usage and configuration help.
Yay!
Adding Edits</description>
</item>
<item>
<title>Test_Page</title>
<link>http://localhost/mediawiki/index.php/Test_Page</link>
<description>This is a test
Now watching...</description>
</item>
<item>
<title></title>
<link>http://localhost/mediawiki/index.php/</link>
<description></description>
</item>
</channel>
</rss>

