Search found 4 matches

by leowolf
Fri Mar 31, 2006 6:14 am
Forum: General discussions
Topic: Trying to use smarty in blog entry
Replies: 7
Views: 3868

Finally...

Thanks for your help-- very much appreciated.
It wasn't quite right; can't tell you why, but you got me on the right road and here's where I finally ended up. Not as general as your solution, but it works for this site. (My table prefix is blog.)

Here's the code in config.inc.php ...
by leowolf
Thu Mar 30, 2006 3:17 pm
Forum: General discussions
Topic: Trying to use smarty in blog entry
Replies: 7
Views: 3868

Database call from Smarty

But my own custom code still has problems.
<?php
$serendipity['smarty']->register_function('my_entry_title', 'my_entry_title');

function my_entry_title($params, &$smarty) {
$title = serendipity_db_query ("SELECT title FROM {$serendipity['dbPrefix']}entries WHERE id = $params['id']");
return ...
by leowolf
Thu Mar 30, 2006 2:16 pm
Forum: General discussions
Topic: Trying to use smarty in blog entry
Replies: 7
Views: 3868

Config for smarty

Yes to the first question; forgot to say that. My code is in a config.inc.php file in the templates/villages2 folder, which is the template I'm using.

The smarty plug-in is enabled and I've got Yes selected for the Body and Extended text (but not for the Comment or HTML nugget).

Other plug-ins are ...
by leowolf
Thu Mar 30, 2006 6:04 am
Forum: General discussions
Topic: Trying to use smarty in blog entry
Replies: 7
Views: 3868

Trying to use smarty in blog entry

I'm trying to use Smarty in a blog entry. (I want to create an "index page" to some of the entries and I want to pull out the entry titles for this index page.)
I've got the Smarty plugin installed and enabled. It is set up as the top Markup Plugin in the list. I'm running Serendipity 0.9.1 and PHP ...