PDA

View Full Version : Forum Link


Nadiar
01-22-2005, 08:28 PM
I'm trying to figure out how to link a single forum to multiple sub forums but still have it show the "Last Post", "Threads" and "Posts" from the forum.

To see an example of what I'm talking about, please see the following links:

http://www.the-hand.net/board/index.php?
http://www.the-hand.net/board/forumdisplay.php?f=47

Anyone have any pointers?

Andreas
01-22-2005, 08:33 PM
What's special at this board?
Forum 47 is just a forum with subforums

Nadiar
01-22-2005, 08:50 PM
I want "Last Post" to show the last post, instead of showing only hyphens.

Andreas
01-22-2005, 08:54 PM
Seems like I don't understand you, sorry.

It's the same as on vbulletin.com:
http://www.vbulletin.com/forum/forumdisplay.php?f=54

?

Nadiar
01-22-2005, 09:03 PM
I'm not sure what I'm saying wrong here... Using the vbulletin.com link you provided, look at "vBulletin 3 Bug Tracker" (at the bottom)

To the right of this you see "- - -" I do not want to see this. I want to see what the last post is, like with every other forum above "vBulletin 3 Bug Tracker"

Andreas
01-22-2005, 09:07 PM
Well, the Bug-Tracker is a link so it does not have posts.

Nadiar
01-22-2005, 09:09 PM
Well, the Bug-Tracker is a link so it does not have posts.

Yes, and I want to be able to link to another sub forum, and have it display the posts.

Andreas
01-22-2005, 09:15 PM
This is rather difficult to achieve.
You would have to modify the code to check if a forum is a link, then check if the link links to an internal forum, then check permissions for this forum and fetch the infos.
Also, you might run into problems with the sessionhashfor users that don't accept cookies, as a link doesn't carry over the sessionhash.

Wouldn't it be possible to just make the destination form a child of the forum where you want to have the link?

Nadiar
01-22-2005, 09:21 PM
You would have to modify the code to check if a forum is a link, then check if the link links to an internal forum, then check permissions for this forum and fetch the infos.

I don't have any links to external forums, so thats not an issue, I just need to find the location of the code for this.

Wouldn't it be possible to just make the destination form a child of the forum where you want to have the link?

Sadly not, because the forum needs to appear in 3 different area's

Andreas
01-22-2005, 11:31 PM
I think I got a "proof of concept"

In functions_forumlist.php FIND

}

// ###################### Start getimodcache #######################
function cache_moderators()


ABOVE that ADD

$forumcache[ID1] = $forumcache[ID2];


Where ID1 is the ForumID of your Link-Forum and ID2 is the ForumID of the destination Forum.
If you got several Forum-Links, repeat this line accordingly.

Let me know if this does work.

Nadiar
01-23-2005, 12:35 AM
That almost worked..

It would appear to work the first time, but then on subsequent attempts the forums would have disapeared, and I had to "Rebuild Forum Information" to get them back.

Andreas
01-23-2005, 01:12 AM
Yeah, it only worked on Forum Home in certain cases.
And there were problems with the last post information.

Try this instead:

In functions_forumlist.php FIND

if (!defined(MAXFORUMDEPTH))
{
define('MAXFORUMDEPTH', 1);
}

$forumbits = '';
$depth++;


BELOW that ADD

$forumcache[ID1] = $forumcache[ID2];
$lastpostarray[ID1] = $lastpostarray[ID2];


But rebuilding forum information should not have benn necessary, as it just overwrits this during runtime - it doesn't write the modifications back.

Nadiar
01-23-2005, 03:32 AM
Thanks a ton, that worked perfectly

Andreas
01-23-2005, 09:40 AM
Cool :)
I think i'll make a complete "Symbolic Forum Links"-Hack out of this, with possibility to define symbolic forums in ACP Forum Manager.