View Full Version : Can I add links in description ...
alpalino
12-11-2006, 06:50 PM
I would like to modify description that I enter through admin panel. For instance I want to do some tect bold also want to add anchor links. Is this possible?
Thanks in advance
Dave Baker
12-11-2006, 07:36 PM
Hello alpalino,
***Open admin/suggest-link.php and find code***
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql(html($field_value,ENT_QUOTES));
}
***Replace with the following code***
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql($field_value);
}
***Save file***
woeanl
02-09-2007, 07:11 PM
Hello,
My file says:
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql(html($field_value));
if($field_name =='url')
{
$url_required = $value['required'];
}
I have pro version 2.1 Code looks a little different...can i use it as well?
Dave Baker
02-09-2007, 07:42 PM
Hello woeanl,
Yes, you can.
***Open admin/suggest-link.php and find code***
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql(html($field_value));
if($field_name =='url')
{
$url_required = $value['required'];
}
}
***Replace with the following code***
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql($field_value);
if($field_name =='url')
{
$url_required = $value['required'];
}
}
***Save file***
Dave 2.1 code looks like this:
/** magic quotes stripping for text and textarea fields **/
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
{
$link[$field_name] = sql(html($field_value));
if($field_name =='url')
{
$url_required = $value['required'];
}
}
Dave Baker
02-09-2007, 08:07 PM
Oops :blink: ,
I've corrected my previous post :D
Thanks Greg :good:
Oops :blink: ,
I've corrected my previous post :D
Thanks Greg :good:
That's why Simon pays me the big $$$$ :]
Dave that works fine in the links description.
But category description doesn't seem to accept html.
You have a fix for that?
Thanks
Dave Baker
02-09-2007, 10:46 PM
Greg,
It's problem with template.
***Open index.tpl and find***
<h1>{$header}</h1>
{if $category.description}
<div class="box">{$category.description|escape:"html"}</div>
***Replace with***
<h1>{$header}</h1>
{if $category.description}
<div class="box">{$category.description}</div>
***Save file***
woeanl
02-10-2007, 09:57 PM
Did do in suggest-link.php:
$link[$field_name] = sql($field_value);
And in Greenleaves/index.tpl (i have v2.1):
<div class="box">{$category.description}</div>
Couldn't load the main page anymore after changing index.tpl...just a blank screen...anybody?
If this doesn't work for me do i have to replace the changed suggest-link.php with the old one? Or can i just leave it like that? (replaced the index.tpl again to make site work again)
Is there maybe another option to make this work?
(ps...what are exactly the changes in admin area?)
Dave Baker
02-11-2007, 11:12 PM
Hello woeanl,
Couldn't load the main page anymore after changing index.tpl...just a blank screen...anybody?
A changed code produce a error. Please replace changed files in your directory with files from version without changes. And try to implement this modification once again.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.