Exemplo n.º 1
0
	def show_portal(self,user):
		self.redirect("./?order=chat")
		return

		is_iphone=CssDesign.is_iphone(self)
		is_tablet=CssDesign.is_tablet(self)

		show_room=Chat.get_room_object_list()
	
		is_admin=False
		if(OwnerCheck.is_admin(user)):
			is_admin=True

		#user_name=self.get_user_name(user)

		bookmark=None
		if(user):
			bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())

		template_values = {
			'host': "./",
			'is_iphone': is_iphone,
			'is_tablet': is_tablet,
			'bookmark': bookmark,
			'redirect_url': self.request.path,
			'mode': "chat",
			'header_enable': False,
			'room_list': show_room,
			'is_admin':is_admin,
			#'user_name': user_name,
			'is_english':CssDesign.is_english(self)
		}
		path = '/html/portal.html'
		self.response.out.write(template_select.render(path, template_values))
Exemplo n.º 2
0
	def user_get_profile(req,user_id,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(not bookmark):
			return []
		one_dic=ApiObject.create_user_object(req,bookmark)
		one_dic["profile"]=bookmark.profile
		return one_dic
Exemplo n.º 3
0
	def is_following(user,user_id,view_mode):
		if(view_mode):
			if(user):
				my_bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())
				if(my_bookmark):
					if(user_id in my_bookmark.user_list):
						return True
		return False
Exemplo n.º 4
0
 def get_user_name(user):
     if (not user):
         return ""
     user_id = user.user_id()
     bookmark = ApiObject.get_bookmark_of_user_id(user_id)
     if (not bookmark):
         return ""
     return bookmark.name
Exemplo n.º 5
0
	def get_user_name(self,user):
		if(user):
			bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())
		else:
			bookmark=None
		user_name="名無しさん"
		if(bookmark and bookmark.name and bookmark.name!="None"):
			user_name=bookmark.name
		return user_name
Exemplo n.º 6
0
	def user_get_is_submit_moper_exist(req,user_id,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(not bookmark):
			return 0
		if(bookmark.submit_moper_count is None):
			cnt=ApiUser._get_submit_illust_count(user_id,bookmark,BbsConst.ILLUSTMODE_MOPER)
			bookmark.submit_moper_count=cnt
			bookmark.put()
		return bookmark.submit_moper_count
Exemplo n.º 7
0
	def user_get_home_timeline(req,user_id):
		#そのユーザのフォローしているユーザのタイムライン

		bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			return []
		feed_key_list=ApiObject.offset_and_limit(req,bookmark.stack_feed_list)
		feed_list=ApiObject.get_cached_object_list(feed_key_list)
		dic=ApiObject.create_feed_object_list(req,feed_list,feed_key_list)
		return dic
Exemplo n.º 8
0
	def bookmark_get_app_list(req,user_id):
		bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			return []
		dic=[]
		for app_key in bookmark.app_key_list:
			app=db.get(app_key)
			one_dic=ApiObject.create_app_object(req,app)
			dic.append(one_dic)
		return dic
Exemplo n.º 9
0
def new_feed_count(obj):
	#return 1
	if(not obj):
		return 0
	#if(type(obj)==Bookmark):
	#	bookmark=obj
	#else:
	bookmark=ApiObject.get_bookmark_of_user_id(str(obj.user_id()))
	if(not bookmark):
		return 0
	if(not bookmark.new_feed_count):
		return 0
	return bookmark.new_feed_count
Exemplo n.º 10
0
	def bookmark_get_thread_list(req,user_id,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			return []

		thread_key_list=bookmark.thread_key_list
		thread_key_list=ApiObject.offset_and_limit(req,thread_key_list)

		dic=ApiObject.create_thread_object_list(req,thread_key_list,"bookmark")
		ApiBookmark.add_removed_thread_to_dic(req,dic,thread_key_list)

		return dic
Exemplo n.º 11
0
def regulation_check(thread,user):
	adult=_get_adult(thread)
	if(not adult):
		return True
	if(not user):
		return False
	bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())
	if(not bookmark):
		return False
	if(not bookmark.regulation):
		return False
	if(adult & bookmark.regulation):
		return True	#表示
	return False
Exemplo n.º 12
0
	def get(self):
		is_iphone=CssDesign.is_iphone(self)

		page=1
		page_unit=20
		if(self.request.get("page")):
			page=int(self.request.get("page"))
		
		rank=Ranking.get_or_insert(BbsConst.THREAD_RANKING_KEY_NAME)
		ranking_mode=self.request.get("mode")
		
		ranking_id_list=rank.user_id_ranking_list[(page-1)*page_unit:page*page_unit]
		ranking_list=[]
		for user_id in ranking_id_list:
			obj=ApiObject.get_bookmark_of_user_id(user_id)
			if(obj):
				if(obj.disable_rankwatch):
					ranking_list.append(None)
					continue
				obj=ApiObject.create_user_object(self,obj)
				ranking_list.append(obj)

		user = users.get_current_user()
		user_rank=0
		if(user):
			rank=Ranking.get_by_key_name(BbsConst.THREAD_RANKING_KEY_NAME)
			if(rank):
				user_rank=rank.get_user_rank(user.user_id())

		template_values = {
			'host': "./",
			'is_iphone': is_iphone,
			'user': user,
			'user_rank': user_rank,
			'redirect_url': self.request.path,
			'mode': "ranking",
			'header_enable': False,
			'ranking_list': ranking_list,
			'ranking_mode': ranking_mode,
			'page': page,
			'page_unit': page_unit
		}

		path = '/html/portal.html'
		self.response.out.write(template_select.render(path, template_values))
Exemplo n.º 13
0
	def _bookmark_get_bbs_list_core(req,user_id,mute):
		bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			return []
		dic=[]
		if(mute):
			bbs_key_list=bookmark.get_mute_bbs_list()
		else:
			bbs_key_list=bookmark.bbs_key_list
		bbs_list=ApiObject.get_cached_object_list(bbs_key_list)
		for bbs in bbs_list:
			one_dic=ApiObject.create_bbs_object(req,bbs)
			if(one_dic):
				dic.append(one_dic)
		
		ApiBookmark.add_removed_bbs_to_dic(req,dic,bbs_key_list)

		return dic
Exemplo n.º 14
0
	def _get_tweet_list(page):
		cache_id=BbsConst.OBJECT_CACHE_HEADER+BbsConst.OBJECT_TWEET_LIST_HEADER
		if(page==1):
			cache=memcache.get(cache_id)
			if(cache):
				return cache

		first_page_show_n=10

		if(page==1):
			unit=50	#非表示ユーザもいるので多めにとってくる
			offset=0
		else:
			unit=50
			offset=unit*(page-2)+first_page_show_n

		query=db.Query(StackFeedData,keys_only=False).filter("feed_mode = ","message").order("-create_date")

		try:
			tweet_list=query.fetch(limit=unit,offset=offset)
		except:
			tweet_list=None

		cnt=0

		tweet_list_removed=[]
		for tweet in tweet_list:
			bookmark=ApiObject.get_bookmark_of_user_id(tweet.from_user_id)
			if(bookmark):
				if(not bookmark.disable_global_tweet):
					tweet_list_removed.append(tweet)
					cnt=cnt+1
			if(page==1 and cnt>=first_page_show_n):
				break

		if(page==1):
			memcache.set(cache_id,tweet_list_removed,BbsConst.OBJECT_TWEET_LIST_CACHE_TIME)

		return tweet_list_removed
Exemplo n.º 15
0
	def get_user_list(self):
		try:
			room=ChatRoom.get(self.request.get("key"))#db.get(str(self.request.get("key")))
		except:
			ApiObject.write_json_core(self,{"status":"failed"})
			return

		if(room==None):
			ApiObject.write_json_core(self,{"status":"not_found"})
			return

		dic={}
		for client in room.channel_client_list:
			user_id=client.split("_")[0]
			name="unknown"
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
			if(bookmark):
				name=bookmark.name
			name=str(client.split("_")[2]).replace("-","%")
			name=urllib.unquote_plus(name)
			dic[client]=name
		
		ApiObject.write_json_core(self,{"status":"success","user_list":dic});
Exemplo n.º 16
0
	def get(self):
		user_id=self.request.get("key")

		bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			self.redirect(str("/static_files/empty_user.png"));
			return
		
		size="big"
		if(self.request.get("size") and self.request.get("size")=="mini"):
			size="mini"
		
		if(not bookmark.icon):
			white_png=db.Blob(base64.b64decode("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP4/x8AAwAB/2+Bq7YAAAAASUVORK5CYII="))
			bookmark.icon=white_png
			bookmark.icon_mini=white_png
			bookmark.icon_content_type="image/png"
			bookmark.icon_mini_content_type="image/png"

		if(bookmark.icon):
			ImageFile.serve_icon(self,bookmark,user_id,size)
		else:
			self.redirect(str("/static_files/empty_user.png"));
Exemplo n.º 17
0
 def get_ranking(req):
     app_key = req.request.get("app_key")
     data_key = req.request.get("data_key")
     order = req.request.get("order")
     query = ApiPerpetuationData.all()
     query.filter("app_key =", db.get(app_key))
     query.filter("data_key =", data_key)
     if order == "ascending":
         query.order("int_data")
         query.filter("int_data !=", 0)
     else:
         query.order("-int_data")
     data_list = query.fetch(limit=10, offset=0)
     dic = []
     for data in data_list:
         one_user = data.user_id
         bookmark = ApiObject.get_bookmark_of_user_id(one_user)
         if bookmark:
             one_dic = ApiObject.create_user_object(req, bookmark)
             one_dic["text_data"] = data.text_data
             one_dic["int_data"] = data.int_data
             dic.append(one_dic)
     dic = {"status": "success", "message": "", "response": dic}
     return dic
Exemplo n.º 18
0
	def add_new_app(main,user):
		app=AppCode()
		app.user_id=user.user_id()
		author="none"
		bookmark=ApiObject.get_bookmark_of_user_id(app.user_id)
		if(bookmark and bookmark.name):
			author=bookmark.name
		app.author=author
		app.js_code=""
		app.css_code=""
		app.app_name=main.request.get("app_name")
		app.app_id=main.request.get("app_id")
		app.mode=int(main.request.get("mode"))
		app.plugin_args=""
		app.app_guide=""
		app.is_public=0
		app.create_date=datetime.datetime.today()
		if(not DevPortal.check_id_available(main,app.app_id)):
			return
		if(app.app_name==""):
			main.response.out.write(Alert.alert_msg("アプリ名は必須です。",main.request.host))
			return False
		app.put()
		return True
Exemplo n.º 19
0
	def user_get_follow(req,user_id,fast,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(not bookmark):
			return []
		return ApiUser.user_list_to_user_object_list(req,bookmark.user_list,fast)
Exemplo n.º 20
0
	def user_get_user(req,user_id,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(not bookmark):
			return []
		return ApiObject.create_user_object(req,bookmark)
Exemplo n.º 21
0
def user_id_to_user_name(user_id):
	bookmark=ApiObject.get_bookmark_of_user_id(user_id)
	if(bookmark):
		return bookmark.name
	return "未登録"
Exemplo n.º 22
0
	def get(self,regist_mode):
		SetUtf8.set()

		#表示モードかどうか
		view_mode=None
		if(self.request.get("user")):
			view_mode=self.request.get("user")
		
		#ユーザ検索
		if(self.request.get("user_id")):
			target_bookmark=ApiObject.get_bookmark_of_user_id(self.request.get("user_id"))
			if(target_bookmark==None):
				Alert.alert_msg_with_write(self,"ユーザが見つかりません。")
				return
			view_mode=str(target_bookmark.key());
		
		#リダイレクトURL
		host=MappingId.mapping_host_with_scheme(self.request)+"/";
		redirect_url=host+"mypage";
	
		#編集モードか
		edit_mode=0
		if(self.request.get("edit")):
			edit_mode=int(self.request.get("edit"))
	
		#掲示板一覧
		user = users.get_current_user()
		favorite=""
		bookmark=None

		#管理人かどうか
		is_admin=0
		if(OwnerCheck.is_admin(user)):# and self.request.get("is_admin")):
			is_admin=1

		#自分だったらビューモードにしない
		if(user and self.request.get("user_id")==user.user_id() and not self.request.get("withdraw")):
			view_mode=0
		
		#ログインしているか
		login_flag=0
		if(user):
			login_flag=1

		#表示設定
		if(view_mode):
			bookmark=db.get(view_mode)
		else:
			if user:
				bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())
			else:
				bookmark=None

		#掲示板の新規作成が完了したか
		regist_finish=False
		if(regist_mode=="regist"):
			regist_finish=True
		
		#プロフィールを編集
		edit_profile=Pinterest.get_profile_for_edit(bookmark,view_mode)
		
		#アカウントの凍結
		if(self.request.get("freez") and is_admin):
			bookmark=ApiObject.get_bookmark_of_user_id_for_write(self.request.get("user_id"))
			bookmark.frozen=int(self.request.get("freez"))
			bookmark.put()
		
		#退会
		if(self.request.get("withdraw") and self.request.get("withdraw")=="go"):
			if(not bookmark):
				Alert.alert_msg_with_write(self,"ユーザ情報は未登録です。");
				return
			your_bbs_count=Bbs.all().filter("del_flag =",0).filter("user_id =",bookmark.user_id).count()
			if(self.withdraw(bookmark,your_bbs_count)):
				return;

		#リダイレクト
		if(BbsConst.PINTEREST_MODE):
			if((user and OwnerCheck.is_admin(user)) or BbsConst.PINTEREST_MODE==2):
				if(regist_finish):
					return Pinterest.get_core(self,Pinterest.PAGE_MODE_REGIST)
				else:
					return Pinterest.get_core(self,Pinterest.PAGE_MODE_MYPAGE)
Exemplo n.º 23
0
	def bookmark_get_is_bookmark_thread_exist(req,user_id,bookmark=None):
		if(not bookmark):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)
		if(bookmark==None):
			return 0
		return len(bookmark.thread_key_list)
Exemplo n.º 24
0
	def _user_page(self,user,user_id,page,request_page_mode,redirect_api,contents_only):
		illust_enable=False
		submit_illust_exist=True
		submit_moper_exist=True
		bookmark_illust_exist=True
		thread_list=None

		#プロフィール
		bookmark=None
		if(user_id):
			bookmark=ApiObject.get_bookmark_of_user_id(user_id)

		#イラストの存在を検出
		submit_illust_count=ApiUser.user_get_is_submit_thread_exist(self,user_id,bookmark)
		submit_moper_count=ApiUser.user_get_is_submit_moper_exist(self,user_id,bookmark)
		bookmark_illust_count=ApiBookmark.bookmark_get_is_bookmark_thread_exist(self,user_id,bookmark)
		if(bookmark_illust_count==0):
			bookmark_illust_exist=False
		if(submit_illust_count==0):
			submit_illust_exist=False
		if(submit_moper_count==0):
			submit_moper_exist=False

		#マイユーザか
		view_mode=1
		if(user):
			if(user_id==user.user_id()):
				view_mode=0

		#管理モード
		if(self.request.get("admin")):
			if(OwnerCheck.is_admin(user)):
				view_mode=0

		#タブ
		tab=Pinterest._decide_default_tab(self,bookmark_illust_exist,submit_illust_exist,submit_moper_exist,view_mode,bookmark,user,request_page_mode)

		#フィード数の消化
		new_feed_count=Pinterest._get_new_feed_count(user,view_mode,bookmark)
		new_my_feed_count=Pinterest._get_new_my_feed_count(user,view_mode,bookmark)
		if(tab=="feed"):
			bookmark=Pinterest._consume_feed(user,view_mode,bookmark)

		#プロフィールを編集
		edit_profile=Pinterest.get_profile_for_edit(bookmark,view_mode)

		#編集モードかどうか
		edit_mode=0
		if(self.request.get("edit")):
			edit_mode=int(self.request.get("edit"))

		bookmark_bbs_list=None
		rental_bbs_list=None
		bookmark_mute_bbs_list=None
		if(tab=="bbs"):
			thread_list=None
			illust_enable=False
			bookmark_bbs_list=ApiBookmark.bookmark_get_bbs_list(self,user_id)
			bookmark_mute_bbs_list=ApiBookmark.bookmark_get_mute_bbs_list(self,user_id)
			rental_bbs_list=ApiUser.user_get_bbs_list(self,user_id)
		
		timeline=None
		timeline_unit=0
		use_masonry=True
		is_timeline_enable=0
		infinite_scroll_selecter=".item"
		if(tab=="feed" or tab=="timeline"):
			thread_list=None
			is_timeline_enable=1
			illust_enable=False
			if(tab=="feed" and not view_mode):
				timeline=ApiUser.user_get_home_timeline(self,user_id)
			else:
				timeline=ApiUser.user_get_timeline(self,user_id)
			timeline_unit=len(timeline)
			use_masonry=False
			infinite_scroll_selecter=".feed"
	
		only_one_page=False
		if(tab=="bookmark"):
			thread_list=ApiBookmark.bookmark_get_thread_list(self,user_id,bookmark)
			if(bookmark_illust_count<=BbsConst.PINTEREST_MYPAGE_PAGE_UNIT):
				only_one_page=True
	
		if(tab=="submit" or tab=="moper"):
			#イラストが消去されている場合を考慮してスレッドが見つかるまでページを進める
			if(tab=="submit"):
				max_page_src=submit_illust_count
			else:
				max_page_src=submit_moper_count
			max_page=(max_page_src+BbsConst.PINTEREST_MYPAGE_PAGE_UNIT-1)/BbsConst.PINTEREST_MYPAGE_PAGE_UNIT
			thread_list=[]

			original_page=page
			while(page<=max_page):
				limit=BbsConst.PINTEREST_MYPAGE_PAGE_UNIT
				offset=limit*(page-1)
				illust_mode=BbsConst.ILLUSTMODE_ILLUST
				if(tab=="moper"):
					illust_mode=BbsConst.ILLUSTMODE_MOPER
				thread_list=ApiUser.user_get_thread_list_core(self,user_id,offset,limit,illust_mode)
				if(len(thread_list)>=1):
					break
				page=page+1

			if(max_page<=1):
				only_one_page=True

			submit_illust_list=thread_list

			if(len(thread_list)==0 and original_page==1):
				ApiUser.invalidate_thread_count(user_id)	#削除した場合に0になったことを考慮
			
		page_mode="user"
		view_user=ApiUser.user_get_user(self,user_id,bookmark)
		view_user_profile=ApiUser.user_get_profile(self,user_id,bookmark)
		tag_list=None

		next_query="user_id="+user_id+"&amp;tab="+tab+"&amp;edit="+str(edit_mode)
		if(only_one_page):
			next_query=None
		
		only_icon=True
		if(edit_mode):
			only_icon=False

		follow=ApiUser.user_get_follow(self,user_id,only_icon,bookmark)
		follower=ApiUser.user_get_follower(self,user_id,only_icon)
		following=Pinterest.is_following(user,user_id,view_mode)
		age=Pinterest.get_age(bookmark)

		mute_user_list=[]
		mute_bbs_list=[]
		if(bookmark):
			mute_user_list=bookmark.get_mute_user_list()
			mute_bbs_list=bookmark.get_mute_bbs_list()

		#詳細情報の存在
		detail_exist=False
		if(bookmark):
			if(bookmark.sex or age):
				detail_exist=True
			if(bookmark.birthday_month or bookmark.birthday_day or bookmark.birthday_year):
				detail_exist=True
			if(bookmark.homepage or bookmark.mail or bookmark.twitter_id):
				detail_exist=True

		#凍結
		if(bookmark and bookmark.frozen):
			thread_list=None

		#アイコンの規約違反
		violate_icon=False
		if(bookmark):
			if(bookmark.thumbnail_created==2):
				violate_icon=True

		is_flat=True
		is_english=CssDesign.is_english(self)

		template_values = {
			'user': user,
			'thread_list': thread_list,
			'redirect_url': self.request.path,
			'page': page,
			'next_page': page+1,
			'next_query': next_query,
			'page_mode': page_mode,
			'tag': None,
			'view_user': view_user,
			'view_user_profile': view_user_profile,
			'user_id': user_id,
			'follow': follow,
			'follower': follower,
			'muting': mute_user_list,
			'mute_user_list': mute_user_list,
			'mute_bbs_list': mute_bbs_list,
			'view_mode': view_mode,
			'edit_mode': edit_mode,
			'tab': tab,
			'bookmark': bookmark,
			'is_timeline_enable': is_timeline_enable,
			'following':following,
			'bookmark_bbs_list': bookmark_bbs_list,
			'bookmark_mute_bbs_list': bookmark_mute_bbs_list,
			'rental_bbs_list': rental_bbs_list,
			'illust_enable': illust_enable,
			'edit_profile': edit_profile,
			'redirect_url': self.request.path,
			'new_feed_count': new_feed_count,
			'new_my_feed_count': new_my_feed_count,
			'submit_illust_exist': submit_illust_exist,
			'submit_moper_exist': submit_moper_exist,
			'bookmark_illust_exist': bookmark_illust_exist,
			'regist_finish': (request_page_mode==Pinterest.PAGE_MODE_REGIST),
			'redirect_api': redirect_api,
			'age': age,
			'contents_only': contents_only,
			'search': None,
			'top_page': False,
			'detail_exist': detail_exist,
			'is_admin': OwnerCheck.is_admin(user),
			'use_masonry': use_masonry,
			'timeline': timeline,
			'timeline_unit': timeline_unit,
			'infinite_scroll_selecter': infinite_scroll_selecter,
			'flat_ui': is_flat,
			'violate_icon': violate_icon,
			'is_english': is_english
		}
		Pinterest._render_page(self,template_values)
Exemplo n.º 25
0
	def _index(self,user,user_id,page,request_page_mode,redirect_api,contents_only):
		unit=BbsConst.PINTEREST_PAGE_UNIT

		order="new"
		if(self.request.get("order")):
			order=self.request.get("order")

		month_query=""
		if(self.request.get("query")):
			month_query=self.request.get("query")

		search_api="search_tag"
		ranking_month_list=[]
		search_api_error=False

		if(order=="monthly"):
			if(month_query):
				today=datetime.datetime.strptime(month_query,"%Y-%m-%d")
			else:
				today=datetime.date.today()

			ranking_month_list=Pinterest._get_ranking_month_list(today,CssDesign.is_english(self))
			thread_list=ApiFeed.feed_get_ranking_thread_list(month_query,page,unit)

			if(thread_list!=None):
				thread_list=ApiObject.create_thread_object_list(self,thread_list,"search")
				search_api_error=False
			else:
				search_api_error=True
		else:
			if(order=="lecture"):
				search_str="tag = 講座 OR category = 講座"
				no_reduct=False	#日付における重み付けを外すか
				thread_list=SearchThread.search(search_str,page,unit,BbsConst.SEARCH_THREAD_INDEX_NAME,no_reduct)
				if(thread_list!=None):
					thread_list=ApiObject.create_thread_object_list(self,thread_list,"search")
					search_api_error=False
				else:
					search_api_error=True
			else:
				if(order=="chat"):
					thread_list=None
				else:
					thread_list=ApiFeed.feed_get_thread_list(self,order,(page-1)*unit,unit)
		
		bbs_list=None
		if(order=="hot" and not contents_only):
			bbs_list=ApiFeed.feed_get_bbs_list(self,"hot",0,8)

		recent_tag=None
		if(order=="hot" and not contents_only):
			recent_tag=SearchTag.get_recent_tag(search_api)

		my_color_bookmark=None
		if(user):
			my_color_bookmark=ApiObject.get_bookmark_of_user_id(user.user_id())

		mute_bbs_list=[]
		mute_user_list=[]
		if(my_color_bookmark):
			mute_bbs_list=my_color_bookmark.get_mute_bbs_list()
			mute_user_list=my_color_bookmark.get_mute_user_list()

		template_values=Pinterest.initialize_template_value(self,user,user_id,page,request_page_mode,redirect_api,contents_only)
		template_values['thread_list']=thread_list
		template_values['next_query']="order="+order+"&amp;query="+month_query
		template_values['tag_list']=recent_tag
		template_values['top_page']=True
		template_values['order']=order
		template_values['page_mode']="index"
		template_values['illust_enable']=True
		template_values['bbs_list']=bbs_list
		template_values['ranking_month_list']=ranking_month_list
		template_values['month_query']=month_query
		template_values['search_api_error']=search_api_error

		template_values['bookmark']=my_color_bookmark
		template_values['mute_bbs_list']=mute_bbs_list
		template_values['mute_user_list']=mute_user_list

		Pinterest._update_event_list(self,template_values,order,contents_only)
		Pinterest._update_room_list(self,template_values,order,contents_only)
		Pinterest._update_tweet_list(self,template_values,order,contents_only)
		
		template_values['is_admin']=OwnerCheck.is_admin(user)

		Pinterest._render_page(self,template_values)