Re: Any idea how read views from database?
I believe wordpress writes the templates directly to a a file.If you implemented editing the template file directly you would not have to worry about getting template from the database.Also, I have not looked into this, maybe someone else has, but you could theorectically extend the "view" class and change the functionality from reading from a file to reading from a db table. In your controller you would replace the $this->view variable to an instance of the class you created to extend the regular view class. In extending your view class you would basically have to rewrite the render function and the functions dealing with "_getFileName" and similar requests. Overall I think it would be much easier to design your application to be visually modified strictly with CSS embeded in the page. The next easiest thing to do would be to allow the user to write directly to the template files (like Wordpress). On 6/4/06, Petr Vytlacil <[EMAIL PROTECTED]> wrote: But I want to users could change CSS and template. User could choosetags that use for design gbook. So example, for Wordpress you can dosome template and use wordpress tags. Something of that kind I want to for users. But this template (view for gbook) i want to save indatabase. But I dont know how use this view from DB for controller. Iviewed class view from CakePHP and this class read all view from file. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
But I want to users could change CSS and template. User could choose tags that use for design gbook. So example, for Wordpress you can do some template and use wordpress tags. Something of that kind I want to for users. But this template (view for gbook) i want to save in database. But I dont know how use this view from DB for controller. I viewed class view from CakePHP and this class read all view from file. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
That is true. 95% of myspace profiles look like crap.But if this were controlled (ie regex the style sheet input box) or just allow certain customizations (i.e. a text box for border color, a text box for background color, a text box for header image, etc..) then he could generate his own style sheet with the data that was input. Originally I don't belive being able to customize your myspace profile was an intended by the developers. It seems to just be a side effect of not filtering their input boxes well. On 6/3/06, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: One option might be to just allow the user to modify CSS and store those CSS modifications in the database. You could restrict what CSS is allowed so as to not ruin the whole page. I guess this would be similar to how myspace.com allows people to customize their pages. Besides the fact that about 95% of the myspace profile pages ruin the normal myspace.com layout ... and layout in general ^^. ; ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
One option might be to just allow the user to modify CSS and store those CSS modifications in the database. You could restrict what CSS is allowed so as to not ruin the whole page. I guess this would be similar to how myspace.com allows people to customize their pages. Besides the fact that about 95% of the myspace profile pages ruin the normal myspace.com layout ... and layout in general ^^. ; ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
One option might be to just allow the user to modify CSS and store those CSS modifications in the database. You could restrict what CSS is allowed so as to not ruin the whole page.I guess this would be similar to how myspace.com allows people to customize their pages. In your thtml file you would just put section at the top for the style to be set and in the controller you would pull the information from the data base and use the $this->set('styles', $styles); to change the look of your guest book. On 6/3/06, Petr Vytlacil <[EMAIL PROTECTED]> wrote: And how for this problem?I need know how use view from database for any functions incontrollers. Now this view are use from app/view/... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
And how for this problem? I need know how use view from database for any functions in controllers. Now this view are use from app/view/... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
Why not just use caching? http://manual.cakephp.org/chapter/17 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
So what i want to do. 1. I konw how programme gbook with CakePHP 2. I want to afford, people could register self gbook and in admin area setting how their gbook will look like. 3. Every owner gbook can do self them ( template ) a setting CSS for this gbook. So example, this is view for show post in book: --- Posts in book Id Author Title Created - For example this teplate will by default setting, and users could remake it and save to database. 4. So I need how use template from db for show data, now CakePHP use all views from directories that are save in ...app/views/directory_name_as_cotroller_name/ THX --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
nevermind. I think I did misunderstand part of what was being asked.On 6/2/06, John Zimmerman [gmail] <[EMAIL PROTECTED] > wrote:I think you are going to have to clarify what you need a little bit. So far what we can tell is...You want a guest book system that you can change the look ofYou know about Cake views with thtml files You are probably trying to get data from the database into your templates.You are thinking about using SmartyYou should be able to do everything without using Smarty. I may be missing the question here but I think running through the blog tutorial in the manual at http://manual.cakephp.org should give you a pretty good idea how to setup the guestbook. On 6/2/06, Petr Vytlačil <[EMAIL PROTECTED]> wrote: Hi CakePeople,I want to programme easy guest book system with support use selftemplet for define how gbook look. It crossed my mind that i could havesave some views (thtml file) to database and read them from db. How I can use for show data views which are save in directory views, but howi can make force controller to use views from DB?I know that i can use SMARTY templet in CakePHP and that I cane readfrom DB, but it is last solvent. I thank you for your adviceP.V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
I think you are going to have to clarify what you need a little bit.So far what we can tell is...You want a guest book system that you can change the look ofYou know about Cake views with thtml files You are probably trying to get data from the database into your templates.You are thinking about using SmartyYou should be able to do everything without using Smarty. I may be missing the question here but I think running through the blog tutorial in the manual at http://manual.cakephp.org should give you a pretty good idea how to setup the guestbook.On 6/2/06, Petr Vytlačil <[EMAIL PROTECTED]> wrote: Hi CakePeople,I want to programme easy guest book system with support use selftemplet for define how gbook look. It crossed my mind that i could havesave some views (thtml file) to database and read them from db. How I can use for show data views which are save in directory views, but howi can make force controller to use views from DB?I know that i can use SMARTY templet in CakePHP and that I cane readfrom DB, but it is last solvent. I thank you for your adviceP.V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Any idea how read views from database?
You might want to override the View class, much like what has been done with Smarty integration and stuff. You could also look at how render works, and override it in your AppController... Thinking out loud, -- John On Jun 2, 2006, at 1:47 PM, Petr Vytlačil wrote: > > Hi CakePeople, > I want to programme easy guest book system with support use self > templet for define how gbook look. It crossed my mind that i could > have > save some views (thtml file) to database and read them from db. How I > can use for show data views which are save in directory views, but how > i can make force controller to use views from DB? > > I know that i can use SMARTY templet in CakePHP and that I cane read > from DB, but it is last solvent. > > I thank you for your advice > P.V > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---