Automatic picture enlargment in the content block
Permalink
Hello
Maybe someone needs this:
Automatic picture enlargment in the content block.
You need to modify the content controller.php file on line 80 width following addional code:
You need also the shadowbox JS Files.
- You can get it from this theme:
http://www.concrete5.org/marketplace/themes/eye-theme/...
- copy the "js" and the "shadowbox" Folder to your theme folder
- add to your header.php files following lines after "header_required" and before </head>:
Now all pictures added in the content block will linked to the shadowbox.
It looks like this:
http://www.around.ch/weltreise/reiseberichte/13-hong-kong/...
Or exists a better way to do this? :D
Maybe someone needs this:
Automatic picture enlargment in the content block.
You need to modify the content controller.php file on line 80 width following addional code:
$text = preg_replace('/<img.*style="(.*?)".*src="(.*?)".*alt="(.*?)".*width="(.*?)".*height="(.*?)".*?>/', '<a href="\2" rel="shadowbox[set];"><img style="\1" src="\2" alt="\3" width="\4" height="\5" /></a>', $text);
You need also the shadowbox JS Files.
- You can get it from this theme:
http://www.concrete5.org/marketplace/themes/eye-theme/...
- copy the "js" and the "shadowbox" Folder to your theme folder
- add to your header.php files following lines after "header_required" and before </head>:
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/shadowbox/shadowbox.js"></script> <script type="text/javascript"> Shadowbox.init({ players: ["html","img","swf","flv","qt","iframe"] }); </script> <link rel="stylesheet" type="text/css" href="<?php echo $this->getThemePath()?>/shadowbox/shadowbox.css" />
Now all pictures added in the content block will linked to the shadowbox.
It looks like this:
http://www.around.ch/weltreise/reiseberichte/13-hong-kong/...
Or exists a better way to do this? :D