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
Joined
14 Oct 2009
Posts
9,557
Location
UK
Wordpress can certainly do what your looking for,

See this, http://forums.overclockers.co.uk/showthread.php?t=18698938

Something similar to what your looking for.

If you are interested then learning HTML/CSS and so forth can be great and you can create any website you like but if you just want to get up and running straight away and get your content out to the world then knock up a wordpress site and continually look on how to improve it via plugins or different themes etc.
 
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
Joined
14 Oct 2009
Posts
9,557
Location
UK
Setup a web server? whereabouts?

Yeah it is a nice site, as you can see it is only a uni project so just goes to show what can be achieved.
 
Associate
Joined
26 Apr 2012
Posts
1,197
I would pay to have someone host the site unless you have an active interesting in server admin. I think TSOhost offers a package from £2.99 a month and thats from a decent host, so I am sure you could find something a lot cheaper.

Hosting from your own house is not something I would consider, something as simple as a power cut will put your sites down until you can reboot the server.
 
Associate
Joined
26 Apr 2012
Posts
1,197
Quick check you can get a years hosting from Tsohost for £14.99 so around £1.25 a month probably cheaper than the cost of having your server on 24/7
 
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
Joined
28 Oct 2006
Posts
12,456
Location
Sufferlandria
the error shows up on line 22 because the line 'function MuchReviews...' line is not inside a php code block so it will just be treated as html code. The error is actually further up.
This is the line which will be causing problems:

?>
function MuchReviews-GoogleAnalytics() { ?>

Remove the first ?> or add <?php before the word 'function'.
 
Last edited:
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
Joined
28 Oct 2006
Posts
12,456
Location
Sufferlandria
Cant see the analytics code showing up on the site.

I think you might need to make the script a string object and echo it in php:
Code:
<?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() { 
$scriptString = "<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>";

echo $scriptString;
}

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

You should also try to match your php start/end blocks. The very start of your code has an opening tag <?php so you should include a close at the end ?>
It might work without this or it might cause weird errors in other places.
 
Back
Top Bottom