Search found 4 matches

by Chandler Mike
Tue Oct 24, 2006 10:52 pm
Forum: Themes
Topic: Beginner here...
Replies: 6
Views: 4924

Hi Mike!

If you got that PHP code, you can use this in your smarty .tpl file:


{random_image}


However, your PHP function call must be like this:


<?PHP
$serendipity['smarty']->register_function('random_image');
function random_image($params, &$smarty) {
$random = mt_rand(1, 13);
return ...
by Chandler Mike
Tue Oct 24, 2006 10:33 pm
Forum: Themes
Topic: Beginner here...
Replies: 6
Views: 4924

Okay, I think I've gotten somewhere, but am needing some help.

I don't precisely understand how to register a function from the config.inc.php file to return a variable I can use in my index.tpl file.

My config file looks like this:

<?PHP
$serendipity['smarty']->register_function('random_image ...
by Chandler Mike
Tue Oct 24, 2006 6:42 pm
Forum: Themes
Topic: Beginner here...
Replies: 6
Views: 4924

Re: Beginner here...

I'm not too familiar with the MT templates (and unfortunately I don't have the time to have a look at them at the moment)
Ah, what the hell, what's another 5 minutes if you're already late, right? :wink:

So I just had a look at the MT Squash template ... hm, that's not much in that template dir ...
by Chandler Mike
Tue Oct 24, 2006 5:50 pm
Forum: Themes
Topic: Beginner here...
Replies: 6
Views: 4924

Beginner here...

I am just learning how to use Serendipity, and am trying to get our look and feel down.

I renamed the MT3-Squash template to my own name, and uploaded it so I can work on my own style.

Problem is, from reading the help, there should be a layout.php in there, but I don't see one. The newspaper ...