|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
blackhawkmx Smarty Regular
Joined: 20 May 2005 Posts: 76
|
Posted: Sun Apr 22, 2007 3:29 am Post subject: Smarty objects displayed in FCKeditor |
|
|
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 |
|
blackhawkmx Smarty Regular
Joined: 20 May 2005 Posts: 76
|
Posted: Sun Apr 22, 2007 5:25 am Post subject: |
|
|
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 |
|
blackhawkmx Smarty Regular
Joined: 20 May 2005 Posts: 76
|
Posted: Sun Apr 22, 2007 4:46 pm Post subject: |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
blackhawkmx Smarty Regular
Joined: 20 May 2005 Posts: 76
|
Posted: Sun Apr 22, 2007 9:48 pm Post subject: |
|
|
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!
_________________ Bring it back to basics. You and I can make it right! |
|
Back to top |
|
|
|
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
|