I could not get cmssitestructuremodule working, simply too many PHP errors, or maybe it isn’t compatible with Yii 1.1.8-dev.
Last error:
CException TreeBehavior does not have a method named "getIsNewRecord".
Would be great if you can create a GitHub branch with a working cms module
If the module renders content as text or html it’s not possible to add a widget.
You’d have to extend it, so it could can also render or execute PHP, but that as also security implications.
But p3widget would be able to handle it’s widgets, because it can vary its content by module-ID and request-Param, which should be sufficient - but module-ID handling is not implemented … yet.
Branches are local to the repo. I don’t know about Git specifically, but in Mercurial, repo branches aren’t as fun/easy as a fork is, and I know in Mercurial that users are heavily encouraged to use forks as everything seems to run more smoothly than the branching process. I’ve tried branches before and didn’t enjoy the workflow. After that initial attempt at branching (and subsequently finding that forking is more common), I personally have yet to find a need for a “branch”.
Forks are a way for anyone (yourself or any "follower") to create a new repo based on whatever is being forked from. You can (manually) pull in changes from the parent repo whenever you desire, which includes committer & history information (after a pull, you would merge the changes into your fork, and then commit/push the merge).
Within Github (or Bitbucket, if using mercurial), you can then see the heritage of a repository, to see what forks have occurred (full parent/child genealogy).
“Yii Application” (default Yii-generated app with some small customizations, so that I don’t have to generate every time. Also contains “Yii Base” as sub-repo in /framework/ dir)
-> "Some Project" (I create a new fork of "Yii Application" for whatever project I happen to be working on)
I use forks and sub-repos to keep changes a bit more segregated, so I can more easily maintain code bases separately. If I create an extension (such as my new Riiak ext), it gets it’s own repository, which I have now pulled into “Yii Application” as a /protected/extensions/riiak/ sub-repo. Then all of my projects (which are forked from “Yii Application” can just pull in the latest changes from their parent repo to have the new Riiak sub-repo show up.
Hopefully that post is coherent, I’ve had a long day.
If you have any questions or don’t quite understand what I’ve said above, just msg me, I’ll show you exactly what I’m talking about.
in cms project or other project , the searching functionality is required ,so how to develop it, my thought is to create a search module , when people search something there is a center place for searching , like :search people(may have some subitem to helping search ,etc age,area ,gender …),search blog, search picture,search video ,search audio …
for well structure and flexible of system, and there may have some unknown modules will be added in future,the search module should modify little or even no modify .how to achieve this goal?
another question : how to design a system that composed of many modules , and these modules should communicate to other modules , often the module should be separate from other modules but inevitably there comes some relation which need to connect these modules, like the search module ,adminModule etc…
. so some communication mechanism is needed . and the relations between modules will be as class : admin,extend , dependent ,use , aggregation …
About the search function … I think you’re totally right with your posting.
I also thought about this many times, but I haven’t found a perfect solution.
In Phundament 2 for example every core module provides a search function by a CAutoComplete input field. But that’s far from perfect.
But I think this should be accomplished by the module. It has to provide a custom view for selecting records. Facebook does this pretty nice IMHO, sometimes they have kind of autocomplete input and more complex stuff is handled by a custom view in a HTML dialog.
For displaying results I think the search-condition feature comes in pretty handy.
But in the end most likely you’ll write your own custom search, also because of the actions the user will take after searching. For example images … do you want to display the image or the complete page where the image is found.
When using the widget system it gets even more complex with searching, because you’ll first have to find the content data in your database and then also the position of the container, which renders the widget with this data.
So, very often I end up with a Google search for our sites.
Also an option would be Lucene, but I haven’t tried it yet.
Let us know if you have more thoughts about this topic, I would definitely put this on the conventions list.
Oh … PS to all:
What’s about Yii Modules Conventions Association (YMCA) as a working title for this?
Schmunk your idea is excellent, I also saw the video and I was impressed.
I tested phundament2 and I like the fact that it shows many thinks in dropdown lists or hidden divs. This is something that must be followed in every CMS.
In phundament2 I was confused in the structure of inputs for HTML, pages etc so I believe we must have something like an info icon beside each title and onmouseover show a dialog.
Someone said that frontend and backend must be totally different. I partially disagree and my opinion is that the person who writes articles, titles of sections etc must see the frontend somehow but full of icons for inline/modal edit, send to trash, add new etc.
In addition, I believe that similar to Macs/GNOME 3/Unity/Windows 7 a search must be on the top toolbar and show every widget/article title/category title etc when we type letters. I thought that p2 had it in inputs of HTML etc but even I typed some letters nothing appeared.
Did you think of using Smarty ? I believe that it will be very helpful for many developers.
I suppose that some of the above are already in p3 but up until now I couldn’t test it.
sorry for my late respone, I went into holidays at the day you were posting this.
In Phundament 3 there’s no HTML widget anymore, you could create one if you want to but HTML content is now built-in native into P3Widget, which offers a very slim approach on how to dynamically create widgets with almost any options you want.
I’ve just finished the first version - but yet to be released - of P3Media which is a FileManger with ckeditor integration. This is another core part of my idea of a Yii-based CMS.
I think you could create any page dynamically with P3Widget and P3Media together.
Following the main idea, the UI should also be minimalistic.
I would like to have an input control, which just displays values and a button, together with a jQuery dialog, where you can render your custom select view. Facebook does this very well I think.
I agree with almost all points, but I don’t think we need smarty. PHP itself is the most powerful template engine in PHP
If you want to restrict access to certain functions to the user, there may be a more "Yii-style" way to do this…
schmunk, this is awesome. Regarding the frontend/backend distinction, coming from Joomla, I know that many people there report the frontend/backend split as a huge training issue. Drupal, notably, has a single interface, as does Concrete5. Agreeing with the last poster, I like, as much as possible, a single interface with slight variations depending upon the roles of the logged in user.
The interface depending on roles should be available since to latest release, I’ve added an ‘Editor’ role via rights with permissions to the controllers of p3media and p3widget. If you’re not an ‘Editor’ or ‘Admin’ you can’t edit widget or upload/edit media files.
Will also think about the search petros mentioned.