Creating a review website

Soldato
Joined
8 Jun 2005
Posts
5,193
Morning all,

I'd like to setup a website where I'll post product reviews with pictures and a probably a few videos. I'd like people to be able to comment on the reviews and possibly put their own reviews on the website too to get a bit more content on there.

I was wondering if I install Wordpress if that would be a suitable base for this to be setup on? I'm happy to learn it from the ground up if it's capable of doing what I'd like :)

Thanks,

G
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Cool thanks for the information, all I've done so far is buy a domain name and setup up a web server running IIS (Windows 2008 R2) to host it on.

It was a bit of an impulse buy because of a black friday deal on .com's lol

/edit p.s. that site looks awesome :D
 
Last edited:
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Thanks for the advice :) my server is on 24/7 anyways for email, FTP, terminal server and a couple of other websites.

If I get any kind of traffic I wouldn't want to lose I would move it to somewhere with more resilience :) just testing the water initially.

Can't seem to get the install.php to run properly to install Wordpress just yet so need to work that out now, it just opens in ie like I'm reading a text file at the moment.
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Have you installed PHP on your server?

Hi mate, yeah PHP was installed, I've got it working now, but I've still screwed the PHP file association up, I accidentally told it to always open PHP files with Explorer.exe and now I can't change it back lol.

I ended up making a new website site in IIS that pointed to the PHP file I wanted to open and then ran through the install that way lol.

The site is up now, but empty. I'm just working on a logo at the moment :)

Learning how much I SUCK at photoshop lol

/edit on a completely unrelated note... did you used to play BF3? With LVL?
 
Last edited:
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Logo done but it doesn't seem to show up anywhere apart from at the top of the browser tab so that may have been a bit of a waste of time LOL
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Don't know if this will work...

L7NsNy.jpg


/edit Oh cool it did :)

Thoughts?
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Ok I've hit another hurdle, I'm trying to write a plugin to integrate Google Analytics into my site... this is what I've put so far....

Code:
<?php
/*
Plugin Name: Google Analytics Plugin
Plugin URI: http://muchreviews.com
Description: Adds a Google analytics tracking code to the <head> of your theme, by hooking to wp_head.
Author: Guru
Version: 1.0
 */
 ?>
 function MuchReviews-GoogleAnalytics() { ?>

		<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','//www.google-analytics.com/analytics.js','ga');

		  ga('create', '*********', 'auto');
		  ga('send', 'pageview');

		</script>
[COLOR="Red"]<?php }[/COLOR]

add_action( 'wp_head', 'MuchReviews-GoogleAnalytics', 10 );

But when I go to activate the plugin I get an error saying:

Parse error: syntax error, unexpected '}' in D:\Website\MuchReviews_WP\wp-content\plugins\MuchReviews-GoogleAnalytics.php on line 22

I've put line 22 in RED.

I was following this guide here:

https://premium.wpmudev.org/blog/create-google-analytics-plugin/

And I thought I'd done it all ok.

Anyone know what I've done to balls this up?

Thanks,

G
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Thanks mate:)

This seems to work:

<?php
/*
Plugin Name: MuchReviews Google Analytics Plugin
Plugin URI: http://muchreviews.com
Description: Adds a Google analytics tracking code to the <head> of your theme, by hooking to wp_head.
Author: Alex
Version: 1.0
*/

function MuchReviews_GoogleAnalytics() { ?>
<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','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-********-1', 'auto');
ga('send', 'pageview');

</script>

<?php }

add_action( 'wp_head', 'MuchReviews-GoogleAnalytics', 10 );

/edit I say it seems to work, I've still got 0 hits on there (despite the fact I've been to the site a few times to test.) but the add-in enabled ok this time.
 
Last edited:
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Thanks mate, I ended up doing it with a different script:

<?php
/*
Plugin Name: MuchReviews Google Analytics Plugin
Plugin URI: http://muchreviews.com
Description: Adds a Google analytics tracking code to the <head> of your theme, by hooking to wp_head.
Author: Alex
Version: 1.1
*/
add_action( 'wp_head', 'MuchReviews_GoogleAnalytics' );
function MuchReviews_GoogleAnalytics() {
$analytics = "<script type='text/javascript'>

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX 1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_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>";

echo $analytics;
}

I THINK it's working now :)
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
If you right click the files in explorer then click 'Open With' you can change the final associations. You could however just open up the directory in your browser at localhost/yourdocroot :)



I did indeed, feels like many moons ago! What was your name on it? I remember being in a squad with Kawusa, JGStonedRaider and a few others. Was great fun!!

Cheers dude, I was DJ_Enigma79 on BF3 :) yeah I played with Kawusa and JGStonedRaider too at times :)

I have started playing BF3 again since I got a new mouse, really enjoying it.
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Something seems to have gone wrong with the site though for some reason, I've just put a couple of draft reviews on there, but on the main page the full review is posted instead of a snippet with a "read more..." button like it had on the first two reviews I put on there :/
 
Soldato
OP
Joined
8 Jun 2005
Posts
5,193
Does anyone know if there is a file in a wordpress configuration that will show which plugins are installed and active? I'm trying to work out which plugins I had in use on my last backup and I want to restore a file that will tell me rather than restoring the whole lot and loading the site up if possible.

Thanks,

G
 
Back
Top Bottom