The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Trying to Create New Module - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Trying to Create New Module (/showthread.php?tid=10943)



Trying to Create New Module - grahame - Dec 30th, 2015

Hi

I have downloaded the Hello World in an effort to teach myself how to create a new module.

I have failed at the first hurdle simply trying to add an external link to a css file! I placed the link in the Hello World index.php but the page now fails to load.

<link rel="stylesheet" href="dist/style.min.css" />

(I have added a dist sub folder to the hello_world folder)

I have ploughed thru' a ton of code but I just cannot figure out where I should put my external links.

Can you advise please?

Thanks


RE: Trying to Create New Module - grahame - Dec 31st, 2015

(Dec 30th, 2015, 2:16 PM)grahame Wrote: Hi

I have downloaded the Hello World in an effort to teach myself how to create a new module.

I have failed at the first hurdle simply trying to add an external link to a css file! I placed the link in the Hello World index.php but the page now fails to load.

<link rel="stylesheet" href="dist/style.min.css" />

(I have added a dist sub folder to the hello_world folder)

I have ploughed thru' a ton of code but I just cannot figure out where I should put my external links.

Can you advise please?

Thanks

Hi

Ok I have figured this out.

For anyone else out there this is how I got it working. I placed the external links to javascript and css in the actual index.tpl file rather then the index.php file. You also have to wrap these links (and indeed javascript itself for that matter) in {literal}{/literal} tags so:-

{literal}
<link rel="stylesheet" href="dist/style.min.css" />
{/literal}

I gather that the Smarty engine ignores anything encased in {literals}.

Hope that helps someone.