I initially posted my question as a reply to this post, but I figured it was unlikely to be seen there any time soon. Hence the new one here.
As laid out in the post mentioned above, I make use of
<?php echo substr('{linkurl}', 0, 30) , '...'; ?>instead of char_limit.
I’m using this code snippet in a template of an image gallery (as the char_limit didn’t limit enough). On that page the thumbs of one category are displayed. Works perfectly for all categories except two..?
When I try to navigate to those categories, they give me these errors:
Category 1: Parse error: syntax error, unexpected T_STRING in /home/user/website.com/eebase/core/core.functions.php(634) : eval()‘d code on line 14
Category 2: Parse error: syntax error, unexpected T_STRING in /home/user/website.com/eebase/core/core.functions.php(634) : eval()‘d code on line 16
Why would this work for the rest of the categories and not for these? Template codes are exactly the same…
The pertinent part:
{exp:gallery:entries gallery="mainalbum" orderby="date" sort="desc" dynamic="off" category="{segment_4}" }
<div class="breadcrumb"> <a href="http://{path=/gallery/index}"><b>Home</b></a> ‹ <a href="http://{path=/gallery/catoverview}"><b>Galleries</b></a> ‹ {category}</div>
{entries}
{row}
<div class="thumbthumbs">
<a href="http://{image_url}" class="lightbox">http://www.website.com/utilities/phpThumb/phpThumb.php?src={image_url}&w=150&h=150&zc=1&q=100</a> <strong><?php echo substr('{title}', 0, 20) , '...'; ?></strong> </div>
{/row}
{/entries}</div>
{/exp:gallery:entries}
</div></div>Char_limit does not give me any errors by the way. (Not sure if that helps to narrow it down any.)
I’m running version 1.6.9, build 20100430
[Mod Edit: Moved to the How to forum]