[EXTENSION] phundament Phundament 3: Yii CMS based upon independent modules and extensions
#121
Posted 19 June 2012 - 06:17 AM
the admin view of P3Pages tries to render a tree from all pages within your app.
Therefore it has to look into the metadata records of your page table.
Looks likes a metadata record can not be found?!
Did you delete a meta-data record manually or did you create a P3Page record directly in the database?
Metadata records should never be missing, because they're always created afterSave() by a behavior.
If you can spot the P3Pages record which has no metadata, you may try to open it directly via URL an resave it, the metadata should get generated then.
Does this help?
Best regards,
schmunk
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#122
Posted 19 June 2012 - 07:13 AM
It works!
#123
Posted 19 June 2012 - 10:12 AM
Also I am trying to figure out how to get submenu's in the navbar through P3... Can you tell me more about that too?
Greetings!
#124
Posted 19 June 2012 - 10:29 AM
public function isActive(){
return (self::getActivePage()->id == $_GET[self::PAGE_ID_KEY])?true:false;
}Should be available in $model then.
foreach(...) if ($model->isActive) $cssClass = "active"
PS: You'll find more unported code here: http://code.google.c...dels/P2Page.php
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#125
Posted 20 June 2012 - 11:46 AM
schmunk, on 19 June 2012 - 10:29 AM, said:
public function isActive(){
return (self::getActivePage()->id == $_GET[self::PAGE_ID_KEY])?true:false;
}Should be available in $model then.
foreach(...) if ($model->isActive) $cssClass = "active"
PS: You'll find more unported code here: http://code.google.c...dels/P2Page.php
I am sorry but I feel my skills are yet not at a level for this kind of development you propose. Perhaps in the future. Keep up the good work! Because a lot of features in P3 a realy like, but it is hard for me to read the code.
So long!
#126
Posted 20 June 2012 - 12:14 PM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#127
Posted 23 June 2012 - 06:41 PM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#128
Posted 19 July 2012 - 05:36 AM
You make progress I see with P3. For my project unfortunately P3 wasn't suitable enough yet, but I watch your progress...
In my project like you I try to implement the two modules Rights (Crisu83) and User (mishamx). I came across a problem and perhaps this is also good for you to know. And also perhaps you could give me some feedback about how to solve this, because I think you have more experience.
In the User module, actionEdit in ProfileController calls an method called updateSession expecting to be in the WebUser class.
'user/profile/edit':
public function actionEdit()
{
$model = $this->loadUser();
$profile=$model->profile;
// ajax validator
if(isset($_POST['ajax']) && $_POST['ajax']==='profile-form')
{
echo UActiveForm::validate(array($model,$profile));
Yii::app()->end();
}
if(isset($_POST['User']))
{
$model->attributes=$_POST['User'];
$profile->attributes=$_POST['Profile'];
if($model->validate()&&$profile->validate()) {
$model->save();
$profile->save();
Yii::app()->user->updateSession();
Yii::app()->user->setFlash('profileMessage',UserModule::t("Changes are saved."));
$this->redirect(array('/user/profile'));
} else $profile->validate();
}
$this->render('edit',array(
'model'=>$model,
'profile'=>$profile,
));
}
But you use another User class because of the implementation of Rights. Therefore after an update of a user-profile from within the ProfileController (usually accessible for the logged-in user to update his own profile) there will be an Error:
RWebUser and its behaviors do not have a method or closure named "updateSession".
The updateSession() method in the WebUser class in the User module:
public function updateSession() {
$user = Yii::app()->getModule('user')->user($this->id);
$userAttributes = CMap::mergeArray(array(
'email'=>$user->email,
'username'=>$user->username,
'create_at'=>$user->create_at,
'lastvisit_at'=>$user->lastvisit_at,
),$user->profile->getAttributes());
foreach ($userAttributes as $attrName=>$attrValue) {
$this->setState($attrName,$attrValue);
}
}I think this method is not really necessary... So I commented it out in the ProfileController. When you look at this, what do you think is a good solution? Is this method really needed to function?
Hopefully this helps you also in developing P3.
Write to you later!
#129
Posted 19 July 2012 - 05:50 AM
I've never used it yet
I even have this problem before:
"./protected/modules/user/views/asset" to be published does not exist.
But that's an easy fix, I think.
Cya.
PS: yii-user has become pretty active https://github.com/m...ii-user/network, but you've your own fork, so you'll know that.
PS2: May we'd come around this issue with a simple function_exists()?
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#130
Posted 07 August 2012 - 02:09 PM
About the Bootstrap Carousel Widget: Is it possible to just put the images in the textarea instead of filling out the properties with the JSON editor..
It is pretty hard for a normal user to know the right params and how to set them, but there is this pretty ckeditorfield of yours
Greetings!
#131
Posted 09 August 2012 - 10:27 AM
Sorry I am on vacation at the moment writing from my phone.
I can't try this out, but it should be possible somehow.
Maybe you can ask Chris the developer of yii-bootstrap about this issue.
I think you could try to create the same markup with ckeditor or even better with a template to make it more easy for your users.
Best regards,
Schmunk
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#132
Posted 10 August 2012 - 09:12 AM
schmunk, on 09 August 2012 - 10:27 AM, said:
Sorry I am on vacation at the moment writing from my phone.
I can't try this out, but it should be possible somehow.
Maybe you can ask Chris the developer of yii-bootstrap about this issue.
I think you could try to create the same markup with ckeditor or even better with a template to make it more easy for your users.
Best regards,
Schmunk
You are the best, writing when you're on vacation!
I will give it some thoughts with the directions you gave. Thanks!
#133
Posted 24 August 2012 - 07:54 AM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#134
Posted 28 August 2012 - 02:35 PM
Really enjoying working with Phundament on my current project. Thanks for all you have done with it!
-Jason
EDIT (29-08-12): The issue seems to have been resolved. Thanks again schmunk!
This post has been edited by jason_c: 29 August 2012 - 01:23 PM
#135
Posted 30 August 2012 - 03:05 AM
thank you for your notice and your kind words - I just added a link in the meantime.
Best regards,
schmunk
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#136
Posted 06 September 2012 - 09:00 AM
Fatal error: Cannot re-assign auto-global variable _POST in C:\xampp\htdocs\africamd\protected\extensions\phundament\gii-template-collection\components\Relation.php on line 620
it's a fresh install, no other errors in setup - what's wrong?
again, sorry if this is a dumb question.
#137
Posted 06 September 2012 - 09:31 AM
#138
Posted 06 September 2012 - 10:28 AM
Although it's not my code
change
public function handleAjaxRequest($_POST) {
print_r($_POST);
}
into
public function handleAjaxRequest($post) {
print_r($post);
}Makes no sense to me, why the global var $_POST is used in the function.
PS: And send me a pull request if it works
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#140
Posted 24 September 2012 - 08:39 AM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari

Help















