Guest User

Untitled

a guest
Aug 24th, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. Here is the original code -
  2.  
  3. <div class='div_imatge_gran brighten'>
  4. <?
  5. $image_attr = array(
  6. "title" => $this->album->name ,
  7. "class" => "imatge_gran"
  8. );
  9. $image = JHTML::image('images/albums/' . $this->album->image , $this->album->name , $image_attr );
  10. echo $image;
  11. ?>
  12. </div>
  13.  
  14. I wish to add this code -
  15.  
  16. <a datalightbox="transitionIn:elastic;transitionOut:elastic;"href="/images/yootheme/widgetkit/lightbox/image2_lightbox.jpg"><img src="/images/yootheme/widgetkit/lightbox/image2.jpg" width="432" alt="Lightbox Image"></a>
  17.  
  18. I tried adding the lightbox code and simply putting 'echo $image;' within the image source params, but I get a server/php
  19.  
  20. error. How would I best accomplish this goal? Any help appreciated.
  21.  
  22. This is what I tried.
  23.  
  24. <div class='div_imatge_gran brighten'>
  25. <?
  26. $image_attr = array(
  27. "title" => $this->album->name ,
  28. "class" => "imatge_gran"
  29. );
  30. $image = JHTML::image('images/albums/' . $this->album->image , $this->album->name , $image_attr );
  31. <a data-lightbox="transitionIn:elastic;transitionOut:elastic;"href="echo $image;"><img src="echo $image;" width="432" " alt="Lightbox Image"></a>
  32. ?>
  33. </div>
  34.  
  35. This above code returned an error.
Advertisement
Add Comment
Please, Sign In to add comment