Category: "XenForo"

Google Analytics UI Changes and Improvements

Some site owners have noticed recently that there have been changes to Google Analytics UI (User Interface) and more such as security improvements in regards to browser use, namely that Firefox and similar browsers are not compliant with how the information is displayed securely therefor will not display the analytics content for review.

Let’s review a few of these changes and some useful tips!

  • Automatic alerts will be removed from Google Analytics soon. Custom alerts will not be affected and continue to be visible.
  • The In-Page Analytics report is being removed from Google Analytics soon. However, you can still get in-page analytics by using the official Page Analytics Chrome Extension.

Furthermore the Google Analytics Code itself has undergone another change, let’s compare an old snippet to a newer snippet of code;

Old Version:
<script type=”text/javascript”>

var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-12345678-1’]);
_gaq.push([‘_trackPageview’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

New Version:
<script>
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-12345678-1’, ‘auto’);
ga(‘send’, ‘pageview’);

</script>

Using the above examples, you need to check your existing Google Analytics Code and compare, if it’s outdated then simply snag the new code from the Analytics Dashboard Admin area which is rather simple so let’s recap that as well:

  • Log into your Google Analytics Account.
  • Click on the ADMIN tab at the top.
  • Click on .js Tracking Info under the Property Settings.
  • Click on Tracking Code and now scroll down, you can view the new code and copy/paste that into your relevant software.
  • Allow upwards of 24hours for the tracking code to begin tracking properly (if no code existed already).

You can view more information on the upcoming changes and improvements here.

Read More

LiteSpeed Cache and Xenforo

Every forum owner wants a lot of posts but high post counts and traffic can bring a large forum to a crawl in peak hours. The falling cost of SSD’s has helped considerably but a good caching scheme is mandatory.

LiteSpeed in conjunction with the admins at XenForo has come up with what looks to be an efficient and well-maintained scheme.
The LiteSpeed Cache Plugin for XenForo (LSCXF) is a PHP-based plugin that communicates with your installation of LiteSpeed Web Server(LSWS) and its built-in page cache, LSCache. LSCache is built directly into LSWS to significantly reduce overhead with greater efficiently than with other PHP-based caches.
The current community version of LSCXF will only cache and serve pages for non-logged-in users. After a user has logged in, their page requests will always hit the backend.
Additional Plugin Features
Automatic page caching greatly improves site performance
Support for HTTP/2 & HTTPS out-of-box

LiteSpeed ForoMTB cache efficiency.

LiteSpeed ForoMTB cache efficiency.

Load comparison Apache vs. LSWS
*Courtesy LiteSpeed Technologies Inc

Server Environment
2x AMD Opteron 6272 CPUs (32 cores)
64GB RAM
2x 1TB drives with RAID 1

Read More

How to install Xenforo Add-ons

Installing and upgrading Xenforo Modifications/Add-ons is a fairly straightforward process. Normally installing a Add-on involves:

  • Upload Add-on contents to /library
  • Upload Add-on contents to /JS
  • Import .xml file in the Admin Control Panel.

*Please Note: Not all Add-ons have the same files and some do not have javascript (JS) files to upload – the files required for upload vary per Add-on.

Alternatively there are Add-ons that can do this for you if you’re uncomfortable with installing or upgrading your Add-ons, some of which are:

Other Add-ons are also available in the resources section of the xenforo website, one prime example would be “Proper Theme Installation, Upgrading, and Usage” which is also a very useful Add-on! Always keep your Add-ons up-to-date, it’s very important!

 

Read More

Setup XenForo locally for learning and Development

Good way for XenForo users who want to install XenForo locally for learning and development purposes. Backbone for this guide is WPN-XM (or WPИ-XM), an open source, nginx backed server stack for Windows actively developed by Jens-André Koch. You can donate to him here.
Compatible with XenForo Versions 1.0, 1.1, 1.2, 1.3, 1.4
Homepage: http://wpn-xm.org/
Github: https://github.com/WPN-XM

1. Download and install WPN-XM

Go to http://wpn-xm.org/ and grab the All-In-One Installer. Webinstaller is buggy and doesn’t always work. Next, install it in any directory you like. When it prompts you to select the components you want to install, follow this picture as you don’t need all of them:
wpnsetup

 

 

 

 

 

 

 

For the next prompt, choose if you want start menu entries, desktop shortcuts etc.
I’d choose the portable installation because it doesn’t do registry entries and makes for a clean uninstall.

wpnsetup2

 

 

 

 

 

When the installation completes;

2. Create database and copy XenForo

Run WPN-XM. You should see the Server Control Panel:

server conrolpanel

 

 

 

 

Click the Start button and the grey dots to the left should turn green.

wpnpanel2

 

 

 

 

Now click the webinterface button to reach the Webinterface:

wpnwebinterface

 

 

 

To create a database for XenForo, click at phpmyadmin. Username is “root”. Leave the password field blank. phpmyadmin will create a database with the collation utf8_general_ci. Name your database and when its created, click at the red Stop button from the Server Control Panel.

Navigate to the www folder of WPN-XM and create the folders for your project. .In the one for the XenForo install unzip the XenForo archive.

3. Configuring php

You need to follow the instructions carefully. First navigate to /bin/php/ and open the php.ini with the editor of your choice. There we need to make a few adjustments.

Find post_max_size and upload_max_filesize and set their values to 80M. As this is for development purposes, you’ll likely have to import and export databases if something blows up or if an add-on creates database entries that you can’t get rid of during the uninstall process. This is the first step to allow importing databases bigger than the default allowed size (8MB).

Save the changes, navigate to /bin/nginx/conf/ and open nginx.conf. We need to make changes there as well. The first thing to do is copy&paste the following line directly below http {

Code:
server_names_hash_bucket_size 128;

What does this do? By default you can access your local xenforo installation via the following URL: http://localhost/xf/

/xf/ is the folder I chose for the xenforo installation in this guide. Now it’s possible to use any domain name you want instead of localhost by setting up a virtual host (this is described later). The problem is, if your domain name is too long, you get a Gateway time-out error. The setting above allows you to use a long domain name.

Now find client_max_body_size and change its value to 80M. This will complete the permission to import databases up to 80MB big.

At this point if you were to install xenforo and access your forum, you will see 404 errors on nearly all pages but the forum index. This is because we haven’t defined rewrite rules yet.

Find

Code:

# handle files in the root path /www

location / {

index index.php index.html index.htm;

}

and replace it with

Code:

# handle files in the root path /www

location / {

index index.php index.html index.htm;

}

 

location /xf {

try_files $uri $uri/ /xf/index.php?$uri&$args;

index index.php index.html;

}

 

location /xf/internal_data/ {

internal;

}

location /xf/library/ {

internal;

}

The /xf/ directory must be changed to match your xenforo installation directory (if you chose something else than xf). Save the nginx.conf and start your server. Go to the webinterface of WPN-XM and click the name of your xenforo project. If all is well you should be prompted to install XenForo. Fill in all required fields and wait for completion. You know have a blazing fast XenForo forum to tinker with.

4. Setting up virtual hosts (optional)

The following step is for those who want to use a domain other than “localhost” for their forum. I will use the domain “example.com” as an example.

First open your Windows hosts file and add the following line at the end:

Code:

127.0.0.1       example.com

If this is denied you need to disable your firewall or anti-virus and re-enable them again.

Now open the nginx.conf file and delete the lines you previously added:

Code:

location /xf {

try_files $uri $uri/ /xf/index.php?$uri&$args;

index index.php index.html;

}

 

location /xf/internal_data/ {

internal;

}

location /xf/library/ {

internal;

}

Save the nginx.conf and navigate to /bin/nginx/conf/domains-enabled/ and create a new file called xenforo.conf. Open the file and copy&paste the following into it:

Code:

server {

listen   127.0.0.1:80;

server_name example.com;

 

root www/xf;

index index.php index.html;

 

log_not_found off;

charset utf-8;

 

access_log logs/xf.access.log main;

 

location / {

try_files $uri $uri/ /index.php?$uri&$args;

index index.php index.html;

}

 

location /internal_data/ {

internal;

}

location /library/ {

internal;

}

 

location ~ \.php$ {

try_files $uri =404;

fastcgi_pass   127.0.0.1:9100;

fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;

include         fastcgi_params;

}

}

Save and start your server. Your local xenforo site is now accessible via example.com (only for you).

 

Read More

Creating Terms of Service and Privacy Policy Documents

 

 

tos

From forums to ecom sites, the importance of current Terms of   Service, Privacy Policies and various other legal documents cannot be be stressed enough. Automattic has open sourced all of its legal documents, including a DMCA takedown notice.

To use Automattic’s legal document as a foundation for your sites document check the Auto Terms of Service and Privacy Policy plugin at WordPress.org.  Clifford Paulick’s, wrote the plugin to use content from Automattic’s Terms of Service and Privacy Policy, both are available to the public under the Creative Commons Sharealike license. The language of each document is generic and can apply to most sites or service providers, from single sites to subscription sites, blog networks, forums and others.

Github and its Legalmattic repository is another source to check for these documents.

Read More

XenForo Adds Spam Filters

XenForo, with version 1.4 supports a number of CAPTCHA providers:

Text CAPTCHA — provides Q&A style CAPTCHAs like “Which of 47, sixty two, 18 or 59 is the smallest?”. Its really the same as Q&A, only it has a large number of questions built-in — over 180 million.
Solve Media — Solve Media offers standard image-based CAPTCHAs at varying difficult levels:
They also offers revenue generation options through your CAPTCHA if that’s something you’re interested in. KeyCAPTCHA — KeyCAPTCHA uses a puzzle-solving approach to implement a CAPTCHA. When I say a puzzle, I mean that literally: KeyCAPTCHA has a few different offerings and variations on this theme which you can enable on their site.
All of these new options require you to obtain API keys from the service, so they will need to be explicitly enabled.
IP Checks Against Banned Users —If a user registers with an IP address that was used by a banned user recently, you now have the option to manually approve that registration. Catch user re-registering banning. Spammers tend to use the same IP over and over.

Read More