1
kahumbu
NewBB Reply Template
  • 2004/1/2 20:06

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


I would like to change some aspects of the reply page in the forums. There is no reply template to change and edit. Where do I go or what do I do?

I want to change the look of the previous post just before the reply form (the area where both the replied post and the submission preview is handled). Specifically, I am after the <td> of that "class=outer" table. My outer class is dark, unlike here in XOOPS.org, so when someone replies in my forum, the previous post is shown with a dark background. I would like to put a class on that <td> to make it lighter.

Thanks for the help!

2
Mithrandir
Re: NewBB Reply Template

Check modules/newbb/reply.php

3
kahumbu
Re: NewBB Reply Template
  • 2004/1/3 3:14

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


Thanks, MithyT2, but I already did that. It starts with processing the HTTP posts, then calls the reply form.

I also followed all the includes (header.php, class.forumposts.php, etc.) but I can't find where the table is declared. I am looking for just that one <td>.

I am still trying to look for it. It may be a function call that defines a format.

Thanks again!

4
NitroFoO
Re: NewBB Reply Template
  • 2004/1/3 4:40

  • NitroFoO

  • Documentation Writer

  • Posts: 76

  • Since: 2002/1/26


I was going to direct you to the templates section but browsing in there (at least w/ XOOPS 2.x.x) there is no standalone reply section but I didn't get a chance to take a harder look.

To get there: Admin > Templates > System

5
Mithrandir
Re: NewBB Reply Template

Line 122 in reply.php:
include 'include/forumform.inc.php';

so check modules/newbb/include/forumform.inc.php

If that's not the answer, I believe you need to check out the textsanitizer because the ForumPost class (found in modules/newbb/class/class.forumposts.php) uses the MyTextSanitizer class in the subject() and text() functions, which I believe are used in reply.php to show the first area.

6
Mithrandir
Re: NewBB Reply Template

Line 114 in reply.php calls
themecenterposts($r_subject$r_content);

Which is a function in root/include/cp_functions from line 188
echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">'.$title.'</td></tr><tr><td><br />'.$content.'<br /></td></tr></table>';

So there is your <td>

7
kahumbu
Re: NewBB Reply Template
  • 2004/1/3 12:05

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


A good many thanks, MithyT2!

I would have not discovered it without help. I just followed files that were explicitly called. How could I have known it was 'buried' in includes/cp_functions.php?

That was probably a bit challenging. Thanks again!

8
Mithrandir
Re: NewBB Reply Template

A bit challenging, yes, but after looking at the various functions in the ForumPost class, it was quite clear to me that the problem was to be found in the form or between the includes in reply.php - and since the form did not include it, I looked closer and closer until I found the themecenterposts() function and I thank my PHP coding program for making functions searchable so I could locate the function without looking into too many files

Learning something new about XOOPS every day

9
kahumbu
Re: NewBB Reply Template
  • 2004/1/16 13:50

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


Hi Mithrandir,

I found it!

After you found cp_functions.php, I changed 'themecenterposts' from there, but it did not work. I was thinking that this function is probably cached somewhere. After updating modules and system, I came to the most logical conclusion: this function is probably called from another php file!

Using your lead, I looked in the different files in the /includes/ folder. Finally, I found another instance of the 'themecenterposts' function in the /includes/old_theme_functions.php file. I changed it and the changes took effect.

I finally found my elusive <td>.

10
Mithrandir
Re: NewBB Reply Template

Only templates are cached.

However, I'm gonna ask about that themecenterposts() function as it is also used in the News module for previews. I do *think* that the old_theme_functions functions will be excluded in the next XOOPS version to reduce confusion.

Login

Who's Online

156 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 156


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