Customizing SMF > Mambo Bridge Support
Mambo and SSI in components again
Orstio:
--- Quote from: Prone on October 03, 2004, 10:11:16 AM ---
--- Quote from: Orstio on October 03, 2004, 06:37:16 AM ---You have to put the include in your Mambo template, before the "</head>" tag.
--- End quote ---
Well, then I have the problem that I don't have the location defined, right? I mean, it's like Javascript: defined in the <head> I still have to call it somewhere.
How do I tell the template where to display the top 10 topics?
Thanks,
Phil
--- End quote ---
You don't tell the template where to display it.
You have to include SSI.php in the <head> of the template. In order to display a certain function on the page, you'll have to create a Mambo "module" and publish it in a certain place.
Your Mambo module can be as simple as this:
--- Code: ---<?php ssi_recentTopics(); ?>
--- End code ---
You save that as a file with the prefix "mod_". (For example, mod_recent_topics.php)
In order for you to be able to publish a module, however, it needs to be registered in the database table "mos_modules". You can upload the file with FTP to your modules folder and do that with PhpMyAdmin, or you can create an XML installer file, and install the module via your Mambo control panel, which will upload the file to the correct location and add the row to the SQL database.
-Garion-:
Following Orstio's instructions, I successfully created an SMF SSI module that I've also packed with an XML file for easy installation. Just edit the php and xml files to name whatever function you want to use. Don't forget that you still have to put the include in the <head> section of index.php. If you want to code it into the template, it's relatively easy. All you should have to do is place the function where you want it to appear.
http://home.comcast.net/~silverwolf521/mod_smf_ssi.zip
Orstio:
Nice work, Garion. 8)
-Garion-:
All thanks to you. ;)
Prone:
Thanks, I never would've thought it's so easy :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version