PDA


View Full Version : Sub-forum as a Module (almost done, just need a little help)


mfarmerhi
08-20-2005, 07:34 PM
I'm porting a vB sub-forum as a vBa module.

I've almost succeeded, just need a little help.

I use one of my subforums for articles and want an Article page that displays not just the latest articles (posts) (as does the latest post module); not just single articles (as do the news modules), but the WHOLE subforum as a module.

I've got much of it displaying correctly: The sub-sub-forum titles, latest post, latest poster...

But the links are all wrong.

The links come up as http://mysite.com/displayforum.php?
I need them to come up as http://mysite.com/forum/displayforum.php?

I've simply copied the vB displayforum.php and DISPLAYFORUM template, using those as the vBa php and vBa template for the module.

Since I can't find those URLs anywhere, only variables (e.g. "$forumbits") I'm assuming that the URLs are being defined in variables, elsewhere in another php file.

Where the heck are the sub-forum URLs being defined!?

I can't find them in the templates OR the diplayforum.php file

~ Mark

mfarmerhi
08-20-2005, 08:34 PM
This is driving me buggy... I've tried changing all the URLs in DISPLAYFORUM, threadbits and forumhome_forumbit_level1_post to include the "forum/displayforum.php?" and it's still not showing up...

There's got to be another template that's defining the url in $forumbits

Brian
08-21-2005, 04:13 PM
I've tried changing all the URLs in DISPLAYFORUM, threadbits and forumhome_forumbit_level1_post
You need to change the URL's in the rest of your forumhome_forumbit_levelX templates as well.

mfarmerhi
08-21-2005, 08:21 PM
Hey Brian,

Yea, I did -- level1 and level2 (that's all the levels I found), both post and nopost

Still's not working.

Where does the $childforum get set?

mfarmerhi
08-22-2005, 05:27 AM
Okay... I knew it wasn't pulling all the templates I'd modified, so started looking where else it was pulling templates.

Found it: in addition to changing all the templates, I had to also make a new functions_forumlist.php (because the script from forumdisplay.com had that as an include).

The original functions_forumlist.php was calling the old templates.

So now, the child forums of the sub-forum have the correct links, BUT the last post info for each child forum still is missing the /forum/

I thought that functions_forumdisplay.php was the obvious canditate (since functions_forumlist.php was calling it's associated template, I thought it'd make sense for functions_forumdisplay.php to do the same), but NO DICE.

So... the last post in forums is pulling a template for itself, somewhere else.

Anyone know where?

BTW, you can see the page I'm working on here: http://totallifesuccess.com/?page=articles

The "Success Library" module at the bottom is the one giving me fits. It is a sub-forum from my vB Forum.

~ Mark

mfarmerhi
08-22-2005, 04:50 PM
This mod is on the same page as a "latest posts" mod. I'm thinking that, that mod has already called the include, so when I attempt to re-call it in this mod, it gives me the error:

Fatal error: Cannot redeclare fetch_dot_threads_array() (previously declared in /home/totalli/public_html/forum/includes/functions_forumdisplay.php:17) in /home/totalli/public_html/forum/includes/functions_forumdisplay_articles.php on line 17

Any way to make it unset includes!? Clear them out of memory!?

mfarmerhi
08-22-2005, 05:41 PM
Okay, the solution wasn't to make a new functions_forumdisplay.php -- the problem was that the new functions_forumlist.php was calling the old forumhome_lastpostby template (and not the new one I made for the address /forum/displaythread.php )

K... just a little clean up and the mod'll be done.