You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees
when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.
IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.
You are not logged in.
I wish to add a 'website' field box to the comment box area for visitors who wish to input their websites. After which, I want their website to be a link to their name.
I have successfully added the field to the comment box and added a column labeled 'website' in the mw_comments table. The website entry is save to the database.
My problem is coming up with a code to have it either show just their names or their names embedded with their website link in the comment box.
Offline
Open the language file. Find:
$msg_viewblog = 'Posted by <b>{poster}</b> on {date}';
Add another similar line with a url:
$msg_viewblog9 = 'Posted by <a href="{url}"><b>{poster}</b></a> on {date}';
Open the main index file. On line 450 find:
$find = array('{comment_class}','{post_content}','{post_date}','{path}');
Above that add:
$lang = ($COMMENTS->website ? str_replace('{url}',$COMMENTS->website,$msg_viewblog9) : $msg_viewblog);
On line 452, change:
$msg_viewblog
to
$lang
Should be ok.
Offline
Haha. I had the first part right, but in the main file, I couldn't get the code right on my stab at it. Thanks.
Offline
Haha. I had the first part right, but in the main file, I couldn't get the code right on my stab at it. Thanks.
No? What happened? Code error?
Offline
Not exactly. The link would display the home website and not the website the visitor posted.
Offline
Not exactly. The link would display the home website and not the website the visitor posted.
Did you check the var names were correct? I just used examples.
$COMMENTS->website
That is the visitor url field?
Offline