News:

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

Main Menu

How do I include Global Functions

Started by Jabberwocky, February 16, 2006, 10:05:34 PM

Previous topic - Next topic

Jabberwocky

I have written a script for other forum software that required include global.php etc....

Normally I would have include or require global.php or xxxxxxx.php etc, But SMF coding has me beat ??

I've tried a few "function xxxxx.xx" options, but I would rather learn by starting with the correct example. ;)

Question:

How do I add and what do I add to the top of this script so that the javascript will parse the "img text and wrappers" into the post window ??

I've put a fair bit of script here so that it gives you a good idea of what I'm trying to do. Also I've changed the .js / .css paths to the local folder while testing this, so that's not an error. And I've also broken the [img wrappers to prevent the smilies from appearing... ;)

Quote<?

ob_start();


I NEED SOMETHING HERE ???

?>

<html>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="script.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />

<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr><td class="windowbg3">
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr>
<td class="catbg2" colspan="100%" align="center"><strong>Testing Additional Smilies</strong></td>
</tr>
<tr>
<td class="catbg2" colspan="100%"><span class="smalltext">Click a smilie to insert it into your message</span></td>
</tr>

<tr>

<td class="windowbg" align="center"><a href="javascript:void(0);" onclick="replaceText('[img http://jabberwockies.com/smilies/smiley.gif /img]', document.forms.postmodify.message); return false;"><img src="http://www.jabberwockies.com/smilies/smiley.gif" align="bottom" border="0" alt="Smiley" title="Smiley" /></a></td>
<td class="windowbg" align="center"><a href="javascript:void(0);" onclick="replaceText('[img http://jabberwockies.com/smilies/wink1.gif /img]', document.forms.postmodify.message); return false;"><img src="http://www.jabberwockies.com/smilies/wink1.gif" align="bottom" border="0" alt="Wink" title="Wink" /></a></td>
<td class="windowbg" align="center"><a href="javascript:void(0);" onclick="replaceText('[img http://jabberwockies.com/smilies/cheesy_grin.gif /img]', document.forms.postmodify.message); return false;"><img src="http://www.jabberwockies.com/smilies/cheesy_grin.gif" align="bottom" border="0" alt="Cheesy" title="Cheesy" /></a></td>

Jabberwocky

#1
Bump!

I really would appreciate some help with this, as it's a nice Mod and would be great for SMF...

I've already integrated it into the Smilie Page, and it can be integrated into SMF Themes.

Now all I need is the code that will allow the javascript to parse..... Without me having to spend a lot of time working it out.

I'm getting too old for it...  ;)

Some pics here----->>

http://jabberwockies.com/forums

Edit:

I've stopped using SMF, as I'm finding it too difficult. The above link will give access to the MOD, if anyone would like to take it and adapt it for SMF.

It is released under the GPL / GNU... ;)

Thantos


Jabberwocky

Quote from: Thantos on February 18, 2006, 11:07:55 AM
You need to include SSI.php prior to including any of the SMF source files.
http://www.simplemachines.org/community/index.php?topic=14906.0

Thanks Thantos,

I don't really want to go down another learning curve.

So I've modified my previous post and url, and anyone who would like to take it on for SMF is quite welcome to have it.  ;)

Advertisement: