'; else return $content; } add_filter('the_content', 'recommender_content'); function recommender_wp_footer() { global $plugin_path, $user_ID, $id; $account_id = get_option('recommender_account_id'); $ajax_path = get_option('recommender_ajax_path'); $tagline = get_option('recommender_tagline'); $track_logged = get_option('recommender_track_logged'); # track all users that: $track = !is_user_logged_in() || # 1. are not logged in $track_logged || # 2. are logged in and you specified you want to log all users ( # 3. are logged in and: !current_user_can('level_10') && # a) are not administrators, ($user_ID != get_post($id)->post_author) # b) AND are not watching his/her own post ); # only output recommendations to posts and pages if(is_single() || is_page()) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } add_action('wp_footer', 'recommender_wp_footer'); function recommender_restore_or_init_config() { update_option('recommender_account_id', ''); update_option('recommender_secret_key', ''); update_option('recommender_type', 'cb'); update_option('recommender_track_logged', false); update_option('recommender_display_position', 'posts'); update_option('recommender_tagline', 'Related content'); update_option('recommender_list_size', 3); update_option('recommender_display_percentage', 100); update_option('recommender_index_error', ''); $baseurl = parse_url(get_option('home')); $ajaxpath = $baseurl['path'] . '/wp-content/plugins/aliiike-web-recommender-system/ajax_rec.php'; $ajaxpath = str_replace('//', '/', $ajaxpath); update_option('recommender_ajax_path', $ajaxpath); } function config_page() { switch(true) { # user pressed restore built-in defaults button case isset($_POST['restore']): recommender_restore_or_init_config(); break; # user pressed save changes button case isset($_POST['save']): update_option('recommender_account_id', $_POST['account_identifier']); update_option('recommender_secret_key', $_POST['secret_key']); update_option('recommender_type', $_POST['recommender_type']); update_option('recommender_ajax_path', $_POST['ajax_path']); update_option('recommender_display_position', $_POST['display_position']); update_option('recommender_tagline', $_POST['tagline']); update_option('recommender_list_size', $_POST['list_size']); update_option('recommender_display_type', $_POST['display_type']); update_option('recommender_display_percentage', $_POST['display_percentage']); break; # create index (if it does not exist) case isset($_POST['create_index']): if(!recommender_index_exists()) recommender_create_index(); break; } # get all options in variables $account_id = get_option('recommender_account_id'); $secret_key = get_option('recommender_secret_key'); $recommender_type = get_option('recommender_type'); $ajax_path = get_option('recommender_ajax_path'); $display_position = get_option('recommender_display_position'); $tagline = get_option('recommender_tagline'); $list_size = get_option('recommender_list_size'); $display_type = get_option('recommender_display_type'); $display_percentage = get_option('recommender_display_percentage'); $index_error = get_option('recommender_index_error'); # initialize if none initialized if(!$ajax_path && !$display_position && !$tagline && !$list_size) recommender_restore_or_init_config(); # and display form with variable values ?>

Aliiike Recommender Settings

Plugin will not work because there is no required index on the database. You can try to create index by pressing Create Index button.

Recommender type:
Content based recommendations are easier to use, standalone (does not require any extra accounts), and work straight from the start. If post A is similar to post B (i.e., A and B share a lot of words) then post B is being recommended at seeining the post A.

Recommendations based on collaborative filtering normally offer better performance while they require few more steps at installation time. This type takes into account users' browsing behaviours that are logged in the first phase. System then learns from logs what posts (or pages) are being viewed by the same users. This type of recommendations require that you register with aliiike.com and create an account for your site. Then you have to wait until enough visit data is being gathered in the logging process. Only then the system can calculate and serve recommendations.

Suggested scenario is that you use content based type at the beginning and create an aliiike.com account. After enough data is collected, you switch the recommendation type to collaborative filtering, and compare site's performance in both cases using Google Analytics.", 'recommender'); ?>
Tagline:

List size:

Display type:
unordered list.", 'recommender'); ?>
Display Position: /> Posts only
/> Pages only
/> Both
posts only.", 'recommender'); ?>
Display percentage:
100%.", 'recommender'); ?>
Ajax path:
Account identifier:

Secret key:

" type="submit" /> " type="submit"/>