News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Code for pastey.

Started by Crasy, September 10, 2008, 09:14:33 PM

Previous topic - Next topic

Crasy

A continuation of a discussion on IRC....
Using the forums here for a code dump.

I am trying to create a custom page without using a mod. I failed pretty miserably.
I got this far
http://redmilkcrate.com/forum/index.php?action=chat

Nathaniel

#1
Really you should actually post about what you need here, but anyway...  ;)

1. Add the custom action to the index.php file. Make sure that the function is set to 'chat' and the filename to 'chat.php'.
2. Put some code like this in your chat.php file.
if(!defined('SMF'))
    die('HACKERS?!?!?');

function chat()
{
    //Load the chat template
    loadtemplate('chat');
}

3. Create a chat.template.php file in your '/themes/default/' folder. And then add some code like this:

function template_main()
{
    echo 'html code';
}

SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Crasy

Hm, yes, thank you LHVWB.

You're right, this is much easier in a post.

Advertisement: