TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 17, 2024, 09:31:10 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 59
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 30
  • Total: 30

IRC Chat Mod + TP - ???

Started by courage, January 07, 2006, 01:09:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fenris_w0lf

#10
Hmmm...how about doing a nice little change in the "index.html" file and add something like:

Quote// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).
   $actionArray = array(
'activate' => array('Register.php', 'Activate'),
      'admin' => array('Admin.php', 'Admin'),
      'announce' => array('Post.php', 'AnnounceTopic'),
      'ban' => array('ManageBans.php', 'Ban'),
      'boardrecount' => array('Admin.php', 'AdminBoardRecount'),
      'buddy' => array('Subs-Members.php', 'BuddyListToggle'),
      'calendar' => array('Calendar.php', 'CalendarMain'),
      'pjirc_chat' => array('Chat.php', 'xyz'),
.
.
.
(snipped)

I dont have enough knowledge to say what 'xyz' should be. The thing tho however is that the "Chat.php" file from PJIRC only contains:

<?php
if (!defined('SMF'))
die(
'Hacking attempt...');

function 
Chat() {
global $context$settings$options;
$context['page_title'] = 'Live Chat';
loadTemplate('Chat');
}

?>


whereas the file "Chat.template.php" contains mostly all of the code for the java to load.

Anyways, adding a action like this would make it so much easier to use the admin-panel to add the PJIRC to TinyPortal without the fuzz of editing any of the Themes. Like using the menu manager:

<a href="index.php?action=forum">Forum</a>
<a href="index.php?action=profile">Profile</a>
<a href="index.php?action=calendar">Calendar</a>
<a href="index.php?action=help">Help</a>
<a href="index.php?action=search">Search</a>
<a href="index.php?action=pjirc_chat">Chat</a>


(notice the action "pjirc_chat" at the end of the code snipped above)

Or perhaps even better (?) adding it as a separate "Block" - this way one could easily adjust what Membergroups should be allowed to chat as well....

...could anyone say if this would work or not ????

fenris_w0lf