1
ejuden01
XOOPS 2.2 default theme and xHelp
  • 2005/8/30 20:18

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


Hello theme designers! I have a question about the default XOOPS 2.2 theme while using xhelp.

We have been working on custom fields for xHelp for a while now, and it was working fine in 2.0.13. When we test under 2.2 with the default theme we are experiencing some problems with the javascript.

I have figured out that the problem is because of this line in theme.html (should be line 28):
<script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js">script>


We have some javascript functions to change the custom fields depending on what department you have selected.

Before you change the department here is what you have:
Resized Image

After you change the department, here is what you have:
Resized Image

I removed the script line from theme.html and it seemed to run fine without it, but I didn't test it very hard. Is this line something that MUST be included, or was it a mistake to have it in there?

This also happens in other XOOPS 2.2 themes, because they have the same line in theme.html.

Let me know if I should move this discussion somewhere else.

Thanks.
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

2
ejuden01
Re: XOOPS 2.2 default theme and xHelp
  • 2005/8/31 14:17

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


bump...
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

3
Mithrandir
Re: XOOPS 2.2 default theme and xHelp

Hmmm...

A conflict of javascript function names?
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

4
ejuden01
Re: XOOPS 2.2 default theme and xHelp
  • 2005/8/31 14:21

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


hmmm...good possibility. I'll take a look and respond back on here. ;)
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

5
ejuden01
Re: XOOPS 2.2 default theme and xHelp
  • 2005/8/31 14:28

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


Most of the functions we created are prefixed with 'xhelp'. There are a few functions, cE(), gE(), isArray(), and selectAll() that do not have the prefix on them.

I'm going to try changing those 4 with the prefix on them and see what happens.
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

6
Mithrandir
Re: XOOPS 2.2 default theme and xHelp

It seems that you are getting something out of
/* Check whether array contains given string */
if (typeof Array.prototype.contains == "undefined") {
    Array.
prototype.contains = function(s) {
        for (var 
0this.lengthi++) {
            if (
this[i] === s) { return true; }
        }
        return 
false;
    }
}

/* Get the last element from the array */
if (typeof Array.prototype.getLast == "undefined") {
    Array.
prototype.getLast = function() {
        return 
this[this.length-1];
    }
}

/* Counts the number of substring occurrences */
if (typeof String.prototype.substrCount == "undefined") {
    
String.prototype.substrCount = function(s) {
        return 
this.split(s).length 1;
    }
}

which is at the bottom of the adminmenu.js file... That is not within a function or class.

Is this something that Ralf should look at for the theme? I think it's pretty standard mygosuMenu JS code...
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

7
ejuden01
Re: XOOPS 2.2 default theme and xHelp
  • 2005/8/31 14:35

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


I guess what I'm asking, "Is adminmenu.js really needed for the front-side of the theme?"
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

8
Mithrandir
Re: XOOPS 2.2 default theme and xHelp

not needed as such - although there is a User Menu replacement drop-down that some might like.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

9
ejuden01
Re: XOOPS 2.2 default theme and xHelp
  • 2005/8/31 14:39

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


Okay, so it does have a purpose. Thanks for your help Mithrandir!
A Life? Cool! Where can I download one of those from?

xhelp | sstatus

Login

Who's Online

388 user(s) are online (298 user(s) are browsing Support Forums)


Members: 0


Guests: 388


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits