Yii Framework Forum: Yii Playground: collaborative demo app. - Yii Framework Forum

Jump to content

  • (7 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Playground: collaborative demo app. Working code snippets provided by users; join us! Rate Topic: ***** 10 Votes

#61 User is offline   intel352 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 196
  • Joined: 05-February 10
  • Location:Southport, NC

Posted 27 October 2010 - 02:54 PM

The top nav has what would appear to be other areas of the website, but clicking produces nothing in Chrome.
Examples are: General, Extensions
Need live Yii support? - Join the #yii IRC channel on Freenode!
0

#62 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 28 October 2010 - 02:50 AM

Hello,
that are just empty placeholders for now ;)

If someone wants to provide some content for that topics (especially extensions) is welcome :)

bye,
Giovanni.
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
0

#63 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 30 October 2010 - 01:45 AM

I wonder, what we can demo in security
any suggestion?

And about general. What will it be the example? I just haven't got any idea yet~
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#64 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 30 October 2010 - 07:42 AM

Hello,
secure file uploads is a big one :P

CSRF (Cross-site Request Forgery) is another nice topic..


In the meantime I've commited the ExtensionModule with a demo of the JNotify extension, a jQuery plugin I've just provided a Yii Extension for. I hope you'll find it useful ;)


bye,
Giovanni.

p.s.
I can't reach the live demo right now (yiiplayground.cubedwater.com) but I guess it will be back soon ;)
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
0

#65 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 31 October 2010 - 12:45 AM

View PostVirtual DarKness, on 30 October 2010 - 07:42 AM, said:

Hello,
secure file uploads is a big one :P

CSRF (Cross-site Request Forgery) is another nice topic..


In the meantime I've commited the ExtensionModule with a demo of the JNotify extension, a jQuery plugin I've just provided a Yii Extension for. I hope you'll find it useful ;)


bye,
Giovanni.

p.s.
I can't reach the live demo right now (yiiplayground.cubedwater.com) but I guess it will be back soon ;)


Okay then, maybe I'll learn CSRF...
currently I am a little busy, so haven't add anything yet...
Hope can update the playground soon~ :D
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#66 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 09 November 2010 - 08:02 AM

View Postjunxiong, on 31 October 2010 - 12:45 AM, said:

Okay then, maybe I'll learn CSRF...
currently I am a little busy, so haven't add anything yet...
Hope can update the playground soon~ :D


Giovanni, currently I am try to create example for preventing CSRF by enabling enableCsrfValidation
but I don't know how to show the code from /config/development.php (the code need configuration in config)
Must I put it at other place?

Thanks before

Oh ya, I've changed a little components/DBManage.php
I append isset to the $_GET['r'] because sometimes it may be empty which will cause php throw notice.
It won't cause error, but for server like WAMP or other with it's error reporting (E_ALL or E_NOTICE) this will
causing fatal error in Yii....
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#67 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 13 November 2010 - 06:38 AM

View Postjunxiong, on 09 November 2010 - 08:02 AM, said:

Giovanni, currently I am try to create example for preventing CSRF by enabling enableCsrfValidation
but I don't know how to show the code from /config/development.php (the code need configuration in config)


Hello,
sorry for the delay in my answer, heve been busy :P

Anyway you can use the getSnippetFromFile method of SrcCollect.. You can see an example in protected/modules/UiModule/views/ui_other/breadcrumbs.php ;)

View Postjunxiong, on 09 November 2010 - 08:02 AM, said:

Oh ya, I've changed a little components/DBManage.php
I append isset to the $_GET['r'] because sometimes it may be empty which will cause php throw notice.


You're right, thanks for fixing it :)

bye,
Giovanni.
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
0

#68 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 13 November 2010 - 09:13 AM

View PostVirtual DarKness, on 13 November 2010 - 06:38 AM, said:

Hello,
sorry for the delay in my answer, heve been busy :P

Anyway you can use the getSnippetFromFile method of SrcCollect.. You can see an example in protected/modules/UiModule/views/ui_other/breadcrumbs.php ;)



You're right, thanks for fixing it :)

bye,
Giovanni.


Hello Giovanni..
thanks... but after thinking a while, I won't put CSRF demo first.

The CSRF Demo is related to changing application's configuration, which will effect all the demos of the applications. I am afraid by enabling csrf validation might causing other demos not working. So for sometimes being I am not thinking to use this way first (I will try to another way to validate csrf without touching configuration file). Because just now I made CStarRating-with-ajax demo (with CSRF validation activated), and the ajax didn't work because of the validation problem...

Oh yes and by the way, I've added CStarRating! :D
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#69 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 14 November 2010 - 08:41 AM

View Postjunxiong, on 13 November 2010 - 09:13 AM, said:

Because just now I made CStarRating-with-ajax demo (with CSRF validation activated), and the ajax didn't work because of the validation problem...


Hello,
I don't know if this could be related to a framework bug or what, but sounds a bit strange to me.. I think it would be better to manageto activate CSRF globally from config cause this would be the most "real" scenario.. ::) And other examples shouldn't break I guess. Maybe we could open a new topic to ask about this..


View Postjunxiong, on 13 November 2010 - 09:13 AM, said:

Oh yes and by the way, I've added CStarRating! :D


Great! It's available on the live demo now:
http://www.yiiplaygr.../web/starRating

Btw.. I were thinking of moving the "star rating" menu item under the "other" menu, do you think it is a good idea / is it ok for you?

bye,
Giovanni.
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
0

#70 User is offline   diggy 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 112
  • Joined: 18-November 09
  • Location:Ukraine, Khmelnitsky

Posted 14 November 2010 - 05:00 PM

Hi guys,

Sorry for inactivity with playing on playground project :)

Does somebody can suggest an idea for some extension which can be added to playground?

I would like to add extension for elrte text editor.

http://elrte.org/
0

#71 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 14 November 2010 - 07:39 PM

View PostVirtual DarKness, on 14 November 2010 - 08:41 AM, said:

Hello,
I don't know if this could be related to a framework bug or what, but sounds a bit strange to me.. I think it would be better to manageto activate CSRF globally from config cause this would be the most "real" scenario.. ::) And other examples shouldn't break I guess. Maybe we could open a new topic to ask about this..

Think I need to check then, what's wrong with the code.


Quote

Great! It's available on the live demo now:
http://www.yiiplaygr.../web/starRating

Btw.. I were thinking of moving the "star rating" menu item under the "other" menu, do you think it is a good idea / is it ok for you?

bye,
Giovanni.


No problem :)
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#72 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 14 November 2010 - 07:48 PM

View Postdiggy, on 14 November 2010 - 05:00 PM, said:

Hi guys,

Sorry for inactivity with playing on playground project :)

Does somebody can suggest an idea for some extension which can be added to playground?

I would like to add extension for elrte text editor.

http://elrte.org/


I think elRTE is cool...:)
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#73 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 14 November 2010 - 07:53 PM

Giovanni,

Oh yeah, forgotten to ask :P
Do you think I should also move the Star Rating directory to the ui_others ??
Currently it is still in a new directory called "web"
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#74 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 25 November 2010 - 08:56 PM

View Postjunxiong, on 14 November 2010 - 07:53 PM, said:

Giovanni,

Oh yeah, forgotten to ask :P
Do you think I should also move the Star Rating directory to the ui_others ??
Currently it is still in a new directory called "web"


Giovanni,
I've decided it's better to put the CStarRate code in Ui_otherController too...
it has been committed. Tell me if you don't think this is a good way.

Btw, new demo, CTreeView :)
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
1

#75 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 27 November 2010 - 05:05 AM

View Postjunxiong, on 25 November 2010 - 08:56 PM, said:

I've decided it's better to put the CStarRate code in Ui_otherController too...
it has been committed.


I think that this is fine; sorry for the delay of my answer. Anyway I were a bit undecided too but for now I think it is ok in this way; any suggestion is welcome.

View Postjunxiong, on 25 November 2010 - 08:56 PM, said:

Btw, new demo, CTreeView :)


Nice, I've updated the live demo.. that now is based on Yii 1.1.5 :)
http://www.yiiplaygr..._other/treeView


I've also added a new small demo to show how to use the inline calendar:
http://www.yiiplaygr...#inlineCalendar


And I'm working on a "complete" crud demo that uses gridview + jui dialog to edit fields ;)

bye,
Giovanni.
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
1

#76 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 22 December 2010 - 08:51 AM

Giovanni, I begin to wonder how to put new examples in the Interface menu. When one should put the code into the "Other" sub-menu, when should put into the main menu. Currently from what I observe it seems like CJuiXXX is always put on the main Interface menu. I think we must begin to give a clear classification, so to minimize as little as possible the "Other".
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#77 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 22 December 2010 - 09:23 AM

After a long vacuum, at last I've added new simple example, CMenu :P
Hope can post some examples regularly...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#78 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 223
  • Joined: 23-December 08
  • Location:London (UK)

Posted 22 December 2010 - 11:56 AM

View Postjunxiong, on 22 December 2010 - 08:51 AM, said:

I think we must begin to give a clear classification, so to minimize as little as possible the "Other".


Hi,
I agree but I don't know how we could organize it; my subdivision was between primary and secondary interface items.. having the secondary in the "other" menu ::)

Oh, also.. a small note: could you please use tabs instead of spaces to indent? This works better with the syntax highlight plugin. You should be able to set this setting as a per-project preference.


And thanks for the CMenu example, I've updated the live demo!

bye,
Giovanni.
Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

>> My Linkedin Profile
0

#79 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 22 December 2010 - 08:56 PM

View PostVirtual DarKness, on 22 December 2010 - 11:56 AM, said:

Oh, also.. a small note: could you please use tabs instead of spaces to indent? This works better with the syntax highlight plugin. You should be able to set this setting as a per-project preference.


And thanks for the CMenu example, I've updated the live demo!

bye,
Giovanni.


Sure no problem. I've fix the CMenu example to tab instead spaces...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#80 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 540
  • Joined: 21-June 10

Posted 06 January 2011 - 10:27 PM

Hello all,

At last I've successfully activating CSRF in YiiPlayGround without any major problem. Few months ago, I've tried to enabling it but then it made CStarRating ajax post become unrunnable, so I disabled it back.

As long as we stick the way of Yii in creating form (using CHtml::beginForm()) then it will run like usual. The problem is because of the CSRF activated, every form will have a token which will validated on the controller. Since my CStarRating using POST when running Ajax (without putting token) it cannot be run. Now I got the solution by putting it manual in my parameter like this :

$this->widget('CStarRating',array(
    'name'=>'ratingAjax',
    'callback'=>'
        function(){
                $.ajax({
                    type: "POST",
                    url: "'.Yii::app()->createUrl('UiModule/ui_other/starRatingAjax').'",
                    data: "'.Yii::app()->request->csrfTokenName.'='.Yii::app()->request->getCsrfToken().'&rate=" + $(this).val(),
                    success: function(msg){
                                $("#result").html(msg);
                        }})}'
  ));


Hope this is the right approach...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

Share this topic:


  • (7 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • 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