dracoblue.net

Hal won't upgrade when updating from Etch to Lenny

While I performed apt-get dist-upgrade on my debian machine, to update from Etch to Lenny I had the issue, that the HAL-package was not able to be upgraded (which caused some other parts of debian not to be able to be upgraded).

I found out how to fix that problem, since I noticed that hal wasn't started properly.

If HAL hangs on upgrade, press CTRL+C to stop apt-get. Then type:

/etc/ini.d/dbus restart

And after that do the following again:

apt-get dist-upgrade

Now everything should work fine.

In articles, linux by DracoBlue @ 18 Mar 2008 | 96 Words

Avoid session expiration in Webapplications (e.g. PHP)

Some of you may have run into the problem that the default session timeout (about 15 minutes) isn't always useful if your users have to fill a large form with lots of text.

Often you get after those: 'Session timed out' and after login the user has to type all again. To fix that, you can wait for the login and refill the form with the saved data. That is not very handy and quite difficult to implement.

A very handy and fast fix for this session timeout is, that you query the server every minute once to keep the session alive without requiring the user to reload the page. I found out that that soloution is used even in SMF, so it seems to be quite common.

So just add the following lines to an extra page or the start of your index-file.

session_start(); if (isset($_GET['sessionfix']))Â? exit;

And now add the magic javascript, which updates that in the template or html file.

That's it!

In articles, open source, php by DracoBlue @ 27 Feb 2008 | 167 Words

How to add auto-youtube-tags to SMF

Open Subs.php and alter the following things.

After:

    static $bbc_codes = array(), $itemcodes = array(), $no_autolink_tags = array();
static $disabled;

Add:


$message = preg_replace('/http:\/\/([^\s\.]+).(youtube.com\/watch\?v=)([A-Za-z0-9\-]+)([^\s]*)/', '[youtube]$3[/youtube]', $message);

After:

            array(
'tag' => 'b',
'before' => '<b>',
'after' => '</b>',
)

Add:

            array(
'tag' => 'youtube',
'before' => ''
),

In open source, php, smf by DracoBlue @ 20 Jan 2008 | 75 Words

Drag n' Drop!

Today I finished the drag and drop functionality for the inventory and added the action bar. You may know both from other (online) games, but its still something quite new for gta online gaming. So I hope you guys like it!

In gta:tournament, project by DracoBlue @ 17 Jan 2008 | 41 Words

Visual Inventory part one

This is the first version of GTA:Tournament's Visual Inventory. At the moment you can hover items, to see what they do (like those EDs) and doubleclicky them to activate them (leads to slow health refill).

In gta:tournament, project by DracoBlue @ 17 Jan 2008 | 41 Words

Page 34 - Page 35 - Page 36

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About