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 objects displayed in FCKeditor

 
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
blackhawkmx
Smarty Regular


Joined: 20 May 2005
Posts: 76

PostPosted: Sun Apr 22, 2007 3:29 am    Post subject: Smarty objects displayed in FCKeditor Reply with quote

Sup peeps,
I'm loading a smarty object into a <text area> location like this...

Code:

<td>
<textarea  rows="8" cols="85">
{$smartyobjects->mObjects[cObjects].smarty_description}
</textarea>
</td>



I'm pretty much loading and viewing the .smarty_description (coming from my database), into a text area. When I press submit, the text then gets resubmitted back to the database. If I want to edit it again, I just hit the edit button and the text area becomes editable again, makes sense?

Everything works great because I can edit my text and put in any html code I want and submit it back to the database by hitting the submit button. But now I want to take things a little further (for a client who doesn't know HTML) and put in the FCKeditor to edit the textarea content.

would anyone have advice for me? thanks a bunch!
_________________
Bring it back to basics. You and I can make it right!
Back to top
View user's profile Send private message
blackhawkmx
Smarty Regular


Joined: 20 May 2005
Posts: 76

PostPosted: Sun Apr 22, 2007 5:25 am    Post subject: Reply with quote

I read this page...
http://wiki.fckeditor.net/Developer%27s_Guide/Integration/PHP/Smarty

but I am currently using a class, constructor and init on my smarty pluggin pages. Plus, each of my .tpl pages will load their respected pluggin pages by having the following code attached to each .tpl page...

{load_mydata assign="myobject"}
<html>...

{$myobject->...}

</html>

any help will do. thanks!
_________________
Bring it back to basics. You and I can make it right!
Back to top
View user's profile Send private message
blackhawkmx
Smarty Regular


Joined: 20 May 2005
Posts: 76

PostPosted: Sun Apr 22, 2007 4:46 pm    Post subject: Reply with quote

i came across the smarty plugin on one of the forum pages here at smarty's site and placed it in the libs/pluggin section. I'm making great progress. I know see the fckeditor pop up when I press my edit button. But I can't set my value of the fckeditor equal to the smarty object I created...

Code:

{fckeditor BasePath="include/fckeditor/" InstanceName="test" Width="400px" Height="300px" value="$my_objects->mObjects[cObjects].emobject_description"}


I get an error when I use it and it says...

Code:

Object of class MyObjects could not be converted to string.


Any pointers will do - thanks!
_________________
Bring it back to basics. You and I can make it right!
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Sun Apr 22, 2007 6:39 pm    Post subject: Reply with quote

Don't quote quote vars unless you intend to imbed them in a literal string. Quotes are intended for literals. If you do embed vars in literal strings, then the manual tells you how: http://smarty.php.net/manual/en/language.syntax.quotes.php
Back to top
View user's profile Send private message
blackhawkmx
Smarty Regular


Joined: 20 May 2005
Posts: 76

PostPosted: Sun Apr 22, 2007 9:48 pm    Post subject: Reply with quote

boots I just want to say thank you so much for helping me out. I got the fckeditor working very well on my system. the last thing I needed to do was assign my old textarea name as the new instance name and wala - got it going!

Thank you so much boots!

Razz Shocked Laughing
_________________
Bring it back to basics. You and I can make it right!
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
Page 1 of 1

 
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