Yii Framework Forum: [ASK] Sidebar portlets tidak muncul - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[ASK] Sidebar portlets tidak muncul Rate Topic: -----

#1 User is offline   loper_kesasar 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 104
  • Joined: 31-March 11

Posted 24 April 2011 - 10:04 AM

minta tolong para sesepuh senior,,,
saya lagi ikutin tutorial bikin blog pake Yii,,
nah saya lagi sampai bagian bikin Portlets user menu,,munculin sidebar usere maenu,,,tapi kok setelah login tetep g muncul ya sidebar nya?(udah copas dari demo blog juga g bisa :( )
terus
setiap buka index/?p=post selalu muncul fatal error ttg Status_Approved comment(Fatal error: Undefined class constant 'STATUS_APPROVED' in C:\xampp\htdocs\blog3\protected\models\Post.php on line 71) apakah emang comment::Status_approved di dalam tutorial belum dijelaskan di bagian managing comment dan managing post?

Terimakasih sebelumnya dan mohon bantuan
0

#2 User is offline   junxiong 

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

Posted 25 April 2011 - 02:07 AM

mungkin bisa dicek coding di dalam file /blog/protected/views/layouts/column2.php nya?
codingnya begini bukan?
<div id="sidebar">
<?php if(!Yii::app()->user->isGuest) $this->widget(’UserMenu’); ?>
</div>

Kalau coding sudah benar tetapi tetap tidak muncul coba posting isi coding yang ada di
/blog/protected/components/UserMenu.php
dan
/blog/protected/components/views/userMenu.php


untuk masalah fatal error yang status approved, ditambah coding di bagian
/blog/protected/models/Comment.php
tambah coding :
	const STATUS_PENDING=1;
	const STATUS_APPROVED=2;

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


Page 1 of 1
  • 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