Page 1 of 1

Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 7:33 pm
by Brummnix
Hallo zusammen,

ich habe meine Webseite von CMSMS Version 1.9.4.3 auf Version 1.10.3 upgraded und natürlich auch die Module auf den aktuellen Stand gebracht.

Nun habe ich jedoch mit dem Modul Album in der Version 1.10-beta2 ein Problem in der Art, das Java-Script nit im Quelltext eingebunden wird.
In der neuen Album-Version gibt es zu jedem Album-Template ein Metadata, dort steht das einzufügende JS drin und auf der Bewseite, die das Album anzeigen soll, wird in den Optionen beim metadata {Album action='metadata'} eingefügt. Beides ist vorhanden bzw. habe ich eingefügt.

Testweise habe ich ein CMSMS mit dem Modul Album in den oben genannten Versionen komplett neu installiert und dort funktioniert alles wie gewünscht - das JS ist im HTML-Quellcode vorhanden.

Wo könnte mein Problem liegen, dass auf meiner normalen Seite http://www.mv-worblingen.de das JS nicht im HTML-Quellcode eingesetzt wird?

Danke ???

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 7:39 pm
by Jos
Hast du die {metadata} tag im Seiten Template? (zwischen <head> und </head>)

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 7:43 pm
by Dr.CSS
It looks like you got the stylesheet for Album to show up, you might need to add {Album action='metadata'} to the metadata of the page to get the JS to work...

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 7:59 pm
by Brummnix
Jos wrote:Hast du die {metadata} tag im Seiten Template? (zwischen <head> und </head>)
Ja, im Seiten-Template habe ich {metadata} drin:

Code: Select all

{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
{* Change lang="en" to the language of your site *}

<head>
<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{if false !== $smarty.server.HTTP_USER_AGENT|lower|strpos:'iphone'}
    <meta name=”viewport” content=”width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;”/>

    {cms_stylesheet}
    {stylesheet name='iPhonee' media='screen'}
{else}
	{cms_stylesheet}
	{* This is how all the stylesheets attached to this template are linked to *}
{/if}
Dr.CSS wrote:It looks like you got the stylesheet for Album to show up, you might need to add {Album action='metadata'} to the metadata of the page to get the JS to work...
I had added {Album action='metadata'} to the metadata of the page, but it did not work.

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 8:16 pm
by Jos
Probier mal ob {Album action='metadata'} im Inhalt Feld ein Output ins html Quelltext einfügt?

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 8:31 pm
by Dr.CSS
Can you check the metadata box in the Albums template to see if it has any script calls in it?...

Should have...

<__script__ type="text/javascript" src="modules/Album/templates/db/js/jquery162.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/jQlightbox/jQlightbox.js"></__script>
<__script__ type="text/javascript">
$(function() {
$('#jQligallery a').lightBox();
});
</__script>
<link rel="stylesheet" href="modules/Album/templates/db/jQlightbox/jQlightbox.css" type="text/css" media="screen" />

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 8:36 pm
by Brummnix
Also ich habe nun {Album action='metadata'} auf der Seite http://www.mv-worblingen.de/index.php?p ... staltungen im eigentlichen Inhalt eingefügt und kann nirgends erkennen, dass der folgende Inhalt eingefügt worden wäre:

Code: Select all

<__script__ type="text/javascript" src="modules/Album/templates/db/js/jquery162.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/jQlightbox/jQlightbox.js"></__script>
    <__script__ type="text/javascript">
    $(function() {
        $('#jQligallery a').lightBox();
    });
    </__script>
<link rel="stylesheet" href="modules/Album/templates/db/jQlightbox/jQlightbox.css" type="text/css" media="screen" />
@Dr.CSS:
Yes, the Script above is in the metadata box in the Albums template.

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 8:39 pm
by Dr.CSS
Sorry, but at this point I would have to log in to see what could be the problem...

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 9:11 pm
by Brummnix
Dr.CSS wrote:Sorry, but at this point I would have to log in to see what could be the problem...
I have send you a pm - thanks.

Re: Java-Script wir nicht in HTML-Quellcode eingefügt

Posted: Sat Jul 28, 2012 9:41 pm
by Dr.CSS
Looks like your site is going to require you to put the actual script calls in the pages metadata box and not the action= call...