David Ansermot Web Developer / TYPO3 Integrator

3nov/100

Magento – Actives CMS pages dynamic menu

Here's a little snippet to help you to build a dynamic menu listing the actives CMS pages from Magento.

  1. <div>
  2.     <?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
  3.     <?php  $collection->getSelect()
  4.           ->where('is_active = 1'); ?>
  5.     <ul>
  6.     <?php foreach ($collection as $page): ?>
  7.       <?php $PageData = $page->getData(); ?>
  8.       <?php if($PageData['identifier']!='no-route') { ?>
  9.       <li>
  10.         <a href="/<?php echo $PageData['identifier']?>"><?php echo $PageData['title'] ?></a>
  11.       </li>
  12.       <?php } ?>
  13.     <?php endforeach; ?>
  14. </ul></div>
3nov/100

Joomla – Detect homepage in extensions

Here's a little tip to detect, in your Joomla extensions, if the Frontend user is on the Homepage.

  1. if (JURI::base() == JURI::current()) {
  2.      // Your code for Homepage
  3. }

Tell me if it bugs for you, but for me on 1.5.21 it's ok

22juil/100

The Computer History Museum released the source code of MacPaint

Apple LogoMacPaint is a software for creating and editing bitmap developed by the company Apple.

MacPaint made his first appearance in 1984 with the first Macintosh 128k and the software is the most impressive one, MacPaint is a software that is known to Apple in the '80s with new novel, with MacPaint so just use the mouse to paint, draw, erase, color, select, erase ... You click on one of the tools and then used in the work area. At that time the software was unique and he was also capable of creating images for use in other applications.

MacPaint is written in Pascal and contains 5822 lines of code and 4,000 lines of assembler for Motorola 68K in 5 files. It weighs 67.8 k0.

The sources are provided with MacPaint those of QuickDraw, the graphics creation library.

Download MacPaint sources

Source : http://www...seum.html

3déc/09Off

Better Source Code Posting

For the coders among you, you may already know that posting source code is really easy here on WordPress.com thanks to the sourcecode shortcode. You just wrap your code in

[sourcecode]

and you’re good to go — no code escaping or anything.

The good news is that the team adds new features as Line highlighting, and other.
Take a look here

22sept/090

Bullet Proof Lib 0.2a out !

I've published the tags-0.2.0 on the public svn.
This version is alpha very unstable, but I'll be happy if you post issues in the tracker, even basics ;)
I'm building the roadmap for 0.3.0 (with I think, some bugfix and security before 0.3a).

Tags-0.2.0 svn link
Google code project's homepage

See you soon