Yii Framework Forum: Bootstrapped Yii blog demo with facebook and persona login - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Bootstrapped Yii blog demo with facebook and persona login Rate Topic: -----

#1 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 07 May 2012 - 04:44 AM

Credits to mauriciorivera for
http://www.yiiframew...rap-yii-webapp/
Which is where I started.

Added:
*Yii blog demo (with all crud operations thrue ajax)
*Simple User management (private messaging,registration,secure password cryptation,facebook login,browserid (aka Mozilla Persona) login,own profile,file library
All bootstrapped.

I would love to add twitter and openid logins if anyone have a working solution I could look at. Haven't managed to get it to work so far:/

Please note,you have to configure facebook in main config and also in main layout, the javascripts and logout link to match your domain (that you have registred on facebook ).

Added extentions:
*XUpload
*eltre (great text editor with elfinder for file management and profile description)
*Yii-facebook-opengraph
Credits to creators.

Download:
From github
https://github.com/S...emo-multi-login

l

Edit* Forgot sql dump http://pastebin.com/3Ub9xAG3
0

#2 User is offline   Pravin Gajera 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 137
  • Joined: 25-October 11
  • Location:India

Posted 07 May 2012 - 05:30 AM

Hi

can you check ?

http://pastebin.com/3Ub9xAG3

Thanks
0

#3 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 07 May 2012 - 05:52 AM

View PostPravin Gajera, on 07 May 2012 - 05:30 AM, said:

Hi

can you check ?

http://pastebin.com/3Ub9xAG3

Thanks

Works for me but here,I attach a file to.
Attached File  testdrive_2012_05_07.zip (2.25K)
Number of downloads: 180
0

#4 User is offline   Pravin Gajera 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 137
  • Joined: 25-October 11
  • Location:India

Posted 07 May 2012 - 06:57 AM

View PostSampa, on 07 May 2012 - 05:52 AM, said:

Works for me but here,I attach a file to.
Attachment testdrive_2012_05_07.zip


Thanks work now
0

#5 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 07 May 2012 - 05:12 PM

it always gives me

The table "{{site_structure}}" for active record class "Cms" cannot be found in the database.

any ideas?
0

#6 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 08 May 2012 - 02:55 AM

View Postjiaming, on 07 May 2012 - 05:12 PM, said:

it always gives me

The table "{{site_structure}}" for active record class "Cms" cannot be found in the database.

any ideas?

Oh god, that was a mega fail by me, I tried a cms yesterday,forgot to remove it when I put the project on github, corrected now,remove all files and get it from github again.
0

#7 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 08 May 2012 - 04:44 AM

Updated post crud actions to http://www.yiiframew...iitemplate/#hh1

So now you can create/view/update/delete/list all posts in only one page.
0

#8 User is offline   mauricioschneider 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 152
  • Joined: 16-August 10
  • Location:Santiago, Chile

Posted 08 May 2012 - 08:38 AM

Great work buddy, will check it out once I have some free time.
0

#9 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 08 May 2012 - 10:21 AM

View PostSampa, on 08 May 2012 - 04:44 AM, said:

Updated post crud actions to http://www.yiiframew...iitemplate/#hh1

So now you can create/view/update/delete/list all posts in only one page.


That is great...
But now it gives me Undefined variable: facebookid.......in layout/main.php...
0

#10 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 08 May 2012 - 06:03 PM

View Postjiaming, on 08 May 2012 - 10:21 AM, said:

That is great...
But now it gives me Undefined variable: facebookid.......in layout/main.php...

that is however very weird.

Are you logged into facebook when u get the error? which row?
0

#11 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 08 May 2012 - 06:52 PM

View PostSampa, on 08 May 2012 - 06:03 PM, said:

that is however very weird.

Are you logged into facebook when u get the error? which row?


no. I get this error after I filled in my Facebook app id and secret key.

.....
0

#12 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 09 May 2012 - 08:08 AM

View Postjiaming, on 08 May 2012 - 06:52 PM, said:

no. I get this error after I filled in my Facebook app id and secret key.

.....

hmm, row 47+48:
if ( Yii::app()->facebook->getUser() == 0){
				$facebookid=false;
			}

change into
$facebookid = true;
if ( Yii::app()->facebook->getUser() == 0){
				$facebookid=false;
			}

0

#13 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 09 May 2012 - 08:47 AM

More improvements done, I had missed some stuff.
0

#14 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 09 May 2012 - 04:59 PM

View PostSampa, on 09 May 2012 - 08:47 AM, said:

More improvements done, I had missed some stuff.


Thank you so much.
Would you please help me with your rating post ?
Thanks you sooooooooooooo much!!!

Your post is always amazing!

http://www.yiiframew...s-on-same-page/

I have 2 questions in your post...
1: about my codes... it's not working...almost same as yours ...always give me some strange errors.

2.About your comment "Note: this is not optimized for performance." why..?

Thanks so much!
0

#15 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 09 May 2012 - 05:09 PM

View PostSampa, on 09 May 2012 - 08:08 AM, said:

hmm, row 47+48:
if ( Yii::app()->facebook->getUser() == 0){
				$facebookid=false;
			}

change into
$facebookid = true;
if ( Yii::app()->facebook->getUser() == 0){
				$facebookid=false;
			}



Which file ......?

Best,
0

#16 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 09 May 2012 - 05:28 PM

"But now it gives me Undefined variable: facebookid.......in layout/main.php... "

Your quote, so its in that file.
0

#17 User is offline   jiaming 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 262
  • Joined: 10-April 12

Posted 09 May 2012 - 05:45 PM

View PostSampa, on 09 May 2012 - 05:28 PM, said:

"But now it gives me Undefined variable: facebookid.......in layout/main.php... "

Your quote, so its in that file.


Thanks....That fixed my problem.

.would you please also look at the post about your rating tutorial....?
http://www.yiiframew...s-on-same-page/


I know you are really busy...

I really appreciate it if you can help me out.
0

#18 User is offline   Rathan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 12-March 12

Posted 18 May 2012 - 06:55 AM

Hi Sampa

i get a 500 internal server exception when i try to run this code ..
can u help me out why??

A newbie.. Rathan Kalluri
0

#19 User is offline   ronyaja 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 02-March 12

Posted 18 June 2012 - 06:38 AM

Thanks for the blog example, it really help me to learn more about yii(especially the ajax crud and xupload). I have installed it, but i have some issues. Some of the features don't work. Here are some of my problems,
  • I try to access actions create from PostController, but it brings me into error page that said The system is unable to find the requested action "create". I look into PostController, and found actionAjax_Create action instead. Does this action has something to do with ajax crud ? But what the problem so that my installation doesn't work?
  • I also try to access FileController, but it doesn't have index view. Is there some things wrong with my installation ?


I'll really appreciate your help, and thanks Sampa for the yii blog example
0

#20 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 18 June 2012 - 09:35 AM

View Postronyaja, on 18 June 2012 - 06:38 AM, said:

Thanks for the blog example, it really help me to learn more about yii(especially the ajax crud and xupload). I have installed it, but i have some issues. Some of the features don't work. Here are some of my problems,
  • I try to access actions create from PostController, but it brings me into error page that said The system is unable to find the requested action "create". I look into PostController, and found actionAjax_Create action instead. Does this action has something to do with ajax crud ? But what the problem so that my installation doesn't work?
  • I also try to access FileController, but it doesn't have index view. Is there some things wrong with my installation ?


I'll really appreciate your help, and thanks Sampa for the yii blog example


The ajax crud means ajax create read update delete, means they are all on the same page.

you reach it by going to /post/admin

FileController is not suppossed to have a index view:) or, rather, I haven't made one.
Since I only use that controller for file uploads, and in my own projects functions related to file handling :)
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • 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