Wiki内検索
ASKS メニュー
タグ
最近更新したページ
最新コメント
EntryLite by kitchenstude
EntryLite by sunhomeengla
MenuBar1 by Wendy
EntryLite by american casino
EntryLite by american casino
EntryLite by american casino
EntryLite by american casino
EntryLite by american casino
EntryLite by american casino
EntryLite by american casino

Page

元ページ
http://www.livejournal.com/doc/s2/core1.class.Page...

戻る

Page クラス

Page クラス
全てのビューの基本となるテンプレート

Base template for all views

継承クラス

子クラス
MonthPage?, EntryPage?, RecentPage?, DayPage?, ReplyPage?, YearPage?.

メンバ


string{} args

(Read-only) URL の ? 以降に続く引数(query string)。S2 コードはピリオドで始まる引数にだけアクセスすることが出来る。また、このピリオドはハッシュキーの中には含まれない。

(Read-only) Arguments from the URL's query string (after the question mark). S2 code can only access arguments starting with a period, and this period is not included in the hash key.

string base_url

(Read-only) 表示するジャーナルのベース URL。

(Read-only) The base URL of the journal being viewed.

string global_subtitle

(Read-only) ユーザによって設定されたジャーナル全体のサブタイトル。

(Read-only) A sub-title selected by the user for their whole journal.

string global_title

(Read-only) ユーザによって設定されたジャーナル全体のタイトル。

(Read-only) A title selected by the user for their whole journal.

string head_content

(Read-only) サーバに寄り供給され出力される HTML ドキュメントの <head> セクションの中の拡張タグ。HTML を出力するのなら <head> セクションに head_content を含むべきです。

(Read-only) Extra tags supplied by the server to go in the <head> section of the output HTML document. Layouts should include this in the head section if they are writing HTML.

User journal

誰のジャーナルが見られているのか?

User whose journal is being viewed

string journal_type

(Read-only) ジャーナルタイプ 例)'P' (personal), 'C' (community), etc.

(Read-only) Journal type, ex: 'P' (personal), 'C' (community), etc.

string stylesheet_url

(Read-only) サーバにより供給され link エレメントに使われる外部スタイルシートの URL。

(Read-only) The URL to use in a link element for the server-supported external stylesheet to put stuff in it

string view

(Read-only) ビュータイプ (recent, friends, archive, month, day, entry)

(Read-only) The view type (recent, friends, archive, month, day, entry)

string{} view_url

(Read-only) ID にリンクを張ることに等しいトップレベルビューへのリンク。
意訳)トップレベルビュー(例:http://hiro.asks.jp/)へのリンク。

(Read-only) Links to top-level views where id equals the name of the view being linked to. (if one of views == $.view, already looking at that view)


string[] views_order

(Read-only) ビューオーダーに使用できるビュー識別子の配列。

(Read-only) An array of view identifiers which can be used to order the views hash.

メソッド


get_latest_month() : YearMonth?

ページがミニカレンダーか同様の機能を提供することが出来るように、最後にユーザが投稿した月についての情報を返す(もし投稿が無いのであれば現在の月を返す)。

Returns information about the latest month the user posted (or the current month, if no posts), so that the page may include a mini-calendar or similar features.

print() : void

システム(LiveJounal)からコールされるメインエントリポイント。(意訳) 全てのビュータイプに同じ HTML を生成するためにこの関数はオーバーライドされるべきです。また、$this->title, $this->head, $this->body をテンプレートに使用して下さい。

The main entry point that LiveJournal calls. Layouts should override this to create HTML that's the same for all view types, and use $this->title, $this->head and $this->body to include view-specific content into the template.

print_body() : void

Page.print() から、ビュー固有の描画をするために呼ばれる。例えば、ジャーナルエントリーの最近投稿だとか、最近の友人の投稿とか、ユーザ情報行?だとか。

Call from Page.print() to render parts of the view that are specific to the view, eg print the recent set of journal entries, recent friends entries, or rows of user information

print_entry(Entry? e) : void

ジャーナルエントリーを出力する。レイアウトはエントリーの表示形式を変更するためにこの関数と、RecentPage?FriendsPage?DayPage? に継承されて同関数をオーバーライドしなければならない。

Output a journal entry. Layouts should override this and the inherited versions in RecentPage, FriendsPage and DayPage to change how entries display.

print_entry_poster(Entry? e) : void

誰がエントリーを投稿したかをテキスト行で出力する。("ユーザ"か"誰かのジャーナルに投稿したユーザ"?)

Output a line of text which says who posted an entry (just "user", or "user posting in somejournal")

title() : string

Page.global_titlePage.view_title() の組み合わせを返す。
レイアウトレイヤーでオーバーライドされるか、コアレイヤーで扱うためにそのまま残されるかもしれません。

Return a relevant combination of Page.global_title and Page.view_title(). May be overridden in layout layers or left untouched for the core layer to handle.

view_title() : string

フレンドビューの "Friend's Resent Entries" とか、ディビューの日付の様に、特定のページのタイトルを返す。i18n(国際化)レイヤーにおいてオーバーライドした方がよいでしょう。レイアウトレイヤーではオーバーライドしない方が理想的です。参照:Page.title()

Return a title for this particular page, such as "Friends' Recent Entries" for the friends view, or a date for the day view. Should be overridden in i18n layers. Ideally, layout layers should never override this. See Page.title().

visible_tag_list() : TagDetail[]

(マニュアル未収録関数) TagDetail の配列を返します。また、返されるタグは公開レベルに合わせて選択されます。例えば、友人まで公開のジャーナルのみ"秘密"というタグを使用した場合、友人以外の人がサイトを見ているときは"秘密"タグは返却される配列の中に出現しません。
注意)返却される TagDetail 配列の中には、TagDetail.use_count = 0 のモノも含まれます。削除された日記や、修正されたタグの残骸が残っているためだと思われます。
2006年09月13日(水) 22:26:01 Modified by gay_shinshi




スマートフォン版で見る