Why is my js not loaded?

Dominik L Posted in Technical Support 11 months ago

Hi!

I created an ossn_com.php with this code:

<?php
/**
 * Open Source Social Network
 *
 * @package   Dominik Lieger
 * @author    Dominik Lieger
 * @license   GPL v2 https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * @link https://www.example.com
 */

// Direktes JS testweise einfügen
function login_rearr() {
    ossn_extend_view("css/ossn.default", "css/login_rearr");
    ossn_extend_view("css/ossn.default", "css/footer");
    ossn_extend_view("css/ossn.default", "css/loginform");

    if (!ossn_isLoggedin()) {
        ossn_extend_view("js/ossn.site", "js/footer"); // ← richtig hier
    }
}
ossn_register_callback("ossn", "init", "login_rearr");

and then under /LoginRearrange/plugins/default/js/footer.php a js

the first line is "console.log('[LoginRearrange] Footer-JS is active');"

The js is not loaded, i am not logged in

what am I missing?

Replies
German Dominik L Replied 11 months ago

I changed

js/ossn.site to 'js/opensource.socialnetwork' and then it worked

Indonesian Arsalan Shah Replied 11 months ago

What was the issue?

German Dominik L Replied 11 months ago

I found the issue, neevrmind