Add Forum Discussion in news

24-07-2014, 20:10. Author: dlestarter
Home » Bullet Energy Forum » Add Forum Discussion in news
This tutorial will show you how to add "Discussion" button for discus about the news in Bullet Energy Forum, it will automatically add the the button in fullstory of your articles in main page so that users can discussion about the topic in Bullet Energy Forum, this feature will be enabled in Bullet Energy Forum Administration after modify the code.

Open the file: engine/modules/show.full.php

(DLE 10.1 only) Find:

$tpl->copy_template = preg_replace_callback ( "#\{date=(.+?)\}#i", "formdate", $tpl->copy_template );

(DLE 10.0 and older) Find:

$tpl->copy_template = preg_replace("#\{date=(.+?)\}#ie", "langdate('\\1', '{$row['date']}')", $tpl->copy_template);

Add AFTER:

  if ( $view_template != "print") {$tpl->set('{forumDiscus}', $apiBullet->setLinckDiscus(array(
    'idPost' => $row['id'],
    'id' => $row['topic_id'],
    'tree' => $category_id))) ;}
For versions below 9.7 Open File engine/engine.php in two locations

Find:

editor, reason, view_edit, tags, metatitle

REPLACE with:

editor, reason, view_edit, tags, metatitle, topic_id 


- In the template "fullstory.tpl" add the tag in the right place {forumDiscus}
- If you want to add this tag to shortstory you must follow the same steps in show.full.php above for show.short.php
Go back