Add a Function to your Website: Difference between revisions From Online Manual

Jump to: navigation, search
m (2 revisions: Importing from local.)
No edit summary
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
To add information to your website, first load up either of the examples below depending on your website page extension:
To [[:Category:SSI|add information]] to your website, first load up either of the examples below depending on your website page extension:


<ul class="bbc_list"><li type="disc">http://www.simplemachines.org/community/ssi_examples.php for *.php web pages.</li><li type="disc">http://www.simplemachines.org/community/ssi_examples.shtml for *.shtml web pages. </li></ul>
*http://www.simplemachines.org/community/ssi_examples.php for *.php web pages.
*http://www.simplemachines.org/community/ssi_examples.shtml for *.shtml web pages.


Locate the function you wish to add to your website page from the list of examples and take the code it lists for the function, our example uses the Recent Topics Function:
Locate the function you wish to add to your website page from the list of examples and take the code it lists for the function, our example uses the Recent Topics Function:
 
{{code|1=<?php
<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php&nbsp;ssi_recentTopics</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">?&gt;</span></span></code>
require_once('your/path/to/forum/SSI.php');
ssi_recentTopics();  
?>}}
Above code is for *.php pages, but for for *.shtml the same function equivalent is:
Above code is for *.php pages, but for for *.shtml the same function equivalent is:
{{code|1=<nowiki><!--#include virtual="./SSI.php?ssi_function=recentTopics" --></nowiki>}}
Now add that line of code in an html view of your page where you wish the information to be located. Repeat with other functions you wish to add. Once uploaded to your website you should see the information on your website.


<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&lt;!--#include virtual=&quot;./SSI.php?ssi_function=recentTopics&quot; --&gt;</code>
[[Category:Developing SMF]]
Now add that line of code in an html view of your page where you wish the information to be located. Repeat with other functions you wish to add. Once uploaded to your website you should see the information on your website.
[[Category:Customizing SMF]]
[[Category:Integrating SMF]]
[[Category:SSI]]

Latest revision as of 13:54, 16 December 2020

To add information to your website, first load up either of the examples below depending on your website page extension:

Locate the function you wish to add to your website page from the list of examples and take the code it lists for the function, our example uses the Recent Topics Function:

<?php 
require_once('your/path/to/forum/SSI.php');
ssi_recentTopics(); 
?>

Above code is for *.php pages, but for for *.shtml the same function equivalent is:

<!--#include virtual="./SSI.php?ssi_function=recentTopics" -->

Now add that line of code in an html view of your page where you wish the information to be located. Repeat with other functions you wish to add. Once uploaded to your website you should see the information on your website.



Advertisement: