Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (778 votes)

89% thumbs up 10% thumbs down

How would you rate this answer?

Thank you for rating this answer.

How can I allow users to submit a URL in comments rather than an email address?

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


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:

include 'init.php';
// prepare query
$query = sprintf("ALTER TABLE `%scomments` CHANGE `FromEmail` `FromEmail` TEXT NOT NULL ",$GLOBALS["AL_CFG"]["tablePrefix"]);

// does the query work?
    echo "Success!";
    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.

Related Articles

No related articles were found.


No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software