https://www.icyphoenix.com/viewtopic.php?f=21&t=2160
-----------------------------------
Mighty Gorgon
Wed 30 May, 2007 12:10

Rules For Adding Customizations
-----------------------------------
Hi all.

Here you will find just few rules for adding/creating customizations for Icy Phoenix.

[list][*]The first rule is KIS: Keep It Simple. This means that you should add files in the easiest way for the users to install it. If the mod is few line changes, provide a code changes to the mod installation instructions.
[*]Premodded package. If the mod you are installing is quite big, you may be tempted to provide a premodded package. In this case please make sure that the premodded package is based on a clean installation.
[*]PHP and phpBB Skills. Please note that Icy Phoenix code is different in some core files from the phpBB code. This means that you should really pay attention when integrating a mod and doing it properly may require time. Many vars are differently named, and the cache system requires sometimes extra tweaks.
[*]Security. If a mod is not integrated properly it may leads to a security issue as well. Please submit mods for validations to someone of the Staff or to me before posting them in public fourm.
[*]Testing. Mods included should be tested on a clean installation. For big modifications, a test site with a test account should be preferred.[/list]

That's all for now...

Please note that this not mean that you don't have to contribute with your mods on Icy Phoenix... it simply means that you should consider doing it properly, otherwise some users may have problems with the modifications provided, and in some cases they can hang their sites.

Thank you for your contributions.

Regards,
Luca


-----------------------------------
Zuker
Wed 30 May, 2007 13:44

Re: Rules For Adding Customizations
-----------------------------------
This is 90% refered to what i did so i'll consider it :?


-----------------------------------
Mighty Gorgon
Wed 30 May, 2007 16:09

Re: Rules For Adding Customizations
-----------------------------------
[quote user="Zuker" post="15652"]This is 90% refered to what i did so i'll consider it :?[/quote]
No Zuker, don't take it personally.

There wasn't any rule for Icy Phoenix Customizations, and I think that time has come to write some general guidelines to save our time in supporting and users time in trying to solve problems.

For example if a mod requires 10 minutes to be integrated in phpBB, it may require 2 hours to be integrated properly on Icy Phoenix. If it isn't done properly, and let's suppose than 10 users install it, then we are facing a big problem. The Staff needs then to work to fix the problem, and the users needs to apply the patch when it is released. This is a huge time waste for everybody. It is better work a bit more before releasing the customization and having tested it, making sure to have minimized (we cannot ever assure that the code is bug-free!) the risk of malfunctions.

Now we have a rule, and we should try to do our best to give users the best software, assistance and support they need... while trying to preserve our free time for doing better things than coding... I think you all may agree... :wink:


-----------------------------------
Zuker
Wed 30 May, 2007 22:05

Re: Rules For Adding Customizations
-----------------------------------
I didn't say i wasn't agree ;)
I'm agree  :mryellow:


-----------------------------------
KugeLSichA
Fri 01 Jun, 2007 22:18

Re: Rules For Adding Customizations
-----------------------------------
i understand Luca and i agree with him...

all Mods that i ported to IP i try to do it so clean as possible. and as Luca said, sometimes i takes more time to integrate them...

In the next dayys i try to post here some of my addons that i integrated in IP... stay tuned

greetz


-----------------------------------
Lopalong
Tue 06 Jan, 2009 06:12

Re: Rules For Adding Customizations
-----------------------------------
Would this style of change make it easier for users to add mods to their sites - as no-one has said it must be in the old phpBB format ? ;)

Everything possible is now in:

[b]root/mods/this mod/acp - /tpl whatever[/b]

Code and template entries are also now their own files, called with include etc.  :chef:

[spoiler][code linenumbers=false]	Package Icy Phoenix Modifications
	File $Id: install_ACP_Announcement_Centre_En.txt
	Version for Icy Phoenix: 0.0.1
	Author: lefty74 < lefty@lefty74.com > (Heiko Carstens) http://www.lefty74.com
	Copyright (c) 2008 lefty74
	Email lefty@lefty74.com
	License http://opensource.org/licenses/gpl-license.php GNU Public License

	Extra credits for this file:
		Modified for Icy Phoenix by Lopalong. < lopalong@iinet.net.au > 01 January 2009

	Title:
	ACP Site Announcement Centre

	Description:
		Adds a site announcement box to the top of your forums that can be edited easily in the admin panel.
		You can preview it before posting and BBCode and smilies are supported.
		Latest or First post of either a forum or topic can be chosen for announcements as well.
		Admin can choose who should see the Site Announcements (All, Registered, Mods, Admin only).
		Separate announcements for guests only can be shown

	Files To Edit: 4
		common.php
		forum.php
		includes/constants.php
		templates/default/index_body.tpl

	Included Files: 2
		adm/admin_announcement_centre.php
		language/lang_english/lang_extend_acp_site_announcement_centre.php

	Included Folders: *.*
		root/mods/*.*

	Disclaimer:
		There is no guarantee that there are no security problems within the MOD.

	Comments:
	Author Notes: (lefty74)
		This mod was initially based on the News Block Mod v.1.0.4 and improved up to v1.3.1 by me
		The original author dannyscats has decided to continue to develop his mod from his old version v1.0.4
		so I am releasing this mod on its own since I do not want to downgrade back to 1.0.4
		Thanks to dannyscats for the original idea of this Mod

		 Please note that I had to give up on the direct preview function as it failed the validation and I could not find the fix for it.

	WARNING - WARNING - WARNING:
		Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 

#
#-----[ BEGIN MODIFICATION ]------------------------------------------
#

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE `ip_announcement_centre` (
  `announcement_desc` varchar(255) NOT NULL default '',
  `announcement_value` text NOT NULL,
  PRIMARY KEY  (`announcement_desc`));
  
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_text', '[size=18][color=red][b]Change your announcements via your admin panel. :) [/b][/color][/size]'); 
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_status', '1');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_access', '1');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_text', '[size=18][color=blue][b]Change your guest announcements via your admin panel. :) [/b][/color][/size]'); 
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_status', '1');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_text_draft', '[size=18][color=red][b]Preview in the ACP :) [/b][/color][/size]'); 
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_mod_version', 'v1.2.3');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_forum_id', '');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_topic_id', '');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_forum_topic_first_latest', '1');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_title', 'Site Announcements');
INSERT INTO ip_announcement_centre (announcement_desc, announcement_value) VALUES('announcement_guest_title', 'Guest Announcements');


#
#-----[ COPY ]------------------------------------------
#

root/mods/*.* folder to root/mods/*.*
#
#-----[ OPEN ]------------------------------------------
#
common.php

#
#-----[ FIND ]------------------------------------------
#

$board_config = array();

#
#-----[ AFTER, ADD ]------------------------------------------
#

$announcement_centre_config = array();

#
#-----[ FIND ]------------------------------------------
#

// Setup forum wide options, if this fails then we output a CRITICAL_ERROR since basic forum information is not available

#
#-----[ AFTER, ADD ]------------------------------------------
#

include($phpbb_root_path . '/mods/announcement_centre/' . 'common.' . $phpEx);

#
#-----[ OPEN ]------------------------------------------
#
forum.php

#
#-----[ FIND ]------------------------------------------
#

include($phpbb_root_path . 'common.' . $phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#

include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

#
#-----[ FIND ]------------------------------------------
#

	// Last Visit - BEGIN

#
#-----[ BEFORE, ADD ]------------------------------------------
#

include($phpbb_root_path . '/mods/announcement_centre/' . 'forum_a.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#

$template->assign_vars(array(
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),

#
#-----[ BEFORE, ADD ]------------------------------------------
#

include($phpbb_root_path . '/mods/announcement_centre/' . 'forum_b.' . $phpEx);

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#

define('AJAX_TOPIC_MOVE', 17);
// Ajaxed - END

#
#-----[ AFTER, ADD ]------------------------------------------
#

include($phpbb_root_path . '/mods/announcement_centre/' . 'constants.' . $phpEx);

#
#-----[ OPEN ]------------------------------------------
#
templates/mg_themes/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#

<div class="forumline nav-div">
	<p class="nav-header">
#
#-----[ BEFORE, ADD ]------------------------------------------
#

<!-- INCLUDE ../../mods/announcement_centre/tpl/announcement_centre.tpl -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

 [/code][/spoiler]

I think it's secure? Lol!


-----------------------------------
Mighty Gorgon
Sat 17 Jan, 2009 12:55

Re: Rules For Adding Customizations
-----------------------------------
Yes, it should be fine. :wink:


-----------------------------------
Lopalong
Sat 17 Jan, 2009 21:18

Re: Rules For Adding Customizations
-----------------------------------
When the next release of IP is public, I'll release 6 "Beta" mods with the new file structure for testing. Not everything can be crammed into one mod folder as you would be aware of, but whatever can be, has been moved and re-scripted. ;)


