We will just have
to make a few adjustments to Interspire Website Publisher and a database change.
Open /admin/includes/classes/class.helper.php
Find 2 occurances of:
$author = sprintf("<a href='mailto:%s'>%s</a>", $row["FromEmail"], $row["FromName"]);
This should be located within in the function
GetCommentAuthorText($CommentId)
remove the mailto: text from the above code.
Now, if someone types in a url it will link to it. Also, you may
want to place a target='_blank' in there so it opens in a new window.
So our finished line of code will look like:
$author = sprintf("<a href='%s' target='_blank'>%s</a>", $row["FromEmail"], $row["FromName"]);
Note: You will need to make the changes and not copy and paste as the 2 occurances have a slight difference between them.
Now, the Interspire Website Publisher database only allows 50 characters for an email, but that won't be enough for longer URL's.
In order to change that we will need to run a database query. To do that, we need to create a blank file called changeDB.php
and put this following code into it:
<?php
include 'init.php';
// prepare query
$query = sprintf("ALTER TABLE `%scomments` CHANGE `FromEmail` `FromEmail` TEXT NOT NULL ",$GLOBALS["AL_CFG"]["tablePrefix"]);
// does the query work?
if(mysql_query($query)){
echo "Success!";
}else{
echo "Failed =( <br />\n Reason: ".mysql_error();
}
?>
Now upload it to your base Interspire Website Publisher directory and visit it via a browser. It should display a Success or Failed message.
If it works, then you just need to edit the template file to say
URL rather then email. Open /templates/{your
template}/Panels/SubmitComment.html (OR in the control panel Templates > Panel Files> Edit SubmitComment.html) and change
%%LNG_comYourEmailLabel%% to what ever you wish.
If you have any troubles with this guide, send in a trouble ticket via the client area.