Web based family history software

Question How to include forum under webtrees?

More
8 years 11 months ago #41 by Jackie
Replied by Jackie on topic How to include forum under webtrees?
Hi Morten,

Thank you for your time and efforts. I used your code modifications and they were much appreciated. :-)

Please Log in or Create an account to join the conversation.

  • morten
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #42 by morten
Replied by morten on topic How to include forum under webtrees?
You're welcome Jackie. Thanks for your new reply

Please Log in or Create an account to join the conversation.

  • morten
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago - 8 years 11 months ago #43 by morten
Replied by morten on topic How to include forum under webtrees?
As said earlier, what I also really wanted to have was a forum menu icon, link the forum directly and display it alone (and not just as one of many blocks under My page). I finally achieved to do this also, following these steps

1. Create a new file named forum.php with the following content and place it in the webtrees top directory
Code:
<?php use WT\Auth; define('WT_SCRIPT_NAME', 'forum.php'); require './includes/session.php'; $controller = new WT_Controller_Page(); $controller ->setPageTitle('Forum') ->pageHeader(); ?> <center> <iframe frameBorder="0" height="570" id ="home" onResize="resizeHandle()" onload="resizeHandle()" style="width:90%;" src="modules_v3/chatb/chat.php?name=<?php echo WT_Filter::escapeHtml(Auth::user()->getRealName()) ; ?>"></iframe> </center>

2. Within the main-menu section of header.php in your theme directory add the 5 lines in the middle below (where you like the forum menu to appear)
Code:
<ul id="main-menu" role="menubar"> . . <li id="menu-forummenu"><a href="forum.php?name=<?php echo WT_Filter::escapeHtml(Auth::user()->getRealName()); ?>">Forum</a> <ul> <li id="menu-forumpage"><a href="forum.php?name=<?php echo WT_Filter::escapeHtml(Auth::user()->getRealName()); ?>">Forum</a></li> </ul> </li> . . </ul>

3. Define desired icons for menu-forummenu (top icon) and menu-forumpage (list icon) in your theme css file

PS! There are two modules called Vytux Menu2 and Vutux Pages availiable (not installed by default) that I think can be used to add new menu items (and handle step 2 and maybe step 3 for you), but I have not tried them yet. Might be handy if you have a lot of themes installed

vytux.com/main/projects/webtrees/vytux_menu2/
vytux.com/main/projects/webtrees/vytux_pages/
Last edit: 8 years 11 months ago by morten.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}