timeline.php

File structure

This file contains timeline keywords to display various user actions in the timeline feed.

$types = array(
	'picture_ablum_vote' => 'picture_album', // match timeline keyword to the resource keyword
	'picture_album_like' => 'picture_album',
	'picture_comment' => 'picture_album',
	'picture_like' => 'picture',
	'picture_new' => 'picture',
	'picture_vote' => 'picture'
);

Keywords such as "picture_like" or "picture_comment" will be used by the system automatically, other keywords can be used manually by calling related functions.

Timeline keywords are saved into the "timeline_types" table in the database.

Language file

Language file "languages/english.php" will contain code like this:

// contains items for 'actions' in the timeline
$timeline_actions = array(
	'picture_new' => "[name] added [params.count] %pictures%:"
);

// contains items for 'notifications' in the timeline
$timeline_notices = array(
	'picture_ablum_vote' => "%user rated your %album%.",
	'picture_album_like' => "%user liked your %album%.",
	'picture_comment' => "%user commented on your %picture%.",
	'picture_like' => "%user liked your %picture%.",
	'picture_vote' => "%user rated your %picture%."
);