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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 300
  • Total: 300

Creating a Custom Who's Online Action

Started by technodragon73, March 22, 2006, 01:58:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

technodragon73

Quote
The reason I ask...is some of the files in question have two pars...a file.php and a file.template.php

you got me while i was editing

ontap


its the file.php that goes into "Sources"

technodragon73

Quote from: OnTapÂÃ,© on March 22, 2006, 02:53:37 PM

its the file.php that goes into "Sources"

ok, if that is the case...then here is the entire code from that file:
<?php
if (!defined('SMF'))
die('Hacking attempt...');

function
logd() {
// This is gonna be needed...
loadTemplate('logd');
}
?>

ontap

Quote from: technodragon73 on March 22, 2006, 03:08:29 PM
<?php
if (!defined('SMF'))
die('Hacking attempt...');

function
logd() {
// This is gonna be needed...
loadTemplate('logd');
}
?>


It Would go something like below.


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

function
logd() {
global
$context;
$context['linktree'][] = array('url' => '?action=logd', 'name' => 'logd');
$context['page_title'] = 'Forum Title - logd';
// This is gonna be needed...
loadTemplate('logd');
}
?>

technodragon73

Actually...I kept toying with it...I needed to put it into the template file not the source file

here is what I put:
//Show this page in the linktree?
$context['page_title'] = "Legend of the Green Dragon"; // Set title
$context['linktree'][]['url'] = "{$scripturl}?action=logd"; // Add Legend of the Green Dragon to linktree
$context['linktree'][count($context['linktree']) - 1]['name'] = "Legend of the Green Dragon";


Works perfectly...Thank you guys for your help...most of the time if someone just points me in right direction I can get it figured out myself...you both did that very well...again thank you!

This website is proudly hosted on Crocweb Cloud Website Hosting.