Site Information getting truncated

Holy Sarcasm - February 19, 2008 - 16:53
Project:Simplex2
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Using Vista, Drupal 6, simplex2 ver 6.x-.1.1
I go into admin and fill out "site information" for my Simplex2 theme.
It is allowing about 16 characters. Everything beyond 16 characters gets truncated.

furthermore, you can't leave it black. So . . .I finally had to fill it out (more than 16 characters) and then use CSS to collapse and hide it.

#1

Christoph - March 13, 2008 - 13:57

Open page.tpl.php and look for the line

<span class="head-title"><?php print(substr($site_name, 0, 1)) ?><span class="head-darktitle"><?php print(substr($site_name,1,20)) ?></span></span><br/>

Here XXX

<?php print(substr($site_name,1,XXX)) ?>

you can choose where the title is cut.

#2

soulston - March 29, 2009 - 15:26

I am pretty sure you could just use:

This for the first coloured letter

<?php
print(substr($site_name, 0, 1))
?>

And this for the rest of the title
<?php
print(substr($site_name,1))
?>

There should be no need to specify the third parameter (see http://uk.php.net/substr)

Example #3 Basic substr() usage

echo substr('abcdef', 1); // bcdef
echo substr('abcdef', 1, 3); // bcd
echo substr('abcdef', 0, 4); // abcd
echo substr('abcdef', 0, 8); // abcdef
echo substr('abcdef', -1, 1); // f

 
 

Drupal is a registered trademark of Dries Buytaert.