Yii Framework Forum: [EXTENSION] phundament - Yii Framework Forum

Jump to content

  • (11 Pages)
  • +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] phundament Phundament 3: Yii CMS based upon independent modules and extensions Rate Topic: ***** 3 Votes

#121 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 19 June 2012 - 06:17 AM

Hi ametad,

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
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#122 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 19 June 2012 - 07:13 AM

Thank you! That realy takes some weight of my shoulders :P
It works!
0

#123 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 19 June 2012 - 10:12 AM

Something else: what are your plans/approach with the isActive()function in the P3Page model? I realy like to get that working.

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!
0

#124 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 19 June 2012 - 10:29 AM

Could you try, test and harden something like this ... and send me the pull request ;)

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
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#125 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 20 June 2012 - 11:46 AM

View Postschmunk, on 19 June 2012 - 10:29 AM, said:

Could you try, test and harden something like this ... and send me the pull request ;)

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!
0

#126 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 20 June 2012 - 12:14 PM

Will try to implement it ASAP ...
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#127 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 23 June 2012 - 06:41 PM

Sorry, my code above did not work, but it's here :) give it a try.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#128 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 19 July 2012 - 05:36 AM

Hi Schmunk,

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!
0

#129 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 19 July 2012 - 05:50 AM

Thanks ametad!

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()?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#130 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 07 August 2012 - 02:09 PM

Still... thank you :) From time to time I drop by and then I don't write or call ;) But I am a little bit too busy. Too bad, but hopefully you can give me an hint about the following.

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 :D

Greetings!
0

#131 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 09 August 2012 - 10:27 AM

Hi ametad,

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
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#132 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 August 2012 - 09:12 AM

View Postschmunk, on 09 August 2012 - 10:27 AM, said:

Hi ametad,

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! :lol: Have fun and enjoy your free time man.

I will give it some thoughts with the directions you gave. Thanks!
0

#133 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 24 August 2012 - 07:54 AM

Hi ametad, did you find a solution?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#134 User is offline   jason_c 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-May 12

Posted 28 August 2012 - 02:35 PM

Hey schmunk!

Really enjoying working with Phundament on my current project. Thanks for all you have done with it!

I just tried visiting phundament.com and kept getting redirected to a GitHub 404 page. There was an error message about framing not being permitted. Is anyone else seeing this or is it just me?

-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

0

#135 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 30 August 2012 - 03:05 AM

Hi jason_c,

thank you for your notice and your kind words - I just added a link in the meantime.

Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#136 User is offline   SutterSaga 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-June 12
  • Location:Long Island, NY

Posted 06 September 2012 - 09:00 AM

I just installed phundamental 3 - it setup great - except when I try and update text in a widget. if get the code.

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.
0

#137 User is offline   SutterSaga 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-June 12
  • Location:Long Island, NY

Posted 06 September 2012 - 09:31 AM

side note - I'm running php 5.4.4? - which may be more strict about code... possible?
0

#138 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 06 September 2012 - 10:28 AM

Didn't tried it with 5.4 yet, sorry.

Although it's not my code :) But could you try this:

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 ;)
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#139 User is offline   SutterSaga 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-June 12
  • Location:Long Island, NY

Posted 07 September 2012 - 09:32 AM

schmunk, worked perfect - thanks so much...
0

#140 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 24 September 2012 - 08:39 AM

Wrote a tutorial about the very basics ... http://www.yiiframew...-with-composer/
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

Share this topic:


  • (11 Pages)
  • +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users