Created
March 21, 2013 15:09
-
-
Save imagehat/5213767 to your computer and use it in GitHub Desktop.
EE forum module hack to add forum_id variable to exp:forum:topic_titles for linking to individual topics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In mod.forum_core.php around line 11003 find: | |
// Single Variables | |
foreach ($this->EE->TMPL->var_single as $key => $val) | |
{ | |
// parse {post_total} | |
if ($key == 'post_total') | |
{ | |
$tagdata = $this->EE->TMPL->swap_var_single($key, $row['thread_total'], $tagdata); | |
} | |
and change to: | |
// Single Variables | |
foreach ($this->EE->TMPL->var_single as $key => $val) | |
{ | |
// @hack @mk added: | |
// parse {forum_id} | |
if ($key == 'forum_id') | |
{ | |
$tagdata = $this->EE->TMPL->swap_var_single($key, $row['forum_id'], $tagdata); | |
} | |
// END @hack | |
// parse {post_total} | |
if ($key == 'post_total') | |
{ | |
$tagdata = $this->EE->TMPL->swap_var_single($key, $row['thread_total'], $tagdata); | |
} | |
------ | |
this allows something like this in the template: | |
{path=forums/viewforum/{forum_id}/} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment