Store
Community Documentation

v3 Knowledgebase

v3.6.0 Beta1 Settings

Not valid for sites running v3.6.0 RC1 or higher

With v3.6.0 Beta1 we included many new options that are currently being tested. Since this version was focused on optimization many of these new options are experimental and may not be part of our final release. Because of this we added these settings to a configuration file instead of our Admin Control Panel. Once we have fully tested each setting they will be moved over to our Admin Control Panel.
This article will guide you on how to edit and manage these settings.

The first step is to copy (do not rename) the file include/setting/3.6.0dev.default.php to include/setting/3.6.0dev.php.

Next, let's open the file include/setting/3.6.0dev.php.

When editing most of the settings the value will either be true or false. Some values will be a number. As an example you will find the setting:
PHP:
$_CONF['friend.cache_is_friend'] = false

You will notice that this feature is set to false, which means its off. Set it to true and you will enable this feature.

Optimization Settings


$_CONF['track.cache_recently_viewed_by_timeout']
Enable this to cache the "Recently Viewed By" block that is on a users profile. Default value is 0 and requires a number greater then 0 to enable it. This setting is in minutes and we recommend setting this to 10.

$_CONF['friend.cache_mutual_friends']
Enable this to cache the "Mutual Friends" block that is on a users profile. Default value is 0 and requires a number greater then 0 to enable it. This setting is in minutes and we recommend setting this to 60.

$_CONF['friend.cache_rand_list_of_friends']
This caches the list of friends that shows up on a users profile. Default value is 60 and this is our recommended setting. This setting is in minutes.

$_CONF['friend.cache_is_friend']
At times we check if 2 users are friends with each other. This requires an additional query to the database. Enable this setting to cache this information.

$_CONF['friend.cache_friend_list']
The user needs to access their list of friends from time to time. On large sites this can cause a strain on the database. Enable this option and we cache this information. It is cleared when the user adds or removes a friend.

$_CONF['event.cache_events_per_user']
When we view a users profile we query the database to find out how many upcoming events a users has. Enable this option to cache this information and have it reset when the user adds or removes an event.

$_CONF['profile.cache_blocks_design']
Users can control the placement of blocks on their profile. This requires an additional query to the database. Enable this option to cache this information and clear it when a user updates their profile.

$_CONF['profile.profile_caches']
When a user visits another users profile we track this information. If you enable this feature it will stop it from doing this, which saves you additional queries to the database and protects the users privacy.

$_CONF['user.cache_featured_users']
When viewing the browse section and if you have featured users on your site there is a block that displays them. This is an additional query to the database. Enable this to cache this information, which will update when you add a new user.

$_CONF['core.include_master_files']
If you have the built-in setting "Cache JavaScript & CSS" enabled and if you enable this feature it will create a separate CSS & JavaScript file for specific files that are loaded on every page. The benefit of this is that it will only load this "master" file once and then load page specific data when browsing other pages.

$_CONF['core.defer_loading_user_images']
If you enable this feature the site will wait to load all of your users images after the site has loaded.

$_CONF['core.defer_loading_images']
If you enable this feature the site will wait to load images from the photo section after the site has loaded.

$_CONF['core.keep_non_square_images']
If you disable this option we will not keep non-square profile images for each user. We do not use the non-square images with our default theme so keeping these images is a waste. This will speed up the process of uploading an image if disabled.

$_CONF['feed.force_ajax_on_load']
If enabled, the activity feed will load after the site has loaded. This will tremendously assist in speeding up the site when it comes to usability.

$_CONF['core.controllers_to_load_delayed']
This requires an array of controllers in order for this feature to work. If you add a controller to the array it will load the content of that specific page after the site has loaded. An example of how this would look:
PHP:
$_CONF['core.controllers_to_load_delayed'] = array('blog.index''friend.index''photo.index'); 


$_CONF['feed.cache_each_feed_entry']
Enable this feature to see an increase in your sites overall performance. The activity feed is one of the most used features and it is a strain on your sites database. With this new feature we cache each feed entry and it will require 0 queries to the database once cached. The cache is cleared whenever there is some sort of an interaction with the feed (eg. likes or comments).

$_CONF['user.cache_user_inner_joins']
If you enable $_CONF['feed.cache_each_feed_entry'] it is important to have this feature enabled. This caches users information and stores their latest name and image. This is needed so we make sure we show their correct name and image.

$_CONF['core.super_cache_system']
Global caching setting. Enable to turn on caching system on several areas. Drops database queries.

$_CONF['user.cache_recent_logged_in']
Cache the users that have recently logged in. Setting is in minutes.

$_CONF['friend.load_friends_online_ajax']
Load the "Friends" block after the site has loaded via AJAX.

$_CONF['event.cache_upcoming_events_info']
Cache the upcoming event in hours.

$_CONF['shoutbox.load_content_ajax']
Load the shoutbox content after the site has loaded via AJAX.

$_CONF['photo.pre_load_header_view']
Enable to pre-load all the needed JS/CSS files for viewing a photo. Makes it faster to get the image popup.

$_CONF['core.store_only_users_in_session']
Only store users in the session table. Keeps bots and guests out of this table.

$_CONF['user.disable_store_last_user']
If enabled we don't store the last time a user visits the site. Not displayed anywhere so not needed.

$_CONF['comment.load_delayed_comments_items']
Enable to load comments via AJAX when viewing items.

SEO Settings


Most of the SEO improvements have actually been built into the product. There are a few settings that we added for clients to test.
$_CONF['core.include_site_title_all_pages']
By default on each page we display the sites name at the end of the title. To assist with preventing duplicate content, if you set this to false it will stop doing this.

$_CONF['core.force_404_check']
We have implemented a new routine to create a 404 page when visiting a sub-page that does not exist. This feature hasn't been implemented on all the sections as it is highly experimental. As an example, we have our blog section: http://demo.phpfox.com/3.6.0/blog/
If you were to visit: http://demo.phpfox.com/3.6.0/blog/test/
Before it would still show the blog section. With this new setting it will throw a 404. This is to assist in preventing duplicate content. We added support for the following sections...
blog, user browse, photo and pages.

If you are using our .htaccess file to create short URLs you can take advantage of some rewrite rules to assist in duplicate content. Open the file /.htaccess. You should find
#
#  Rules
#


Above that add the following...
# 301 redirect if missing www.
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.% {HTTP_HOST}/$1 [R=301,L]

# 301 redirect if missing trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]


HTML5 Video Support


With this version we have included HTML5 video support. To enable this option set the setting $_CONF['video.upload_for_html5'] to true. Note that your server needs to have the latest version of FFMPEG installed.

Optimization Tips


We have some tips on how to optimize your site with some of our older settings. The first tip is to enable the option Cache JavaScript & CSS. This will compress your sites CSS and JavaScript into a few files, which in return will mean less HTTP requests to your server.

Next, for the setting User Pic Sizes. We only need the values 50, 200 & 120. The rest can be removed. This will help when users change their profile image as it will be much faster, especially if you use a CDN.

For the setting Photo Image Sizes. Keep the following values 240, 500 & 1024. The rest can be removed.

Enable the setting Delete Original Photo After Resize. This will remove the original image, which isn't really used by the product and eats up disk space.