[MODULE] phundament 2

That’s a CSS issue, if you want to have shadows for IE and Opera you’ll have to implement them on your own.

I also got some tables (project: ZA) in a separate database, what I did was create a file called yiicBuildZa.php, with this content:




defined('DS') or define('DS',DIRECTORY_SEPARATOR);

$basePath = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..');


return CMap::mergeArray(

    require(dirname(__FILE__).DS.'local.php'),

    array(


    'components'=>array(

        'db'=>array(

            'connectionString' => 'mysql:dbname=za;host=localhost',

            'username' => 'hk2010',

            'password' => 'bqAAeJ2hsCmZR6cH',

            'enableParamLogging' => true,

            ),

        )

    )

);



When I create models or crud for this db, I call


./yiic install config/yiicBuildZa.php

Which sets my default db connection (yiic works only with this one?) to the ZA-tables.

But just for yiic in the build process!

Good to hear that :)

Take a look at:

./modules/p2/components/views/p2Menu.php

This is the view for the admin menu (./modules/p2/components/P2Menu.php)

It renders a table as horizontal menu, and separate DIVs for every submenu you have, that’s the reason it’s a bit tricky to use with P2Page.

All items define their submenus by adding {menu: ‘menuName’} to the class attribute.

For more information, take a look here:


Also would be nice to have Flash on the clicked links of main menu(like when clicking on Login)

made a note: https://sourceforge.net/apps/trac/phundament/ticket/22

Very nice to hear that!! I’m starting my new project and also phundament testing on this release ;) I’ll inform you with all the results ;)

First of it: WAMP under Windows displays plain Install screen(CSS error, like one couple weeks ago :) )

What’s good to this project - it’s growing rapidly as Yii itself, that is what it keeps high!

Cheers!

CoLT

P2(I believe term Pii is no longer used?) is installing on Windows fine ;) But using Windows XAMPP it also shows plain Install screen.

Oh I get it when I need to use another DB ;-), but the problem occurs when trying to model any of main DB tables(also does not work with p2)


# yiic shell

Yii Interactive Tool v1.1 (based on Yii v1.1.1)

Please type 'help' for help. Type 'exit' to quit.

>> model Client


Fatal error: Call to a member function getDb() on a non-object in C:\xampp\htdocs\ssispii\lib\yii\cli\commands\shell\ModelCommand.php on line 260

Use


yiic shell config/local.php

if you’ve followed the installation instructions, you’ve edited only this file (DB config), while config/main.php remains untouched.

Or edit config/main.php

Oh yeah really;-) It should be pointed out somewhere in the docs ;)

Now it’s ok.

But how do you implement Yiic Model/Crud/etc. in web app with P2? By hand?

Because after I model client, crud client, I access it by:

  1. http://localhost/ssispii/www/client (looks really ugly without CSS and P2 interface:D )

And it does not show local characters in DB(also after using UTF-8 in local.php).

Shows "KregždytÄ—" instead of "Kregždytė"

  1. http://localhost/ssispii/www/client/admin does not perform ajax search, gives blank screen.

I believe it’s wise to exploit all Yii potential and work of auto CRUD :wink:

What’s simple is genius.

You can create P2 CRUDs with:




./yiic p2 config/local.php

>> p2crud ModelClass



I create model classes with yiic shell.

P2 CRUDs include the P2CrudActionBar by default.

And create some special inputs and outputs:

  • Relation dropdowns (testing)

  • A text-field which name contains ‘html’ will be a ckeditor

  • A field which name contains ‘p2File’ will be a file autocomplete (input) or display an P2File::image() (output)

  • A date-field becomes a datepicker

But you may create your own CRUD templates from ./modules/p2/commands/p2/P2CrudCommand.php ;)

See also ./modules/p2/views/shell

That’s one of yii’s coolest features, but I haven’t checked out FormBuilder yet, which looks also very cool.

Best regards,

schmunk


And it does not show local characters in DB(also after using UTF-8 in local.php).

Hmmm, sounds like an encoding issue, but if you have tried setting ‘charset’, I do not know …?

Wow that’s nice! B)

I will test all those nice P2 implementations soon :D

Thanks for rapid updates and fast growing CMS ;)

CoLT

I’ll try to crud with your crud tool and see what I can do ;) Played a lot with Yii previously on i18n display ;)

By the way, have you seen any thing like that? http://www.yiiframework.com/forum/index.php?/topic/8276-boolean-preview/

Thanks

CoLT

Some bugs :)

1.(b5) After using Forgot Password in English language USER_PROBLEMS message is shown instead of "Still problems?! Please contact us by or by our contact page or by e-mail. " :)

2.(b5) When logged on as ‘editor’ admin menu Log is shown as active, but access is not granted to this user ;)

3.(b5) When calling import file from admin menu:


PHP Error

Description


scandir(C:\xampp\htdocs\ssispii\data/import) [<a href='function.scandir'>function.scandir</a>]: failed to open dir: No such file or directory

Source File


C:\xampp\htdocs\ssispii\modules\p2\controllers\P2FileController.php(157)


00145:         } else {

00146:             $data['files'] = array();

00147:             

00148:             foreach($paths AS $path){

00149:                 $data['directories'] = CMap::mergeArray($data['directories'], $this->getDirectories(Yii::app()->basePath.DS.$path));

00150:             }

00151:             $this->render('import', $data);

00152:         }

00153:         #$this->render('import');

00154:     }

00155: 

00156:     private function getDirectories($directory, $list = array()){

00157: foreach(scandir($directory) AS $file){

00158:                 $path = $directory.DS.$file;

00159: #            echo dirname($directory).DS.$file;

00160:             if(!is_dir($path)) continue;

00161:             if(substr($file,0,1) == ".") continue;

00162:             $list[$path] = str_replace(Yii::app()->basePath,"",$path);

00163:             $list = array_merge($list, $this->getDirectories($path, $list));

00164: #            $list = array_merge($list, );

00165:         }

00166: #        ksort($list)

00167:         return $list;

00168:     }

00169: 


Stack Trace


#0 C:\xampp\htdocs\ssispii\modules\p2\controllers\P2FileController.php(157): scandir()

#1 C:\xampp\htdocs\ssispii\modules\p2\controllers\P2FileController.php(149): P2FileController->getDirectories()

#2 C:\xampp\htdocs\ssispii\lib\yii\web\actions\CInlineAction.php(32): P2FileController->actionImport()

#3 C:\xampp\htdocs\ssispii\lib\yii\web\CController.php(300): CInlineAction->run()

#4 C:\xampp\htdocs\ssispii\lib\yii\web\filters\CFilterChain.php(129): P2FileController->runAction()

#5 C:\xampp\htdocs\ssispii\lib\yii\web\filters\CFilter.php(41): CFilterChain->run()

#6 C:\xampp\htdocs\ssispii\lib\yii\web\CController.php(993): CAccessControlFilter->filter()

#7 C:\xampp\htdocs\ssispii\lib\yii\web\filters\CInlineFilter.php(59): P2FileController->filterAccessControl()

#8 C:\xampp\htdocs\ssispii\lib\yii\web\filters\CFilterChain.php(126): CInlineFilter->filter()

#9 C:\xampp\htdocs\ssispii\lib\yii\web\CController.php(283): CFilterChain->run()

#10 C:\xampp\htdocs\ssispii\lib\yii\web\CController.php(257): P2FileController->runActionWithFilters()

#11 C:\xampp\htdocs\ssispii\lib\yii\web\CWebApplication.php(320): P2FileController->run()

#12 C:\xampp\htdocs\ssispii\lib\yii\web\CWebApplication.php(120): CWebApplication->runController()

#13 C:\xampp\htdocs\ssispii\lib\yii\base\CApplication.php(135): CWebApplication->processRequest()

#14 C:\xampp\htdocs\ssispii\www\index.php(13): CWebApplication->run()


2010-03-30 13:52:01 Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Yii Framework/1.1.1

4.(b5) Quick search on admin panel does not work any more.

5.(b5) P2 Srbac Managing roles and trying to manage Always allowed list, tables are loose and could not be seen ;)

6.(b5) Begin/End Item will not be visible before this date./Item will become invisible after this date. is not working.

CoLT

These are untranslated placeholders, https://sourceforge.net/apps/trac/phundament/ticket/27

You can update them in messages.

A bug :) https://sourceforge.net/apps/trac/phundament/ticket/28

Do you have this directory C:\xampp\htdocs\ssispii\data/import?

Maybe you should update your config, when running on windows …


'p2.file.importPaths' => array('data\import'),

Thanks & sorry, that’s also a bug. https://sourceforge.net/apps/trac/phundament/ticket/30

I have soooo many problems with CAutocomplete :( They also break CJuiDialogs.

Can you explain a bit more? Maybe with a URL, which page/route do you want to access?

Just available for blog postings at the moment … will update the scopes()

https://sourceforge.net/apps/trac/phundament/ticket/31

Thanks a lot for your reports.

Best regards,

schmunk

?1.(b5)(pending) Ok, that’s a small bug ;)

?2.(b5)(pending) Ok, that’s a small bug too ;)

+3.(b5)(solved) Where should I put it?:slight_smile: After creating directory data/import error is away, but no action is getting on ;) New feature so bugs to solve is all ok here :D

-4.(b5)(pending) OK, it was really handy ;)

5.(b5)(pending - srbac layout problem?) Like: http://localhost/ssispii/www/en_us/srbac/authitem/manage (the green button - Edit always allowed list) (picture attached)

6.(b5)(pending) Double checked, does not work with blog too :)

I’m really pleased to help you with this much promising CMS to get it to new stage! :)

CoLT

7.(b5) Am I misunderstanding something but it seems sub-pages is no longer working too:

Site-map:

* Test 123


* CMS


      o Test 123


      o Foo


      o Bar


* Wiki


* Blog

But after entering CMS no sub pages are shown.

8.(b5) Same error on PageRank (Site-map is OK) main menu is not rotating when changing PageRank

Sorry, rather undocumented feature here :)

Put some folders into data/import, like:


data/import/pictures/ <--- add also some files

data/import/pdfs/ <--- add also some files



Then the importer should be able to find the (sub)-folders.

Comments regarding the other points follow …

This import feature works now like a charm! ;) Just needed to create /data/import/pictures (../pdfs etc.) :)

Thanks!

We’ve just generated a lot of bugs/solves/pending solves here, but I have to mention one important P2 weakness here:

Models/Cruds - they are weak in P2 when evaluating with what Yii has now(automatic search, editing buttons, etc.)

In my honourable opinion P2 should use what is already created + that easy CMS system you’ve just created and still creating eagerly!

9.(b5) After “model client” and “crud client” it does everything seemingly fine but I neither can update nor create any records in the table Client (Is this because ID(auto incremented) is added in the crud’s view files)?

10.(b5) A list of bugs related with model/crud of P2:

[list=1]

[*]No error are shown when trying to update/create a record.

[*]Cruded form link ‘Module’ => default/index is 404

[*]Listing items is taking too much user’s screen (compared to Yii)

[*]Add ‘Displaying 1-x of x result(s).’ eg. Displaying 1-5 of 15 result(s)

[*]Add search possibility as in Yii (also advanced one +


You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done. 

)

[*]Add update/view/delete buttons instead of links

[*]To be continued… :)

[/list]

Not to mention the nice ideas you’ve already implemented by adding picker to date fields and etc!

Hope to get b6 soon with these must-be updates to see the first stable P2 release! ;)

CoLT

Couple more minor bugs to be fixed ;)

11.(b5) When in administrator’s panel Cell is in front of new widget:

12.(b5) What new feature 'Pages -> Copy Page’s should do? After copying couple of pages just site-map is updating, but nothing more :)

Thanks for a great growing CMS again (must concentrate to CRUD - it will be competitive edge of p2 too)!

CoLT


11.(b5) When in administrator's panel Cell is in front of new widget:

Which browser is this?


12.(b5) What new feature 'Pages -> Copy Page's should do? After copying couple of pages just site-map is updating, but nothing more 

That’s pretty alpha here.

You can select a page to copy on the left and a parent page on the right.

If you have widgets in the souce page they will be copied to the new page.

If it’s a P2Html widget its content will also be duplicated and linked with the new cell and page.