FANDOM


m (cleanup)
 
(2 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
For example, where and how would I put this code:
 
For example, where and how would I put this code:
   
  +
<pre>
 
<div class="toprightbox" style="display:none">
 
<div class="toprightbox" style="display:none">
 
<span onclick="jQuery(this.parentNode).fadeOut();">
 
<span onclick="jQuery(this.parentNode).fadeOut();">
Line 24: Line 25:
 
}
 
}
 
</script>
 
</script>
 
 
 
<center>
 
<center>
 
<a href="JavaScript&#058;newPopup('http://www.wix.com/andromedavadum/xdirect12345contactus');">
 
<a href="JavaScript&#058;newPopup('http://www.wix.com/andromedavadum/xdirect12345contactus');">
 
<span style="color: #000000; font-size: 14pt">Contact Us</span>
 
<span style="color: #000000; font-size: 14pt">Contact Us</span>
+
<hr /><span style="color: #000000; font-size: 8pt">Having Problems completing the form, try refreshing by pressing F5!</span></a></center>
 
<hr /><span style="color: #000000; font-size: 8pt">Having Problems completing the form, try refreshing by pressing F5!</span></a>
 
</center>
 
 
</div>
 
</div>
 
<script>setTimeout(function(){jQuery('.toprightbox').fadeIn()},3000)</script>
 
<script>setTimeout(function(){jQuery('.toprightbox').fadeIn()},3000)</script>
  +
</pre>
   
  +
The CSS
  +
  +
<pre>
 
.toprightbox {
 
.toprightbox {
 
position: absolute;
 
position: absolute;
Line 41: Line 44:
 
padding: 10px;
 
padding: 10px;
 
-webkit-box-shadow: 0px 0px 10px #FFFFFF; -moz-box-shadow: 0px 0px 10px #FFFFFF;
 
-webkit-box-shadow: 0px 0px 10px #FFFFFF; -moz-box-shadow: 0px 0px 10px #FFFFFF;
  +
</pre>
  +
<span style="font-size:85%;">—This {{#ifeq: {{lc: Andromeda Vadum}}|fandyllic|improperly [[w:c:help:Help:Signature|signed]] comment is by [[User:Andromeda Vadum|Andromeda Vadum]]|[[w:c:help:Help:Signature|unsigned]] comment is by [[User:Andromeda Vadum|Andromeda Vadum]]}} ([[Message Wall:Andromeda Vadum|wall]] • [[Special:Contributions/Andromeda Vadum|contribs]]) 21:53, 2012 March 31 (UTC). Please sign your posts with {{#ifeq: {{lc: Andromeda Vadum}}|fandyllic|proper UTC timestamps.|~~<nowiki>~~</nowiki>!}}</span>
  +
  +
:I think I have answers to some of your questions.
  +
::'''#2'''. Wikia loads the jQuery library in the <code><nowiki><head></nowiki></code> section of all pages, so added jQuery code will work. However, <code><nowiki><script></nowiki></code> tags and <code><nowiki>onclick</nowiki></code> attributes placed directly in the body of an article generally will not work, since wikimarkup ignores that kind of html code. Instead, you can use Help:Verbatim tags to include the html/jQuery code inside an article, or you can add your jQuery code to [[MediaWiki:Common.js]] on the wiki where you want it to work so that it will be loaded in the <code><nowiki><head></nowiki></code> section of all pages.
  +
::'''#3'''. First of all, adding something above the Wikia header may be against the [http://www.wikia.com/Terms_of_Use terms of use]. Check out [[Help:Customization policy]] for information about what is or is not allowed. Secondly, inserting a link that directs visitors to an externally hosted contact form asking for a visitor's personal information would almost definitely be against the terms of use, but you should [[Special:Contact|contact Wikia]] about it to be sure. Why don't you just use a link to [[Special:EmailUser/Andromeda Vadum]] instead? With that said, the insertion could be done by placing the following in the MediaWiki:Common.js:
  +
<div style="margin-left:50px"><source lang=javascript>
  +
$(document).ready(function() {
  +
$('#WikiHeader').before('content you want to insert');
  +
});
  +
</source></div>
  +
:--'''[[User:Gardimuer|Gardimuer]]'''&nbsp;<sup>[[User talk:Gardimuer|{&nbsp;ʈalk&nbsp;}]]</sup> 11:39, April 1, 2012 (UTC)

Latest revision as of 00:10, August 25, 2017

Forums: Index Support Requests Add Content above Wikia Navigation
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 1084 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


The code may not be fully displayed so you may want to click edit and view as source in order to view what I am talking about.

1) What is the script for Notifications and "You have new messages"?

2) Does Wikia take JQuery code?

3) How do I put a JQuery script above the Wikia header For example, where and how would I put this code:

<div class="toprightbox" style="display:none">
<span onclick="jQuery(this.parentNode).fadeOut();">
<img style="position:absolute; TOP:0px; RIGHT:3px; align="right"; width:50px; height:50px; src="http://icons.iconarchive.com/icons/dooffy/characters/32/X2-icon.png" />
</span>
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(
url,'popUpWindow','height=600,width=1000,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>
<center>
<a href="JavaScript:newPopup('http://www.wix.com/andromedavadum/xdirect12345contactus');">
<span style="color: #000000; font-size: 14pt">Contact Us</span>
<hr /><span style="color: #000000; font-size: 8pt">Having Problems completing the form, try refreshing by pressing F5!</span></a></center>
</div>
<script>setTimeout(function(){jQuery('.toprightbox').fadeIn()},3000)</script>

The CSS

.toprightbox {
  position: absolute;
  top: 10px; right: 10px;
  background: #e1ebf2;
  color: #000000;
  text-shadow: 0px 0px 10px #000000;
  padding: 10px;
  -webkit-box-shadow: 0px 0px 10px #FFFFFF; -moz-box-shadow: 0px 0px 10px #FFFFFF;

—This unsigned comment is by Andromeda Vadum (wallcontribs) 21:53, 2012 March 31 (UTC). Please sign your posts with ~~~~!

I think I have answers to some of your questions.
#2. Wikia loads the jQuery library in the <head> section of all pages, so added jQuery code will work. However, <script> tags and onclick attributes placed directly in the body of an article generally will not work, since wikimarkup ignores that kind of html code. Instead, you can use Help:Verbatim tags to include the html/jQuery code inside an article, or you can add your jQuery code to MediaWiki:Common.js on the wiki where you want it to work so that it will be loaded in the <head> section of all pages.
#3. First of all, adding something above the Wikia header may be against the terms of use. Check out Help:Customization policy for information about what is or is not allowed. Secondly, inserting a link that directs visitors to an externally hosted contact form asking for a visitor's personal information would almost definitely be against the terms of use, but you should contact Wikia about it to be sure. Why don't you just use a link to Special:EmailUser/Andromeda Vadum instead? With that said, the insertion could be done by placing the following in the MediaWiki:Common.js:
$(document).ready(function() {
	$('#WikiHeader').before('content you want to insert');
});
--Gardimuer { ʈalk } 11:39, April 1, 2012 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.