Add new Faq: Input field 'Link for this FAQ' no function

Please report bugs here!

Moderator: Thorsten

Post Reply
pca
Posts: 4
Joined: Thu Jan 05, 2012 11:11 am

Add new Faq: Input field 'Link for this FAQ' no function

Post by pca »

Bug: phpMyFAQ 2.7.1
Frontend-form 'Add new Faq': The input field 'Link for this FAQ' has no function.
Solution (this will add the link to the answer):
Change ajaxservice.php / line 224
link = PMF_Filter::filterInput(INPUT_POST, 'contentlink', FILTER_VALIDATE_URL);
to
$contentlink = PMF_Filter::filterInput(INPUT_POST, 'contentlink', FILTER_VALIDATE_URL);

and if you like some more control over the layout, change ajaxservice.php / line 257 too
$answer = sprintf('%s<br />%s<a href="http://%s" target="_blank">%s</a>',
to
$answer = sprintf('%s<br /><div id="newFAQContentLink">%s<a href="http://%s" target="_blank">%s</a></div>',

That's it.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add new Faq: Input field 'Link for this FAQ' no function

Post by Thorsten »

Hi,

thanks for the hint, fixed with the upcoming 2.7.3 release!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply