User Profile
- User
- spout
- Location
- Belgium
- Time Zone
- (GMT 1): Austria, Belgium, Cameroon, France, Germany, Italy, Spain
Recent Articles
Captcha component with PhpCaptcha
PhpCaptcha is a library for generating visual and audio CAPTCHAs (completely automated public Turing test to tell computers and humans apart).
- Published by spout 06/09/07 - 19:34
- 45820 views
- 36 comments
Thumbnails generation with phpThumb
phpThumb is a great thumbnail generator, it can generate thumbs with GD, GD2 or ImageMagick. There are many features like crop, rotate, watermark,... see all the features on the phpThumb homepage.
- Published by spout 05/09/07 - 00:00
- 38792 views
- 6 comments







Thanks to the team for all your nice work.
Get textile http://textile.thresholdstate.com/
<?php
vendor('textile'.DS.'classTextile');
class TextileHelper extends AppHelper {
function parse($text) {
$textile = new Textile();
return $textile->TextileThis($text);
// For untrusted user input, use TextileRestricted instead:
// return $textile->TextileRestricted($in);
}
}
?>
From the code in PEAR::Quickform
function isUploadedFile($params){
$val = $this->data[$this->name][$params['var']];
if ((isset($val['error']) && $val['error'] == 0) ||
(!empty($val['tmp_name']) && $val['tmp_name'] != 'none')) {
return is_uploaded_file($val['tmp_name']);
} else {
return false;
}
}
I added a function in the component:
Component Class:
<?phpfunction getNavLinks()
{
return $this->Pager->linkTags;
}
?>
In the controller:
Controller Class:
<?php$this->set('navLinks', $this->Pager->getNavLinks());
?>
And in the header of my default layout:
View Template:
<?php if(!empty($navLinks)) echo $navLinks;?>