SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 12:50:14 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1] 2 3 4
  Print  
Author Topic: [Code] SMF Page v1  (Read 4471 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 627


Do not PM me for Code Support or Request


View Profile WWW
« on: September 07, 2007, 11:10:07 pm »

Footers
Code:
<script>
function smf_page_v1(link,title,content){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(location.href.match("action=" + link)){
document.title = title;
document.getElementbyId("bodyarea").innerHTML = "<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>" + title + "</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'>" + content + "</td></tr></table></div></div>";
};};
smf_page_v1("LINK","TITLE","CONTENT");
</script>

Alright, first, to get things clear.  I DID NOT, make the first two "Add SMF Page" codes.  I accually...well, I ripped them, if you don't know what that means, I stole them and said that it was my own code.  So, I decided to delete the two topics on the SMF Support forum.  So, this will be version 1 of SMF Page, that I made...

Now that we got that clear.  This code is alot shorter than the other codes that "I" made, which is better.  There is only one code, that will just go into the footer Smiley

LINK = How you get to the page.  (http://fakesite.com/index.php?ACTION=LINK)
TITLE = What the title of the page will be.
CONTENT = What text will be on the page.

If you want to add more pages, just add more of these lines:
Code:
smf_page_v1("LINK","TITLE","CONTENT")

There ya go!  If you have any questions, just ask me for help!
« Last Edit: May 01, 2008, 03:03:44 pm by Agent Moose » Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
99Bullets
SMF For Free Full Member
*
Offline Offline

Posts: 180


Join Massive Gaming Site Forums!!!


View Profile WWW
« Reply #1 on: September 07, 2007, 11:29:37 pm »

Wow kool nice one agent moose

EDIT: Wat does it do?
Logged

Thanks Hurrican47 For Making This

you want to apply for staff, please pm me!!!
jamesking56
SMF For Free Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #2 on: September 08, 2007, 06:27:18 am »

how do i edit footer?
Logged
Wes
SMF For Free Member
*
Offline Offline

Posts: 31


Dark Ninja


View Profile WWW
« Reply #3 on: September 08, 2007, 06:56:15 am »

how do i edit footer?

ACP>Configuration>Manage styles>editfooter/header
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 627


Do not PM me for Code Support or Request


View Profile WWW
« Reply #4 on: September 08, 2007, 08:24:29 am »

Wow kool nice one agent moose

EDIT: Wat does it do?
It adds a brand new page that you can use to add any content you want.

http://smfpage.smfforfree3.com/index.php?action=smfpage

the action=smfpage is how you would get to your page, but the smfpage will be diffrent.  what ever you have set for LINK, will be how you get to the new page.
Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
99Bullets
SMF For Free Full Member
*
Offline Offline

Posts: 180


Join Massive Gaming Site Forums!!!


View Profile WWW
« Reply #5 on: September 08, 2007, 10:31:14 am »

so like it is kinda like a info board?
Logged

Thanks Hurrican47 For Making This

you want to apply for staff, please pm me!!!
deathwilldie
Style Designer
****
Offline Offline

Posts: 570

Give me an idea for a Stylesheet


View Profile WWW
« Reply #6 on: September 09, 2007, 04:43:49 pm »

Yea its like an info page.  Just to put words in it.  But you can only put one link for some reason.  I hope he will make another one to have more than one link.
Logged


Eternal Flame Coming soon.
Gordie
SMF For Free Hero
*
Online Online

Posts: 593


I'm around somewhere!!!


View Profile WWW
« Reply #7 on: September 10, 2007, 08:06:44 am »

Ok...I've been absent for quite a while, but I like this code.Only I don't know how to add content to it.Can someone help please?
Logged



deathwilldie
Style Designer
****
Offline Offline

Posts: 570

Give me an idea for a Stylesheet


View Profile WWW
« Reply #8 on: September 10, 2007, 03:43:22 pm »

Were it says content in the code is were you put what you want to be shown on the page.
Logged


Eternal Flame Coming soon.
Alex
SMF For Free Full Member
*
Offline Offline

Posts: 116


View Profile
« Reply #9 on: September 14, 2007, 08:17:45 pm »

It's not working for me.

I put the code in the right places.

Is there something wrong with the code?

I put this code in

Code:
<script>
function smf_page_v1(link,title,content){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(location.href.match("action="+link)){
document.title=""+title+"";
$("#bodyarea").hide()
$("#bodyarea").before("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>"+title+"</div><div id='upshrinkHeaderIC'><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'>"+content)
$("#bodyarea").after("</td></tr></table></div></div>")
};};
smf_page_v1("http://a12alextestforum.smfforfree3.com/index.php?action=test","test","This is just a test to see if the code works or not")
</script>
and i put this in the header too
Code:
<script src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script.
Can you please tell me how to fix this
« Last Edit: September 15, 2007, 12:43:31 am by A12Alex » Logged

sig coming soon!
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2015


View Profile WWW
« Reply #10 on: September 15, 2007, 01:06:33 am »

It's not working for me.

I put the code in the right places.

Is there something wrong with the code?

I put this code in

Code:
<script>
function smf_page_v1(link,title,content){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(location.href.match("action="+link)){
document.title=""+title+"";
$("#bodyarea").hide()
$("#bodyarea").before("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>"+title+"</div><div id='upshrinkHeaderIC'><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'>"+content)
$("#bodyarea").after("</td></tr></table></div></div>")
};};
smf_page_v1("http://a12alextestforum.smfforfree3.com/index.php?action=test","test","This is just a test to see if the code works or not")
</script>
and i put this in the header too
Code:
<script src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script.
Can you please tell me how to fix this

If you put the main code (larger of the two) in the header, you need to remove it from there and put it in your "footers".
Logged

Alex
SMF For Free Full Member
*
Offline Offline

Posts: 116


View Profile
« Reply #11 on: September 15, 2007, 01:09:10 am »

It's not working for me.

I put the code in the right places.

Is there something wrong with the code?

I put this code in

Code:
<script>
function smf_page_v1(link,title,content){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(location.href.match("action="+link)){
document.title=""+title+"";
$("#bodyarea").hide()
$("#bodyarea").before("<div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>"+title+"</div><div id='upshrinkHeaderIC'><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'>"+content)
$("#bodyarea").after("</td></tr></table></div></div>")
};};
smf_page_v1("http://a12alextestforum.smfforfree3.com/index.php?action=test","test","This is just a test to see if the code works or not")
</script>
and i put this in the header too
Code:
<script src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script.
Can you please tell me how to fix this

If you put the main code (larger of the two) in the header, you need to remove it from there and put it in your "footers".
oh lol i forgot to say that i put the 1st code in the footers
Logged

sig coming soon!
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2015


View Profile WWW
« Reply #12 on: September 15, 2007, 01:11:14 am »

I just tried the code on my forum and quite frankly I cant even tell what its supposed to do...nothing on my test forum even changed  Grin
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 627


Do not PM me for Code Support or Request


View Profile WWW
« Reply #13 on: September 15, 2007, 08:46:10 am »

Alright!  I am back.  A12, I have updated the code, Could be one reason why it wasn't working.  Also, make sure you have this at the top of your headers at all times:
Code:
<script src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script>
And then, just place the new updated code in the first post into your footers.
Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
Gordie
SMF For Free Hero
*
Online Online

Posts: 593


I'm around somewhere!!!


View Profile WWW
« Reply #14 on: September 15, 2007, 08:58:56 am »

Does the "content" for this page HAVE to be text or can you use code for lets say a chatroom or something?
Logged





Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.277 seconds with 16 queries.