I removed some bugs of cubson and updated it. You can get version 0.43 from download page of this site.
Well, let’s restart developing myannounce module. We have developed the control panel functions of myannounce module before now. In today’s entry, we will complete public functions.
Before that, we should confirm public functions of this module. What feature does myannounce module have?
- First, only administrators can register messages in the control panel.
- Second, users can access the list of messages and the content of messages.
Therefore, edit function and delete function are unnecessary in the public side. You should delete files about edit function and delete function because wizard command generates many files that is used by four kinds of actions. Type the following on cubson console:
cubson> wizard message
Next, open xoops_vesrion.php that lists up the name of template files you removed, remove those files, and edit subscript numbers. myannounce_message_edit.html and myannounce_message_delete.html are unnecessary. If you don’t edit it, the information of this modules continues keeping names of removed files, and triggers troubles sometime. The following is right code:
// Templates. You must never change [cubson] chunk to get the help of cubson.
//$modversion[‘templates’][‘file’] = ‘myannounce’_xxxxx.html’;
//$modversion[‘templates’][‘description’] = ‘myannounce’_xxxxx.html’;
$modversion[‘templates’][‘file’] = ‘myannounce_message_list.html’;
$modversion[‘templates’][‘file’] = ‘myannounce_message_view.html’;
Update module in the controll panel to load templates. Finally, you have to rewrite index.php as well as index.php of the controll panel that you modified in yesterday’s entry. Open index.php and replace “Default” with “MessageList”.
Ok, public functions have just completed. Access to it, and test it. But this is no end. We should continue tuning.