madmatt911
New Member
I am trying to install a wordpress theme but when I install it gives me this error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/25/d291676526/htdocs/magicshowvideos/wp-content/themes/magaling/functions/classes/socialnetwork.php on line 5
This is the code for the socialnetwork.php file:
<?php
class Padd_SocialNetwork {
protected $network;
protected $url;
protected $username;
protected $format;
function __construct($network, $url, $username='', $format='%url%%user%') {
$this->network = $network;
$this->url = $url;
$this->username = $username;
$this->format = $format;
}
public function get_network() {
return $this->network;
}
public function set_network($network) {
$this->network = $network;
}
public function get_url() {
return $this->url;
}
public function set_url($url) {
$this->url = $url;
}
public function get_username() {
return $this->username;
}
public function set_username($username) {
$this->username = $username;
}
public function __toString() {
$string = str_replace('%url%',$this->url,$this->format);
$string = str_replace('%user%',$this->username,$string);
return $string;
}
}
?>
I dont have much knowledge of PHP. If anyone can tell me what is wrong, I would greatly appreciate it.
Thanks!
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/25/d291676526/htdocs/magicshowvideos/wp-content/themes/magaling/functions/classes/socialnetwork.php on line 5
This is the code for the socialnetwork.php file:
<?php
class Padd_SocialNetwork {
protected $network;
protected $url;
protected $username;
protected $format;
function __construct($network, $url, $username='', $format='%url%%user%') {
$this->network = $network;
$this->url = $url;
$this->username = $username;
$this->format = $format;
}
public function get_network() {
return $this->network;
}
public function set_network($network) {
$this->network = $network;
}
public function get_url() {
return $this->url;
}
public function set_url($url) {
$this->url = $url;
}
public function get_username() {
return $this->username;
}
public function set_username($username) {
$this->username = $username;
}
public function __toString() {
$string = str_replace('%url%',$this->url,$this->format);
$string = str_replace('%user%',$this->username,$string);
return $string;
}
}
?>
I dont have much knowledge of PHP. If anyone can tell me what is wrong, I would greatly appreciate it.
Thanks!