[EXTENSION] phundament

[size="5"][center]Thank you![/center][/size]

I don’t know what I did but it works!

Ok, actually I did a few things.

I downloaded the app but it only had a few files but at least I got the composer.phar one. The full file version only had composer.json.

I actually ran the command for the composer.phar but went back and copied in the files that I thought were missing.

Ran the command again, ran the SH file command, ran the composer.phar update command. Restarted my server since I had cache issues (think … because I was blowing errors on a directory that no longer existed and search didn’t show up with the old directory name).

I did get 1 error on the SH command:

Which I’m not sure if is an issue yet or not …

Thanks Schmunk!!! :D :D :D

Now I have to start playing with this and see what it can do :lol:

I have 2 questions at the moment :rolleyes:

What is the license?

Anybody familiar with flexicacms? IF yes, what are the differences?

Nice ;D ;D ;D

That’s by design B) phundament/app is the composer approach of getting Phundament.

The advantage is that I do not have to mirror every repo to github which I use, instead composer can fetch the stuff from different sources and can also maintain a consistent mixture of all packages (e.g. yii-less works only with bootstrap 2.0.1)

When you download it as an archive or make a git clone then you’ll download all packages at once.

That’s no issue, your directories were already there.

BSD :)

Just speaking about Phundament - it’s designed to be 100% modular and 100% Yii. Eg. you should easily be able to replace the user module or use a custom theme.

I’ve just supplied three basic modules which I did not find.

P3Pages, let’s you administrate your page structure. P3Media, FileManager with ckeditor integration and P3Widgets.

With P3Widgets, you can add any existing CWidget to your application, just add it to the config. And it will appear in the dropdown of widget form.

These modules need P3Extensions, a library like YiiExt.

Thank you too & Best regards,

schmunk

A major reason why i wanted to get this working is that I’m aiming for a plugin architecture like WP/drupal.

My base understanding if phundament means that I’m most of the way there. Next seems to be getting modules to communicate with each other through an event aystem in the core.

Am i correct then that the composer will allow me to set up a repository of widgets and modules on my own server?

Thanks for all the hard work!!!

Me too :)

Could you give me an use-case example?

Sure, just customize this file https://github.com/phundament/app/blob/master/composer.json

The phundament/app repo just contains this file, a composer.phar and a config file.

:D

Mindplay in his second post is sort of what I’m thinking:

http://www.yiiframework.com/forum/index.php/topic/9780-flexicacms/page__st__40

However i emailed him and he said that he never got the result he wanted.

I still need to experiment with phundament but to expand what i wrote above. So far I see a lot of ability to allow the user to access the repository and pull in modules and widgets which might be good enough!

But going back to the idea of WP like plugin would be able to tap into Yii’s event system and allow you to override or extend what has alteady been installed or just install a new function. So, for example you start with a simple forum, then drop in a plugin the allows you ban users.

I basically want a sustem that allows you start woth abtelatively simple funtionality but then when the need arises to allow you expand with out changeing the modiule for another with the functionality you need and maybe with functionality you don’t need.

[size="4"]Happy Easter! https://github.com/phundament/app/zipball/0.1[/size]

Installation via composer with automatic webapp creation, migrations and file permission setup.

All the stuff with literally one (1) command :rolleyes: Tested on Mac OS X and Windows.

Thanks :)

Lol, now I’m tempted to try and reinstall this …

Hi Schmunk,

Here’s a post that I though might be interesting and a good addition IF i understand you code properly :)

Or does phundament already donsomething similar?

Hi SapporoGuy,

thanks for the link, as far as I understand it yet and I also totally agree with mindplay, this should be possible.

If you have the global event system set up as a component or module you could simply define it as a dependency in a module using it. So you would ensure your code is completely working and modular.

Is there an existing Yii Extension providing this functionality? I would be happy to integrate it into Phundament.

Best regards,

schmunk

Hi!

Pm’d mindplay and he said that he never really got to work like he planned. There is a thread befe on what he did.

There isn’t anything publicly available as I know. :(

Noticed an error:

The bootstrap hero widget is missing. Do I needed to do load it or something?

It was missing in a version I once added to Phundament, but it should be fixed in the latest composer version, which is the most recent at the moment.

You can simply replace the yii-bootstrap components with a newer version.

Hi!

Started a fresh install:

did: php composer.phar update

then said yes to create app

site comes up but when I go to login I get:


CException


Alias "ext.mishamx.yii-user.UserModule" is invalid. Make sure it points to an existing PHP file.


/Users/USR2/Sites/phundament2/protected/extensions/yii/framework/YiiBase.php(318)


306         if($isClass && (class_exists($className,false) || interface_exists($className,false)))

307             return self::$_imports[$alias]=$className;

308 

309         if(($path=self::getPathOfAlias($alias))!==false)

310         {

311             if($isClass)

312             {

313                 if($forceInclude)

314                 {

315                     if(is_file($path.'.php'))

316                         require($path.'.php');

317                     else

318                         throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file.',array('{alias}'=>$alias)));

319                     self::$_imports[$alias]=$className;

320                 }

321                 else

322                     self::$classMap[$className]=$path.'.php';

323                 return $className;

324             }

325             else  // a directory

326             {

327                 if(self::$_includePaths===null)

328                 {

329                     self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));

330                     if(($pos=array_search('.',self::$_includePaths,true))!==false)

Stack Trace

#0	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/YiiBase.php(198): YiiBase::import("ext.mishamx.yii-user.UserModule", true)

#1	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/base/CModule.php(283): YiiBase::createComponent("ext.mishamx.yii-user.UserModule", "user", null, array("activeAfterRegister" => false))

#2	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/web/CWebApplication.php(331): CModule->getModule("user")

#3	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/web/CWebApplication.php(270): CWebApplication->createController("user/login")

#4	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/web/CWebApplication.php(135): CWebApplication->runController("user/login")

#5	

+  /Users/USR2/Sites/phundament2/protected/extensions/yii/framework/base/CApplication.php(162): CWebApplication->processRequest()

#6	

–  /Users/USR2/Sites/phundament2/index.php(13): CApplication->run()

08 defined('YII_DEBUG') or define('YII_DEBUG',true);

09 // specify how many levels of call stack should be shown in each log message

10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

11 

12 require_once($yii);

13 Yii::createWebApplication($config)->run();

2012-04-27 02:07:46 Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 with Suhosin-Patch Yii Framework/1.1.10

Will check this ASAP

I like how you have a simple file that gets everything for you!

Suggestions:

When running the terminal command, I thought it had crashed since it just seemed to sit there for a while. Could you include a message saying something like "checking for dependencies, please wait". Basically a verbose output.

Also, can this be done from the browser?

Do you need any other information to help debug this?

Hi SapporoGuy,

Sorry i’ve been away for a few days.

You may run Composer like this:

php composer.phar -v install

Which should give you more info about what’s going on.

Please check also their website http://getcomposer.org

Best regards,

Schmunk

Ps: got some issues on Windows again, but they will be fixed soon.

ran the command:




phundament2 USR2$ ls

README.md	composer.json	composer.phar	images		index.php	protected	themes

assets		composer.lock	css		index-test.php	install		runtime		yii

USR2:phundament2 USR2$ php composer.phar -v install

Get composer info for phundament/p3extensions (master)

Importing branch master (dev-master)

Get composer info for phundament/p3extensions (porting)

Skipped branch porting, no composer file was found

Get composer info for phundament/p3extensions (webapp-command)

Importing branch webapp-command (dev-webapp-command)

Get composer info for phundament/p3admin (master)   

Importing branch master (dev-master)

Get composer info for phundament/p3media (master)

Importing branch master (dev-master)

Get composer info for phundament/p3widgets (master)

Importing branch master (dev-master)

Get composer info for phundament/p3widgets (translation)

Skipped branch translation, no composer file was found

Get composer info for phundament/p3pages (master)     

Importing branch master (dev-master)

Get composer info for phundament/themes/p3bootstrap (master)

Importing branch master (dev-master)

Get composer info for phundament/gii-template-collection (dev)

Skipped branch dev, no composer file was found

Get composer info for phundament/gii-template-collection (master)

Importing branch master (dev-master)

Get composer info for phundament/gii-template-collection (merge-with-thyseus)

Skipped branch merge-with-thyseus, no composer file was found

Get composer info for phundament/lessii (master)             

Importing branch master (dev-master)

Welcome to Phundament Installation 3 via composer


Installing from lock file

Nothing to install/update

Generating autoload files

USR2:phundament2 USR2$ 



Strange thing is that I do have a working installation but when I install from the composer version login breaks :(

If you get the same error as above, how is the path “ext.mishamx.yii-user” looking like? I found some problem with Windows recently (again :(), but they throw another error.

Try running


php composer.phar -v update

. What’s the output there?

Same output and same error :(

Here’s the path:

/Users/USR2/Sites/phundament2/protected/extensions/mishamx/yii-user/user/UserModule.php

"ext.mishamx.yii"

Do I have to run a db migrate or something?