https://www.icyphoenix.com/viewtopic.php?f=35&t=4094
-----------------------------------
gearhead
Sun 20 Apr, 2008 20:12

[solved] Cloning Black Pearl Or...
-----------------------------------
Luca being kind enough to listen to my request, asked me to post this in General Support:

First for those who can help, here are my server settings:

[quote]
Version of Icy Phoenix:  1.2.0.27  Version of phpBB:  	2.0.23
Version of PHP: 5.2.3 	Version of MySQL: 5.0.24a-standard-log
Board started: 	May 22 2007, 07:02 PM 	[/quote]

My question is: How many files do I need to alter and call out the file name, etc, of my new colorized template to make it work as a separate template file so my users can switch basically to another template file.

I have 2 Black Pearl "Colorized" templates which I want to make them individual selectable templates for my users. I know I am right on the verge of making this happen, but maybe didn't do the final step somewhere. 

What I have done so far is: 
1. Upload the colorized files in the mg_themes folder, using of course a different name. i.e, "p_black_green"
2. Added the name to the file mg_themes.cfg. like this:

[spoiler]// Valid Colors - BEGIN
$colors = array(
	'black',
	'black_yellow',
	'blue',
	'cis',
	'cyan',
	'dark_blue',
	'dark_green',
	'dark_red',
	'gray',
	'green',
	'ice',
	'lite_blue',
	'm_blue',
	'm_green',
	'm_red',
	'orange',
	'p_black',
	'p_blue',
	'sblue',
	'sgreen',
	'silver',
	'text',
	'violet',
	'white',
	'yellow',
       'p_black_green',
);
// Valid Colors - END
[/spoiler]

And in these 2 places:

[spoiler]
// Table Headers Colors - BEGIN
$squared_colors = array(
	'gray',
	'ice',
	'p_black',
	'p_blue',
	'white',
      'p_black_green',
);

$morpheus_colors = array(
	'm_blue',
	'm_green',
	'm_red',
);
// Table Headers Colors - END

// TPL (overall_header and overall_footer suffix) Colors - BEGIN
$tpl_colors_extension = array(
	'blue' => '_mg',
	'dark_blue' => '_sc',
	'green' => '_mg',
	'm_blue' => '_mx',
	'm_green' => '_mx',
	'm_red' => '_mx',
	'orange' => '_mg',
	'p_black' => '_bl',
	'p_blue' => '_bl',
	'silver' => '_ss',
	'yellow' => '_mg',
      'p_black_green' => '_mg',
);
// TPL (overall_header and overall_footer suffix) Colors - END
[/spoiler]

I also added the filenames to the theme_info.cfg file as follows:
[spoiler]
if (file_exists('../templates/mg_themes/images/p_black'))
{
	$tc++;
	$mg_themes[$tc]['template_name'] = 'mg_themes';
	$mg_themes[$tc]['style_name'] = 'p_black_green';
	$mg_themes[$tc]['head_stylesheet'] = 'style_p_black_green.css';
	$mg_themes[$tc]['body_background'] = 'p_black';
	$mg_themes[$tc]['body_bgcolor'] = '';
	$mg_themes[$tc]['body_text'] = '';
	$mg_themes[$tc]['body_link'] = '';
	$mg_themes[$tc]['body_vlink'] = '';
	$mg_themes[$tc]['body_alink'] = '';
	$mg_themes[$tc]['body_hlink'] = '';
	$mg_themes[$tc]['tr_color1'] = '';
	$mg_themes[$tc]['tr_color2'] = '';
	$mg_themes[$tc]['tr_color3'] = '';
	$mg_themes[$tc]['tr_class1'] = '';
	$mg_themes[$tc]['tr_class2'] = '';
	$mg_themes[$tc]['tr_class3'] = '';
	$mg_themes[$tc]['th_color1'] = '';
	$mg_themes[$tc]['th_color2'] = '';
	$mg_themes[$tc]['th_color3'] = '';
	$mg_themes[$tc]['th_class1'] = '';
	$mg_themes[$tc]['th_class2'] = '';
	$mg_themes[$tc]['th_class3'] = '';
	$mg_themes[$tc]['td_color1'] = '';
	$mg_themes[$tc]['td_color2'] = '';
	$mg_themes[$tc]['td_color3'] = '';
	$mg_themes[$tc]['td_class1'] = 'row1';
	$mg_themes[$tc]['td_class2'] = 'row2';
	$mg_themes[$tc]['td_class3'] = 'row3';
	$mg_themes[$tc]['fontface1'] = '';
	$mg_themes[$tc]['fontface2'] = '';
	$mg_themes[$tc]['fontface3'] = '';
	$mg_themes[$tc]['fontsize1'] = '10';
	$mg_themes[$tc]['fontsize2'] = '11';
	$mg_themes[$tc]['fontsize3'] = '12';
	$mg_themes[$tc]['fontcolor1'] = '';
	$mg_themes[$tc]['fontcolor2'] = 'AF23BA';
	$mg_themes[$tc]['fontcolor3'] = 'B925DA';
	$mg_themes[$tc]['span_class1'] = '';
	$mg_themes[$tc]['span_class2'] = '';
	$mg_themes[$tc]['span_class3'] = '';
	$mg_themes[$tc]['img_size_poll'] = '0';
	$mg_themes[$tc]['img_size_privmsg'] = '0';
}
[/spoiler]

Maybe my mistake is not to alter the font color 2 and three? Or another file needs updating?

Thanks in advance 

 [img]http://www.icyphoenix.com/images/smiles/thx.gif[/img]


-----------------------------------
gearhead
Mon 21 Apr, 2008 05:43

Re: [solved] Cloning Black Pearl Or...
-----------------------------------
Well, after much of the day, I finally figured it out.

This one I did just after my topic started:

I edited the image folder addresses in the .css file to the name of the template folder. 

Well, that got me really far!!! I had it then!!

OOOPS. Everything was fine until viewing the forums. 
The viewforum template file that tells the icons to revert to .png images was missing.

Seems like I had one more file to edit.

If you are making another Pearl style but "colorized", the last step before completing the task is to re-open the mg_themes.cfg and look further down for this:

on the line where  MG "smart tables" are,  add your template file name EXACTLY how it should be:

[spoiler]

if( ($color == 'p_black') || ($color == 'p_blue') || ($color == 'p_black_green') )
{
	$buttons_extension = 'png';
	$extra_padding = '" style="margin-bottom:2px;';
}
[/spoiler]

I added the 3rd part to the php tag;  ($color == 'p_black_green') , which is the name of my template.

That's it. It works perfectly now.

 :mrblue:


-----------------------------------
Lopalong
Mon 21 Apr, 2008 10:26

Re: [solved] Cloning Black Pearl Or...
-----------------------------------
:)

I'm glad you worked it out, but you also need to add the header and the footer in the same syntax to xs.cfg particularly if you have re-named the style - and the overall_*.tpl's etc.

Off-Topic:

Now you need to sort out youtube ?

;)


-----------------------------------
gearhead
Mon 21 Apr, 2008 16:01

Re: [solved] Cloning Black Pearl Or...
-----------------------------------
[quote user="Lopalong" post="27946"]:)

I'm glad you worked it out, but you also need to add the header and the footer in the same syntax to xs.cfg particularly if you have re-named the style - and the overall_*.tpl's etc.

Off-Topic:

Now you need to sort out youtube ?

;)[/quote]

Thanks for the help. Can you "spoil" me an example of where to edit? I'm sure when I have time, I'll figure it out, if your too busy.

On You tube; I am going to tinker with that today to see if I can get it working. The only other problem is not with bbcode in general, but with bbcode images. I just get the "no image" icon after the IP 1.2.0.27 update.

 :mrblue:


-----------------------------------
Lopalong
Mon 21 Apr, 2008 21:52

Re: [solved] Cloning Black Pearl Or...
-----------------------------------
Open: /your theme/xs.cfg (The same place you have the overall_*.tpl files) and add the following. 
You'll see where to add it as soon as you open the file. ;)

[code linenumbers=false]	$replace['overall_header_p_black_green.tpl'] = 'lofi/' . $lofi_bots_path . 'lofi_' . $lofi_bots_suffix . 'header.tpl';
	$replace['overall_footer_p_black_green.tpl'] = 'lofi/' . $lofi_bots_path . 'lofi_' . $lofi_bots_suffix . 'footer.tpl';[/code]

Start your youtube Q in another thread. ;)


-----------------------------------
gearhead
Tue 22 Apr, 2008 04:28

Re: [solved] Cloning Black Pearl Or...
-----------------------------------
Thanks a million. I am going to fix that straight away.

Oh, the You Tube embed works great with the newest IP!!!!

Still having issues with the "no image" icon with BBcodes, and have posted a new request for help about it.

Thanks again.....

 :mrblue:


