11
etcetera
Re: Problem altering newbb templates
  • 2009/7/1 14:05

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


Yes. I'm positive this is the active template. All other changes I've made have displayed without problems... and yes, I am editing from the admin area.

The problem exists only with newbb_thread.html and newbb_item.html. I make a change in the admin area, it DOES save, but it does not display on the front end.

The newbb_thread pages have the following errors:

In flat and compact display modes:
Quote:

Notice: Deprecated function 'mod_getIP', use XoopsUserUtility directly. in file /Frameworks/art/functions.user.php line 20

Warning: Class XoopsEditorHandler does not exist
Handler Name: editor in file /include/functions.php line 446


In threaded display mode:
Quote:

Notice: Deprecated function 'mod_getIP', use XoopsUserUtility directly. in file /Frameworks/art/functions.user.php line 20

Warning: Class 'XoopsTree' is deprecated, check 'XoopsObjectTree' in tree.php in file /class/xoopstree.php line 45

Warning: Class XoopsEditorHandler does not exist
Handler Name: editor in file /include/functions.php line 446



12
iHackCode
Re: Problem altering newbb templates

this is commented out (for threaded view)

<{*include file="db:newbb_thread.html" topic_post=$topic_post mode=$mode*}>

what it does: pulls the template from the database.

this is active.
<{include file="$newbb_template_path/newbb_thread.html" topic_post=$topic_post mode=$mode}>
pulls the template from the filesystem.
--

you need this
<{include file="db:newbb_thread.html" topic_post=$topic_post mode=$mode}>

for it to retrieve it from the database.

<{foreach item=topic_post from=$topic_posts}>
<{if 
$viewmode_compact}>
<{include 
file="db:newbb_item.html" topic_post=$topic_post}>
<{else}>
<{include 
file="db:newbb_thread.html" topic_post=$topic_post mode=$mode}>
<{/if}>
<
br />
<
br />
<{/foreach}>
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

13
etcetera
Re: Problem altering newbb templates
  • 2009/7/1 18:48

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


Bandit-X: you are my hero. This is just the fix I needed! Thank you so much for putting a positive spin on a terrible day. :)

14
deka87
Re: Problem altering newbb templates
  • 2009/7/1 19:06

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


wait I don't get what file we should edit to get it working?
Mind anchors

15
etcetera
Re: Problem altering newbb templates
  • 2009/7/1 21:14

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


You should edit the newbb_viewtopic_flat.html and newbb_viewtopic_threaded.html in the newbb section of your templates.

Find the snippet of code I posted in the first post and change it to what Bandit-x posted above. :)

16
deka87
Re: Problem altering newbb templates
  • 2009/7/2 5:36

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


neat =)) thanks guys now it's working. should report to module devs I guess.
Mind anchors

17
zite83
Re: Problem altering newbb templates
  • 2009/8/22 20:03

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


I don't know if the problem I had is the same, but when I wanted to use a custom template for cbb3.08 with in my theme, I noticed everything would show my templates all but the thread.html one. Taking a look at the veiwtopic.php I noticed this...

if($xoopsTpl->xoops_canUpdateFromFile() && is_dir(XOOPS_THEME_PATH."/".$xoopsConfig['theme_set']."/templates/".$xoopsModule->getVar("dirname"))){
    
$xoopsTpl->assign('newbb_template_path'XOOPS_THEME_PATH."/".$xoopsConfig['theme_set']."/templates/".$xoopsModule->getVar("dirname"));
}else{
    
$xoopsTpl->assign('newbb_template_path'XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/templates");
}


I changed the templates to modules
if($xoopsTpl->xoops_canUpdateFromFile() && is_dir(XOOPS_THEME_PATH."/".$xoopsConfig['theme_set']."/modules/".$xoopsModule->getVar("dirname"))){
    
$xoopsTpl->assign('newbb_template_path'XOOPS_THEME_PATH."/".$xoopsConfig['theme_set']."/modules/".$xoopsModule->getVar("dirname"));
}else{
    
$xoopsTpl->assign('newbb_template_path'XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/templates");
}


Once I made that change, thread.html was being used from my themes directory not my module directory.

Login

Who's Online

389 user(s) are online (249 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

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

Latest GitHub Commits