Items:Display Message
From SMFShopWiki
| Display Message | |
| Latest Item Version: | 0.1 |
|---|---|
| SMFShop Version Required: | Any |
| PHP Version Required: | Any |
| MySQL Version Required: | Any |
This is a very simple item for displaying a message. When you add it to your shop, it will ask you what message to use. Then, when someone purchases and uses the item, it will show them the message that you specified
Note that this item is untested, a much better version (that uses the BBCode editor, and parses BBCode) will come soon!
<?php /**********************************************\ | SMFSHOP (Shop MOD for Simple Machines Forum) | | (c) 2007 DanSoft Australia | | http://www.dansoftaustralia.net/ | \**********************************************/ //File: DisplayMessage.php // Item - Display a message when used // VERSION: Not included in SMFShop yet class item_DisplayMessage extends itemTemplate { function getItemDetails() { $this->authorName = "Daniel15"; $this->authorWeb = "http://www.dansoftaustralia.net/"; $this->authorEmail = "dansoft@dansoftaustralia.net"; $this->name = "Display Message"; $this->desc = "Display an admin-defined message to user. You can choose what message to display"; $this->price = 50; $this->require_input = false; $this->can_use_item = true; } function getAddInput() { return ' Message to show user (you may use HTML here): <textarea name="info1" rows="15" style="width: 100%"></textarea>'; } function onUse() { global $item_info; // This is very simple :-) return $item_info[1]; } } ?>
