FANDOM


This Forum has been archived

Visit the new Forums
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 1055 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.