ผม พอเข้าใจแล้วครับ
ผมลองจาก mod ชื่อ shout v1.31
ใน ไฟล์ mod ชื่อ package-info
<?xml version="1.0" ?>
<!DOCTYPE package-info (View Source for full doctype...)>
- <package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Ultimate Shoutbox</name>
<id>grudge:ultimate_shout</id>
<type>modification</type>
<version>1.31</version>
- <install>
<require-file name="shout.php" destination="$sourcedir" />
<require-file name="shout.template.php" destination="$themedir" />
<require-file name="script_shout.js" destination="$themedir" />
<require-file name="deleteshout.gif" destination="$themedir/images" />
<code type="file">shoutPdb.php</code>
- <readme type="inline">
- <![CDATA[
This allows you to put put a shoutbox on your forum, and via SSI anywhere on your web site.
It links in with your members database, and shouting can be limited to admins, members or guests.
The ultimate shoutbox was originally written by Greg Haase and was ported to SMF by Grudge
After installation you will need to add the shoutbox to your template. To do this just call the smfshout(); function
from somewhere within your template. You may need to add it as ', smfshout(), ' if you are inside an echo statement.
Example:
If you want to add the shoutbox to the LEFT of your web page, you could make the following change in index.template.php.
Find:
[code]
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
and replace with:
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr valign="top">
<td width="120">', smfshout(), '</td>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
This is just a basic example, but should be enough to get you started.
Version 1.31 adds an option not to require the email address for guests, plus adds XML refresh where supported by browsers!
IMPORTANT: if you used the shoutbox before version 1.21 you will need to setup permissions for membergroups allowed to shout!
Note that 1.22 fixes a problem with templates in 1.21
Written By Matthew Wolf (a.k.a Grudge) -
me@mattwolf.co.uk http://www.mymods.co.uk Copyright 2004 - Neither this package or any of it's contents may be distributed without authorisation
]]>
</readme>
<modification type="file" format="boardmod" reverse="false">shoutbox_v1.31.mod</modification>
</install>
- <uninstall>
<readme type="inline">Uninstall will remove all the changes made by the shoutbox. You must do this before upgrading!</readme>
<modification type="file" format="boardmod" reverse="true">shoutbox_v1.31.mod</modification>
</uninstall>
</package-info>[/code]
ผม พอเข้าใจครับว่า
ให้เปิด index.template.php
แ้ล้วหา
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
แล้วให้ใส่
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr valign="top">
<td width="120">', smfshout(), '</td>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
ลงไปแทน
แต่ปัญหาคือ ใน index.template.php ผมไม่มี
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
อะครับ