17 May, 2008, 09:17:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: We Return!
 

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Creating a new page with Invisionfree  (Read 7780 times)
0 Members and 1 Guest are viewing this topic.
slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« on: 04 February, 2007, 02:55:27 AM »
"We know what we are, but know not what we may become." - William Shakespeare

Have you ever wondered on how to create a new page for Invisionfree to maybe create a Shop code, or WHATEVER? Well if you follow this tutorial you will learn how to make one yourself. Tongue


You first start with this little part here, placing this in your Board Wrappers> Footer:

Code:
<script>
if (location.href.match("act=meh")){
document.title="YOUR_PAGE_NAME_TITLE";
document.getElementById("extrapage").innerHTML="CONTENT";
}
</script>

Ok now the simple breakdown of that part:

if (location.href.match("act=meh")){

That line determines (in RED) where your new page will be located by URL.


Now this line here is basic:

document.title="YOUR_PAGE_NAME_TITLE";

Thats simply placing the title of that page at the top left of your browser, you can name this whatever you want.


The last line comes the part where your content will show:

document.getElementById("extrapage").innerHTML="CONTENT";

The area in RED will be further explained. For now the "CONTENT" is where everything will show. You see how there are double quotes around the word CONTENT, anything between those double quotes should NOT have another double quote. Unless you are trying to display something with a variable which I will explain in another tutorial. Also you cannot press your "Enter" key on your keyboard to create new lines inside there, instead just simply place line breaks (<br />) Now for example if you wanted to place a table in that section:

document.getElementById("extrapage").innerHTML="<table width='100%'><tr><td>CONTENT</td></tr></table>";

You see how the single quotes surround the 100% and if those were double quotes your code would not work. So remember that in your future coding, besides the fact that you can also have double quotes in double quotes but thats in another tutorial. Wink


Ok now back to this part and the final part of the add-on:

document.getElementById("extrapage").innerHTML="CONTENT";

The part in RED you will need to keep in mind, so now you need to go to your Board Wrappers> Header & Body and find the <% BOARD %> tag. Once you have FOUND the board tag simply place some <div> tags with an id around it so you can create your new page:

Code:
<div id="extrapage">
<% BOARD %>
</div>

Now, remember the part where I said you need to keep the above RED extrapage in mind? Well this is where it comes to work. With that div id="" just simply place that word extrapage in the ID area and you are finished!


If you found this tutorial helpful then please comment that you now know how to do this or you already knew how to do it but the long way. Tongue If this didn't work for you please tell me that it didn't work for you and post your board url here and I will help you out. Cheesy
Logged

Live for nothing or die for something






This resource was found useful by 6 out of 6 members. Rate it: [applaud] [smite]
PanzerNew Zealand
Linux!

Administrator

Silver Contribution
*
Legendary Member

Karma: 30
Offline Offline

Gender: Male
Posts: 1293
1761143.96 Secksi Coins

View Inventory
Send Money to Panzer

View Profile
« Reply #1 on: 04 February, 2007, 04:27:52 AM »

woohoo, good one slay Smiley
Logged

slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« Reply #2 on: 04 February, 2007, 04:40:26 AM »
Take me down to the paradise city where the grass is green and the girls are pretty!

W00t, lol, applaud/smite my tut?
Logged

Live for nothing or die for something






PanzerNew Zealand
Linux!

Administrator

Silver Contribution
*
Legendary Member

Karma: 30
Offline Offline

Gender: Male
Posts: 1293
1761143.96 Secksi Coins

View Inventory
Send Money to Panzer

View Profile
« Reply #3 on: 04 February, 2007, 04:52:47 AM »

How could i forget :O ?
Logged

slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« Reply #4 on: 04 February, 2007, 05:02:48 AM »
"We know what we are, but know not what we may become." - William Shakespeare

Thanksies Panzer. Tongue
Logged

Live for nothing or die for something






jerrodUnited States
Eat, Sleep, And Be Metal, Because Tommorro We Die


Silver Contribution
*
Legendary Member

Karma: 7
Offline Offline

Gender: Male
Posts: 1254
14368.53 Secksi Coins

View Inventory
Send Money to jerrod

View Profile WWW
« Reply #5 on: 04 February, 2007, 03:34:09 PM »

Hey Slayer Im ussing it, Thanks Dog. I tried applauding it last night and a error came up so Ill try to re rate it.
Logged

slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« Reply #6 on: 04 February, 2007, 03:37:26 PM »
Knock knock knocking on heaven's door...

lol yeah TCZ was down for quite some time. Sad But thanks man. Tongue
Logged

Live for nothing or die for something






Canada
I like to eat some food, preferbly

some 3.14! Because pie is good!

GFX Staff

Platinum Contribution
*
Legendary Member

Karma: 18
Offline Offline

Gender: Male
Posts: 1070
853477.31 Secksi Coins

View Inventory
Send Money to Zapper

View Profile
« Reply #7 on: 04 February, 2007, 04:31:45 PM »
I had super human powers, but my therapist took them away.

Intaresting!

Your ways are so, so... Technical! Ok, maybe I know very little

I prefere to just use
Quote
if ( location.search.indexOf('act=Msg')!=-1) {document.write(""}

Remove everything on the page, and make a new one from scratch, may be difficult to update, but its only way I really easly understand...
Logged

~!Zapper





MY ID CARD
slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« Reply #8 on: 04 February, 2007, 04:39:48 PM »
Knock knock knocking on heaven's door...

I'm technical, lol. Well yeah I don't know for sure if you way works good but I guess it works for you.
Logged

Live for nothing or die for something






<HEACHTEEEEMMMMMELLL>

^Hawt <3


Bronze Contribution
*
Elite Member

Karma: 3
Offline Offline

Posts: 144
1264.80 Secksi Coins

View Inventory
Send Money to .:[JoeyJo0]:.

View Profile
« Reply #9 on: 05 February, 2007, 06:19:12 PM »

Nice one!
Logged

Quote
(R)GiRL(R) Jenny Giggles FTW zegt:
DO YOU THINK ITS GOOD TO DANCE IN FRONT OF THE TV NAKED?
idk...

dun dun dun!


Bronze Contribution
*
Addict

Karma: 3
Offline Offline

Gender: Male
Posts: 312
203087.67 Secksi Coins

View Inventory
Send Money to GAME OVER

View Profile WWW
« Reply #10 on: 05 February, 2007, 06:35:16 PM »

jeez
i think godkillah's code is easier
Logged

Resaurant's special: OWNAGE
if i dish it out u better eat it, but if u arn't then who is?Huh 0.o
Quote
How can a majority of one be right, and millions wrong?

ok sorry i just copied it form an IF site so i guess it was bigger here than If sites...
(i am talking to codemaster btw)

<_< >_> <_> >_<
slayer766United States
Long live TCZ

TCZ r0x my s0x

Administrator

Platinum Contribution
*
Conqueror

Karma: 56
Offline Offline

Gender: Male
Posts: 4419
415595.08 Secksi Coins

View Inventory
Send Money to slayer766

View Profile
« Reply #11 on: 05 February, 2007, 06:44:23 PM »
Knock knock knocking on heaven's door...

Really? Theres barely anything to this one, I just explained EVERYTHING to people who don't know JS that well.
Logged

Live for nothing or die for something






Review God

Hi there!!

Ex-Staff

Silver Contribution
*
Elite Member

Karma: 8
Offline Offline

Gender: Male
Posts: 180
2780.00 Secksi Coins

View Inventory
Send Money to Nuke

View Profile
« Reply #12 on: 09 February, 2007, 11:02:51 AM »

Ye, this one is a lot more simple than Godkillah's one. Good work Slay Wink
Logged

BustahUnited States
Da Boss

Code Trainee
*
Newbie

Karma: 0
Offline Offline

Gender: Male
Posts: 46
374.00 Secksi Coins

View Inventory
Send Money to Bustah

View Profile WWW
« Reply #13 on: 13 December, 2007, 01:19:55 AM »

Hey, I'm new to these forums, and I was really interested in using this code for my board. I have everything set up the way it should be, but you can't use double quotes, so I have no idea how to display pictures on this page, if anyone could help me, or direct me to a tutorial that'll explain it for me it would be greatly appreciated. Thanks.
Logged

United Kingdom
More metal than thee...

Low-Tech Code Monkey

Administrator

Silver Contribution
*
Conqueror

Karma: 72
Offline Offline

Gender: Female
Posts: 3687
294841.93 Secksi Coins

View Inventory
Send Money to Slaytanist

View Profile WWW
« Reply #14 on: 13 December, 2007, 01:25:43 AM »
They think they know who I am... All that they know is I love to kill...

a) Copy and paste the text you want to use into Notepad
b) Find and Replace " with \"
c) Copy the lot into your code

\ is the escape character in most post-C languages. Escaping a quote will allow you to use one within a quoted string : )
Logged


My standard sig is rated 15.
theworldneedsmore.com/puterphobia



I love you, Emz!
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  
Sponsored Links:

Powered by MySQL
Powered by PHP
Powered by SMF 1.1.1 | SMF © 2005, Simple Machines LLC
TinyPortal v0.8.6 © Bloc
The rest copyright TCZ you pillocking twat!
Valid XHTML 1.0!
Valid CSS!
Places we'd like you to visit.