Jump to content

a little help here


cybernet

Recommended Posts

class Fields_View_Helper_FieldFacebook extends Zend_View_Helper_Abstract
{
  public function fieldFacebook($subject, $field, $value)
  {
    $facebookUrl = stripos($value, 'facebook.com/') === false
                 ? 'http://www.facebook.com/search/?q=' . $value->value
                 : $value->value;
    return $this->view->htmlLink($facebookUrl, $value->value, array(
      'target' => '_blank',
      'ref' => 'nofollow',
    ));
  }
}

 

Warning: stripos() expects parameter 1 to be string, object given in line ...

Link to comment
https://forums.phpfreaks.com/topic/215557-a-little-help-here/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.