Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty and SPAW-editor
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
baturin
Smarty n00b


Joined: 29 Oct 2003
Posts: 1
Location: Ekaterinburg, Russia

PostPosted: Wed Oct 29, 2003 5:11 pm    Post subject: Reply with quote

I have some problem with Spaw when trying to include files within the function. There are some global variables in Spaw class that nothing worked... I solve this by using ob_start, ob_get_content and ob_clean_end in php script that display the template. In the template I simply print the variable.
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Oct 30, 2003 12:12 am    Post subject: Reply with quote

Okay, so maybe you do want to use a plugin for htmlArea. This might start you off.
[php:1:e7f2d5eac6]<?php

/**
* Smarty function plugin
* -------------------------------------------------------------
* Type: function
* Name: editor
* Version: 1.2
* Author: boots
* Purpose: creates a htmlArea based editor control
* -------------------------------------------------------------
* @param name required form name for control
* @param data optional data that control will start with
* @param width optional control width (css units), default: 100%
* @param rows optional text rows to display, default: 20
*/
function smarty_function_editor( $params, &$this )
{
extract ($params);
if (!isset($name) || empty($name)) {
$this->trigger_error('editor: required parameter "name" missing');
} else {
if (!isset($width)) $width = '100%';
if (!isset($rows)) $rows = '20';
if (!isset($data)) $data = '';
$out .= "\n<textarea name=\"$name\" style=\"width:100%;\" rows=20>$data</textarea>\n";
$out .= "<script language=\"JavaScript1.2\" defer>\n";
$out .= " editor_generate('$name');\n";
$out .= "</script>\n";
return $out;
}
}
?>[/php:1:e7f2d5eac6]
Back to top
View user's profile Send private message
mystrymaster
Smarty Rookie


Joined: 31 Oct 2003
Posts: 17

PostPosted: Thu Nov 13, 2003 2:06 pm    Post subject: Reply with quote

I am having no troubles getting spaw to work with smarty what are the issues that you are having?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Nov 13, 2003 2:55 pm    Post subject: Reply with quote

I had almost every problem with SPAW. Yet almost none with htmlArea. I've never got SPAW to a state that I thought was satisfactory with Smarty.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP