The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

write in the Forum Footer

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

write in the Forum Footer

Post by Marvin on April 19th 2011, 10:44 pm

First topic message reminder :

Hello, how I can write in the Forum Footer?
I think I had seen, a script that makes that.


Last edited by Marvin on April 21st 2011, 5:47 pm; edited 2 times in total

Marvin
Forumember

Male Posts : 317
Reputation : 4
Language : German, basic English, Spanish, basic Bavarian, broken Italian

http://www.schiggysboard.com/

Back to top Go down


Re: write in the Forum Footer

Post by Marvin on April 27th 2011, 3:13 pm

Oh, thanks, but when i make this code in my Announcements:
Code:
 <script>
jQuery(function() {
jQuery('#page-footer').after('<center><span style="font-size: 15px; line-height: normal"><div id=sugar></div><script type=text/javascript src=http://www.schiggysboard.com/h3-wahlschalter></script></center>');
});
 </script>

 </span>
There is noch Style switcher, there is only
Code:
'); });
This in the Announcement, an not is in the footer.

An when i put in this code:
Code:
 <script>
jQuery(function() {
jQuery('#page-footer').after('<center><span style="font-size: 15px; line-height: normal"><div id=sugar></div><script type=text/javascript src=http://www.schiggysboard.com/h3-wahlschalter></script></center>');
});
 </script>

 </span>


(it is the same code ony whitout ');});, than there is nothing.

Marvin
Forumember

Male Posts : 317
Reputation : 4
Language : German, basic English, Spanish, basic Bavarian, broken Italian

http://www.schiggysboard.com/

Back to top Go down

Re: write in the Forum Footer

Post by Saxaca on April 27th 2011, 3:38 pm

You cannot put a script in a script.
Code:
$(function() {
  $('#page-footer').after('<div id="saxLoad"></div>');
  saxLoadX = document.createElement('script');
  saxLoadX.src = 'http://www.schiggysboard.com/h3-wahlschalter';
  document.getElementById('saxLoad').appendChild(saxLoadX);
});

Saxaca
Forumember

Male Posts : 539
Reputation : 26
Language : Markup.

Back to top Go down

Re: write in the Forum Footer

Post by kirk on April 27th 2011, 4:40 pm

what is a There is noch Style switcher,?

i don't know what your doing? i just tested it on my test forum with phpbb3 and it worked fine?
so not sure whats going on?

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Re: write in the Forum Footer

Post by Marvin on April 27th 2011, 5:51 pm

@Saxaca wrote:You cannot put a script in a script.
Code:
$(function() {
  $('#page-footer').after('<div id="saxLoad"></div>');
  saxLoadX = document.createElement('script');
  saxLoadX.src = 'http://www.schiggysboard.com/h3-wahlschalter';
  document.getElementById('saxLoad').appendChild(saxLoadX);
});
I would have this script "wahlschalter" in my Foren foorter are this not going?

@kirk wrote:what is a There is noch Style switcher,?

i don't know what your doing? i just tested it on my test forum with phpbb3 and it worked fine?
so not sure whats going on?

whit the script?

Marvin
Forumember

Male Posts : 317
Reputation : 4
Language : German, basic English, Spanish, basic Bavarian, broken Italian

http://www.schiggysboard.com/

Back to top Go down

Re: write in the Forum Footer

Post by Saxaca on April 29th 2011, 3:28 pm

No need for sugar. Inside the saxLoad DOM node, add:
Code:
<select onchange="changeskin(this.options[this.selectedIndex].value);window.location.reload();"><option>

And remove line 2 & 3 from your "Wahlchalter" page.

Saxaca
Forumember

Male Posts : 539
Reputation : 26
Language : Markup.

Back to top Go down

Re: write in the Forum Footer

Post by Marvin on April 29th 2011, 5:06 pm

This is the code:
Code:
var type = getCookie('Vorlage1');
var sugar = document.getElementById('sugar');
sugar.innerHTML ='<select onchange="changeskin(this.options[this.selectedIndex].value);window.location.reload();"><option> Ändere den Style </option><option value="wert1"> Schiggysboard - Original</option><option value="wert2"> Schiggysboard - Modern </option><option value="wert3"> Schiggysboard - Dunkel </option></select>';




if (type == 'wert1')
{
   document.write('<link rel="stylesheet" type="text/css" href="http://www.schiggysboard.com/">');
}
else if (type == 'wert2')
{
   document.write('<link rel="stylesheet" type="text/css" href="http://spetools.de/css/957.css">');
}
else if (type == 'wert3')
{
   document.write('<link rel="stylesheet" type="text/css" href="http://spetools.de/css/957.css">');
}


function changeskin(change) {
   var scheme = change;
   var name = 'Vorlage1';
   var pathname = location.pathname;
   //var myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
   var ExpDate = new Date ();
   ExpDate.setTime(ExpDate.getTime() + (180 * 24 * 3600 * 1000));
   setCookie(name,scheme,ExpDate,'/');
}
function getCookie(name){
   var cname = name + "=";
   var dc = document·cookie;
   if (dc.length > 0) {
      begin = dc.indexOf(cname);
      if (begin != -1) {
         begin += cname.length;
         end = dc.indexOf(";", begin);
         if (end == -1) end = dc.length;
         return unescape(dc.substring(begin, end));
      }
   }
   return null;
}
function setCookie(name, value, expires, path, domain, secure) {
   document·cookie = name + "=" + escape(value) +
   ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
   ((path == null) ? "" : "; path=" + path) +
   ((domain == null) ? "" : "; domain=" + domain) +
   ((secure == null) ? "" : "; secure");
}

$('#page-footer').after('Switch Triggers');
I dont know what you mine, pleas make you.

Marvin
Forumember

Male Posts : 317
Reputation : 4
Language : German, basic English, Spanish, basic Bavarian, broken Italian

http://www.schiggysboard.com/

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum