Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • InvisionFree and Zetaboards Support
  • [SOLVED][IF] Hosting codes to free up space
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
[SOLVED][IF] Hosting codes to free up space
Tweet Topic Started: Apr 25 2010, 09:38 PM (387 Views)
The Truth Apr 25 2010, 09:38 PM Post #1


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
Hiya,

I have an InvisionFree forum that I like to modify quite a bit. I have reached the 20,000 character limit for headers and footers and from what I understand a solution to free up some space would be to host the codes.

Let's say I want to host the code below for example, what steps should I take?

Code:
 
<script type="text/javascript">
(function(){
hidden_msg = "The contents of this message have been hidden.";
hide_button = "<img src='http://img72.imageshack.us/img72/1253/99281451.png' border='0'/>";
unhide_button = "<img src='http://img265.imageshack.us/img265/9227/19744167.png' border='0'/>";

if(location.href.match("showtopic=")){
mod = (document.getElementById("userlinks").innerHTML.match("Mod CP"))?true:false;
a = document.getElementsByTagName("div");
for(x=0;x<a.length;x++){
if(a[x].className == "postcolor"){
b = a[x].parentNode.parentNode.parentNode;
if(b.tagName.toLowerCase() == "tbody"){
b = b.parentNode;
}
c = b.getElementsByTagName("td");
d = c[1].getElementsByTagName("div")[1];
j = d.getElementsByTagName("a");
for(y=0;y<j.length;y++){
if(j[y].href.match("act=Post&CODE=08")){
edit_link = j[y].href;
}
}
if(a[x].innerHTML.match("hidethispost")){
if(mod){
b.className = "hid";
if(edit_link){
d.innerHTML += "<a href='"+edit_link+"&unhide_my_post'>"+unhide_button+"</a>";
}
a[x].innerHTML = a[x].innerHTML.replace("hidethispost","");
} else {
b.className = "memberhid";
c[0].innerHTML = "";
c[1].innerHTML = "";
c[2].innerHTML = "";
c[3].innerHTML = "<div class='postcolor'>"+hidden_msg+"</div>";
c[4].innerHTML = "";
c[5].innerHTML = "";
}
} else {
if(mod){
d.innerHTML += "<a href='"+edit_link+"&hide_my_post'>"+hide_button+"</a>";
}
}
}
}
} else if(location.href.match("act=Post&CODE=08")){
r = document.forms['REPLIER'];
if(location.href.match("&unhide_my_post")){
r.Post.value = r.Post.value.replace("hidethispost","");
r.submit.click();
} else if(location.href.match("&hide_my_post")){
r.Post.value += "\n\nhidethispost";
r.submit.click();
}
}
})();
</script>


So far I have copied the code onto a notepad file and saved it as" "posthidingsystem.ibf.txt" ". I have also removed the

Code:
 
</script>
<script type="text/javascript">


tags.

Now what? :P

-Truth ^_^
Offline Profile Goto Top
 
Dorith Apr 25 2010, 09:43 PM Post #2
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
Moved this topic to the correct forum ;)

Reid mentioned in the Shoutbox that you cannot upload .js files on IF. He suggested to save it as a .ibf file instead.

So try saving it to something like: "code.ibf"

Then try uploading that.

Once you upload that you create a code that goes like this:
Code:
 
<script type='text/javascript' src='URL OF UPLOAD HERE'></script>
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
The Truth Apr 25 2010, 09:45 PM Post #3


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
When I save the document as .ibf my computer automatically adds the .txt suffix...

the file is "posthiddingsystem.ibf.txt" will that work?
Offline Profile Goto Top
 
Dorith Apr 25 2010, 09:47 PM Post #4
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
Not completely sure. But I think I know why it is saving it with that .txt at the end.

Are you adding the quotation marks while saving? It actually needs the quotation marks otherwise it will add .txt at the end.
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
SlyCooperFan1 Apr 25 2010, 09:47 PM Post #5
Master Raccoon Thief Coder

Posts:
214
Group:
Member
Member
#1,306
Joined:
Oct 22, 2008
1. Make sure you're using Notepad.
2. In the "Save As..." field where you put the name, type "posthiddingsystem.ibf ".

Normally shouldn't add on the .txt suffix...

EDIT @Dorith: Really? I've saved .js files without quotation marks and it never added on the .txt. Or maybe that's cuz I'm using Windows 7 and older computers have a different setting on that.


Please disregard this entire post LOL. I just tested it. Dorith's right, you need the quotation marks. But you already posted that it worked, so...uh, I'll stop talking now kthxbai. xD
Edited by SlyCooperFan1, Apr 25 2010, 09:51 PM.
ZBCode is no longer active.
Please visit these sites for codes:
Outline - Zathyus Networks
Offline Profile Goto Top
 
The Truth Apr 25 2010, 09:49 PM Post #6


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
You're so smart. ;)

Haha, I saved it with the quotations when I made the .js file, but I was forgetting them for the .ibf....

Anyways it worked perfect, I'm uploading the file now :)
Offline Profile Goto Top
 
Dorith Apr 25 2010, 09:50 PM Post #7
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
I saw somewhere that you needed quotation marks and that's the only way it works for me, so I'm not sure how it works differently for you. But I need the quotation marks otherwise it will add the .txt at the end for me.

Glad it worked. Tell me if your code uploaded and works correctly on your board.
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
The Truth Apr 25 2010, 09:53 PM Post #8


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
Well it seems to have worked, this is what the post looks like..

Posted Image

Uploaded with ImageShack.us

Now what should I do from here?

EDIT: I just add

Code:
 
<script type='text/javascript' src='URL OF UPLOAD HERE'></script>

to replace the code that was previously in my footers? The URL being that of the thread?
Edited by The Truth, Apr 25 2010, 09:55 PM.
Offline Profile Goto Top
 
Dorith Apr 25 2010, 09:56 PM Post #9
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
Code:
 
src='URL OF UPLOAD HERE'

Copy and paste the url of the upload into that, then place
Code:
 
<script type='text/javascript' src='URL OF UPLOAD HERE'></script>

Below the Board
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
The Truth Apr 25 2010, 10:01 PM Post #10


Posts:
22
Group:
Member
Member
#3,711
Joined:
Feb 28, 2010
Holy crap! :D

It works! I LOVE YOU GUYS. I am so excited!

Thank is SERIOUSLY going to help my forum...thank you thank you thank you!
Edited by The Truth, Apr 25 2010, 10:02 PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Enjoy forums? Start your own community for free.
Learn More · Sign-up Now
Go to Next Page
« Previous Topic · InvisionFree and Zetaboards Support · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

Track Topic · E-mail Topic Time: 3:38 AM Jul 11
Hosted for free by ZetaBoards · Privacy Policy