okay, maybe you need to put this content down here into /app_helper.php and
call it from the view like: <?php echo $this->Html->show_path(); ?>
function show_path($photo, $size, $params = array())
{
if(empty($photo))
{
return '';
}
else
{
$id = 0;
$secret = '';
if(array_key_exists('Photo', $photo))
{
$id = $photo['Photo']['id'];
$secret = $photo['Photo']['secret'];
}
elseif(array_key_exists('User', $photo))
{
$id = $photo['User']['photo_id'];
$secret = $photo['User']['photo_secret'];
}
return (array_key_exists('full', $params) ? FULL_BASE_URL : '') .
$this->webroot . 'photos/' . $size . '/' . $id . '-' . $secret . '.jpg' .
(array_key_exists('updated', $_GET) ? '?' . time() : '');
}
to
2012/9/30 Chris <[email protected]>
> hi MaJerle,... now I'm reading helper ,... BUT,... can't read
> FULL_BASE_URL ,... in a browser I see <img src="/photos/thumb/0-.jpg"
> alt="" /> <http://www.hamayk.com/photos/index/admin>
>
>
> return (array_key_exists('full', $params) ? FULL_BASE_URL : '') .
> $this->webroot . 'photos/' . $size . '/' . $id . '-' . $secret . '.jpg' .
> (array_key_exists('updated', $_GET) ? '?' . time() : '');
> }
>
> thanks
>
> On Sunday, September 30, 2012 10:22:21 AM UTC-7, MaJerle.Eu wrote:
>
>> i think it should be $this->PhotoShow or $PhotoShow..i'm not sure :)
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>>
>>
>> 2012/9/30 Ivan Rimac <[email protected]>
>>
>>> <?php echo $this->Html->link($this->**photoShow->thumb($user_obj),
>>> '/photos/index/' . $user_obj['User']['username'], false, false, false) ?>
>>>
>>> maybe you are missing $this
>>>
>>>
>>>
>>> 2012/9/30 Chris <[email protected]>
>>>
>>>> hi guys,.... I have a photo_show helper which works on 1.2 pre Beta
>>>> version,...
>>>> now I'm trying to migrate to 1.3 and I can't bring it up in a view:
>>>>
>>>> <?php echo $html->link($photoShow->thumb(**$user_obj),
>>>> '/photos/index/' . $user_obj['User']['username'], false, false, false) ?>
>>>>
>>>> what am I doing wrong...???
>>>> thanks
>>>>
>>>>
>>>> --
>>>> Like Us on FacekBook
>>>> https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP>
>>>> Find us on Twitter http://twitter.com/CakePHP
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "CakePHP" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to cake-php+u...@**
>>>> googlegroups.com.
>>>>
>>>> Visit this group at
>>>> http://groups.google.com/**group/cake-php?hl=en<http://groups.google.com/group/cake-php?hl=en>
>>>> .
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> *Ivan Rimac***
>>> mail: [email protected]
>>> *tel: +385 95 555 99 66*
>>> *http://ivanrimac.com*
>>>
>>> --
>>> Like Us on FacekBook
>>> https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP>
>>> Find us on Twitter http://twitter.com/CakePHP
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to cake-php+u...@**
>>> googlegroups.com.
>>>
>>> Visit this group at
>>> http://groups.google.com/**group/cake-php?hl=en<http://groups.google.com/group/cake-php?hl=en>
>>> .
>>>
>>>
>>>
>>
>> --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>
--
*Ivan Rimac***
mail: [email protected]
*tel: +385 95 555 99 66*
*http://ivanrimac.com*
--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.