Topic: Error in my style

Hello !

My theme mik is based on Oxygen : I only modified colours and fonts.
An error message is briefly displayed after saving any page, admin side or public side.
I says :

undefined variable : tpl_main in ... style/mik/mik.pkp on line 8

What did I miss ? Can you help, please ?


http://revest.legtux.org/

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Error in my style

text style/mik/mik.pkp file?

ForkBB
I speak only Russian  :P

Re: Error in my style

I mean php : I mispelled when entering here the text of the message. The file is indeed mik.php

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Error in my style

Without code from your file you all the same can't be helped.

ForkBB
I speak only Russian  :P

Re: Error in my style

Sorry, here is the code of mik.php file, if it is what you need.

<?php

$forum_loader->add_js($base_url. '/style/mik/responsive-nav.min.js', array('weight' => 55, 'async' => false, 'group' => FORUM_JS_GROUP_SYSTEM));
$forum_loader->add_js($base_url. '/style/mik/rainbow.js', array('weight' => 55, 'async' => false, 'group' => FORUM_JS_GROUP_SYSTEM));
$forum_loader->add_js($base_url. '/style/mik/link_blank.js', array('weight' => 55, 'async' => false, 'group' => FORUM_JS_GROUP_SYSTEM));
$forum_loader->add_css($base_url.'/style/mik/mik.min.css', array('type' => 'url', 'group' => FORUM_CSS_GROUP_SYSTEM, 'media' => 'screen'));

$tpl_main = str_replace('<!-- forum_board_title -->', forum_htmlencode($forum_config['o_board_title']), $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_admin -->', $lang_common['Menu admin'], $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_profile -->', $lang_common['Menu profile'], $tpl_main);

?>
https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Error in my style

It seems that the footer is not connected in a certain file ..   it is determined that variable $tpl_main.

Re: Error in my style

As your mik.php file connected to PunBB?

ForkBB
I speak only Russian  :P

Re: Error in my style

Thanks for answering.

As your mik.php file connected to PunBB?

How should I know ? I am no coder. I tried only to modify the look.

At first, when I modified the theme, I changed colors, border, font  ... in Oxygen css file.
Then I thought that maybe the reference to Oxygen should be left. So I replaced Oxygen occurences by mik anywhere inside the theme and in the names of files and I copied an original Oxygen theme and place it near the mik package. And I chose mik in configuration.

It is the way it works in several cms that I use and I thought it could work too.

Did I miss anything ?

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Error in my style

http://punbb.informer.com/forums/post/155505/#p155505

ForkBB
I speak only Russian  :P

Re: Error in my style

Thanks for trying to help, but I do not understand what is the problem and what I must do to correct it.

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

Re: Error in my style

Replace

$tpl_main = str_replace('<!-- forum_board_title -->', forum_htmlencode($forum_config['o_board_title']), $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_admin -->', $lang_common['Menu admin'], $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_profile -->', $lang_common['Menu profile'], $tpl_main);

On

if (isset($tpl_main) )
{
  $tpl_main = str_replace('<!-- forum_board_title -->', forum_htmlencode($forum_config['o_board_title']), $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_admin -->', $lang_common['Menu admin'], $tpl_main);
$tpl_main = str_replace('<!-- forum_lang_menu_profile -->', $lang_common['Menu profile'], $tpl_main);
}

then the error will disappear, but you should find the source of the problem.

Re: Error in my style

Replacing fragment of code will help

Re: Error in my style

What do you mean by color correction and fauna? In Word or Photoshop Or Not On The Web?