The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
PROBLEM How to include .js in Cardinal Theme? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Themes (http://get-simple.info/forums/forumdisplay.php?fid=10)
+--- Thread: PROBLEM How to include .js in Cardinal Theme? (/showthread.php?tid=6997)



How to include .js in Cardinal Theme? - gordan - 2014-12-29

I'm trying to include, i.e. fetch two .js in Cardinal Theme because of making a responsive menu. I've put the two rows at the end of template.php before </body> tag, but I can't get script to load (work):

Code:
<script src="<?php get_theme_url(); ?>/js/jquery-1.7.2.min.js"></script>    
<script src="<?php get_theme_url(); ?>/js/script.js"></script>

Is there a trick or do something wrong?

Thnx!


RE: How to include .js in Cardinal Theme? - gordan - 2014-12-29

Also, I've just find a solution... The js include code is correct, but it must be written before the last part of code in template.php, ... see below (I still don't know why, what's the reason?):

Code:
    <div id="sidebar">
        <div class="section">
            <?php get_i18n_component('sidebar');    ?>
        </div>
        <div class="section credits">
            <p><?php echo date('Y'); ?> - <strong><?php get_site_name(); ?></strong></p>
            <p>
                Cardinal Theme by <a href="http://www.cagintranet.com" >Cagintranet</a><br />
                <?php get_site_credits(); ?>
            </p>
        </div>
    </div>



RE: How to include .js in Cardinal Theme? - vallhund - 2014-12-31

(2014-12-29, 10:42:49)gordan Wrote: I'm trying to include, i.e. fetch two .js in Cardinal Theme because of making a responsive menu. I've put the two rows at the end of template.php before </body> tag, but I can't get script to load (work):

Code:
<script src="<?php get_theme_url(); ?>/js/jquery-1.7.2.min.js"></script>    
<script src="<?php get_theme_url(); ?>/js/script.js"></script>

Is there a trick or do something wrong?

Thnx!

these lines seem okay.
the problem may be with the paths (the scripts in must be '/themes/Cardinal/js/'), or there might be some javascript error (check the console log)


RE: How to include .js in Cardinal Theme? - xxdex - 2014-12-31

maybe you have a .htaccess file in folder with
"Denny from all" if yes.. change it for "Allow from all"

maybe the selected theme is not a cardinal theme.. if yes.. try do it from
<script src="<?php get_theme_url(); ?>/js/jquery-1.7.2.min.js"></script>
to:
<script src="<?php get_site_url(); ?>themes/Cardinal/js/jquery-1.7.2.min.js"></script>


RE: How to include .js in Cardinal Theme? - gordan - 2015-01-04

Thank you for the response... it was problem in sidebar content.