1
nmshah
disable auto linebreak in smartfaq
  • 2009/1/13 10:04

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


how do i disable the automatic XOOPS linebreak option in smartfaq module?

2
nmshah
Re: disable auto linebreak in smartfaq
  • 2009/1/15 18:51

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


any suggestions on how to do this?

3
McDonald
Re: disable auto linebreak in smartfaq
  • 2009/1/15 19:36

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


See the explanation about displayTarea here.
Just open the files of SmartFAQ one-by-one, look for displayTarea and modify it as you want.

4
nmshah
Re: disable auto linebreak in smartfaq
  • 2009/1/17 16:31

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks a lot McDonald,

I had already tried this approach. But i am not able to get this to work. I will try to explain it better:

1. The smartfaq module the create QandA page already has the options for enable html code, display images and enable xoopscode but the option for linebreak is not present.

Now there are 23 instances of displayTarea. following are the same

Page                     Line               Matched Text
    modules
/smartfaq/admin/myblocksadmin.php [1/3]    138    ....= "<option value='$mid' selected='selected'>" $myts->displayTarea($mname) . "</option>n" ;
    
modules/smartfaq/admin/myblocksadmin.php [2/3]    140    $module_options .= "<option value='$mid'>" $myts->displayTarea($mname) . "</option>n" ;
    
modules/smartfaq/admin/myblocksadmin.php [3/3]    210    $form->addItem$item_id $myts->displayTarea($item_name) ) ;
    
modules/smartfaq/admin/permissions.php [1/1]    49    ...$form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
    
modules/smartfaq/answer.php [1/1]    225    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/category.php [1/1]    147    $xoopsTpl->assign('whereInSection'$myts->displayTarea($xoopsModule->getVar('name')));
    
modules/smartfaq/class/answer.php [1/1]    124    $tags['MODULE_NAME'] = $myts->displayTarea($smartModule->getVar('name'));
    
modules/smartfaq/class/category.php [1/1]    112    $ret $myts->displayTarea($ret);
    
modules/smartfaq/class/faq.php [1/4]    175    $ret $myts->displayTarea($ret);
    
modules/smartfaq/class/faq.php [2/4]    192    $ret $myts->displayTarea($ret);
    
modules/smartfaq/class/faq.php [3/4]    202    $ret $myts->displayTarea($ret);
    
modules/smartfaq/class/faq.php [4/4]    374    $tags['MODULE_NAME'] = $myts->displayTarea($smartModule->getVar('name'));
    
modules/smartfaq/footer.php [1/1]    19    $xoopsTpl->assign('sectionname'$myts->displayTarea($xoopsModule->getVar('name')));
    
modules/smartfaq/submit.php [1/2]    93    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/submit.php [2/2]    229    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/request.php [1/2]    119    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/request.php [2/2]    124    ...n('lang_intro_text'_MD_SF_GOODDAY "<b>$name</b>, " $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
    
modules/smartfaq/open_index.php [1/3]    122    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/open_index.php [2/3]    125    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/open_index.php [3/3]    127    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['openquestionintromsg'], 1));
    
modules/smartfaq/include/functions.php [1/1]    517    ...#2F5376; padding: 0 6px; line-height: 18px;'><b>" . $myts->displayTarea($xoopsModule->name()) . " " . _AM_SF_MODADMIN . "</b> " ....
    
modules/smartfaq/index.php [1/2]    156    $moduleName $myts->displayTarea($xoopsModule->getVar('name'));
    
modules/smartfaq/index.php [2/2]    164    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1));


of which i thought changing 1 to 0 in the following lines should have solved the problem.

modules/smartfaq/open_index.php [3/3]    127    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['openquestionintromsg'], 1));
    
modules/smartfaq/index.php [2/2]    164    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1));


Seems i was wrong. Any suggestions on what else should i do to disable the linebreak option

5
McDonald
Re: disable auto linebreak in smartfaq
  • 2009/1/17 17:50

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


$myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1)

This will enable html only.

Try it like this:
$myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 11110)

This enables html, smiley, xoopscode and images, and disables linebreaks in $xoopsModuleConfig['indexwelcomemsg'].

Remember:
displayTarea$text$html 1$smiley 1$xcode 1$image 1$br 0)

or in short:
displayTarea$text11110)

$text : string of text to be displayed
1,1,1,1,0 : html=smiley=xoopscode=image=enabled and linebreaks=disabled

6
nmshah
Re: disable auto linebreak in smartfaq
  • 2009/1/18 5:41

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks MacDonald,

I am not able to figure out where to make changes. If i make the above said changes to
modules/smartfaq/open_index.php [3/3]    127    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['openquestionintromsg'], 1));
    
modules/smartfaq/index.php [2/2]    164    $xoopsTpl->assign('lang_mainintro'$myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1));


It only applies to the intro msg on the index page of the module. I am not able to find the displayTarea function to display the answers. In the above post i have mentioned that there are 23 instances of displayTarea in the module but the two that are stated in this post concern intro msg, Can anyone knidly check out the code in the my last post to let me know which one relates to the answer page.

7
vietnam
Re: disable auto linebreak in smartfaq
  • 2009/4/14 6:27

  • vietnam

  • Just popping in

  • Posts: 59

  • Since: 2007/5/25


Problem-solving it?
I also have the same problem, can you tell me what to do?
Thanks?

Login

Who's Online

137 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 137


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits