pluqui
Not New Member
Posts: 10
pluqui said 0 great things
|
Post by pluqui on Dec 10, 2009 14:19:17 GMT -8
Oops! Thanks much. Copying that line has sorted it. ;D
|
|
|
Post by Wormopolis on Dec 10, 2009 14:34:04 GMT -8
you have an error in another code if you want to fix that as well...
|
|
pluqui
Not New Member
Posts: 10
pluqui said 0 great things
|
Post by pluqui on Dec 10, 2009 14:35:32 GMT -8
Oh yes please. I'll fix that too.
|
|
|
Post by Wormopolis on Dec 10, 2009 14:40:08 GMT -8
check PM
|
|
Nightwalker
Full Member
Everything Happens at Night
Posts: 138
Nightwalker said 0 great things
|
Post by Nightwalker on Jun 6, 2010 14:31:13 GMT -8
Could you make it that more than just the admin could test the code?
oh i see we would just add it here
if (pb_username=='admin, other user')
|
|
|
Post by Wormopolis on Jun 6, 2010 15:50:07 GMT -8
that line would need to be changed to
if (pb_username=='admin' || pb_username=='otheruser') {
|
|
allkin
Not New Member
Posts: 8
allkin said 0 great things
|
Post by allkin on Jun 6, 2010 19:54:30 GMT -8
I have an error...Nothing shows up. I checked it on both IE and FF. So...Help? Heres the code I used after I edited and such.
<script type="text/javascript"> <!-- /* PortKey v1.21 By Wormopolis Keep Header intact, Do not repost without permission */
//EDIT THESE var portKeyActive = true; //true if you want it on, false if you dont
var exemptUsers=/()/;
var absenceMessage="You've been away a long time, here are the basic rules of the site in case you forgot.:" var absenceTime = 30; //number of days someone can be absent before they see portal again var absenceMonitor = "yes" // yes if you want portal reshown to members who havent been on in a while // no if you dont.
var bannedMessage="You were recently banned. Perhaps you should look over the site rules again?:" var bannedMonitor = "yes" // yes if you want someone who was recently unbanned to see portal again // no if you dont
var portalMessage="<font size='4'>Welcome to ☼►All Kin◄☼!</font><br><br><br>"; <br> <br> <P align="center"> *WARNING* <br> This website is not for the close minded. If you are not open to speaking with people of different religion, or different kin(vampires, therians, faeries, etc), then this site is not for you. <br> This is a website for knowledge, opinions, ideas, beliefs, and acceptance. The website accepts everyone, but you may not accept this site, in which case, we would rather not waste our time with you. <br> portalMessage+="<table align='center'><tr><td>Site rules:<br><br>"; //just keep adding to portalMessage portalMessage+="1. No, no, no, no spamming in random threads. That's kind of a given, yet it occurs too often on other websites.<br>"; portalMessage+="2. Be respectful. This is a website for people of all races, ages, gender, religion, and kin. If you can not respect another's opinions, beliefs, personality, race, age, gender, or kin, then you don't belong on this forum, I'm afraid.<br>"; portalMessage+="3. If you're going to ****ing curse, it sure as ****ing hell should not be excessive, just for ****'s sake(See what I did there?). Swearing is fine, but please don't go over the top. It may be forgivable in some situations(Rants, quotes, etc.) <br>"; portalMessage+="4. This is NOT a place to push your theories, beliefs, or opinions on anyone. Only a place to share them, debate about them, and meet people that feel the same way.<br>"; portalMessage+="5. Do not advertise your website in the C-box.<br>"; portalMessage+="6. No trolling. This means you may not post in a forum with the intention of simply striking an argument. For example, do not purpously go into a thread about Lady GaGa simply to say, "Lady GaGa is GAY!" Not only is it not true, but it does nothing but ruin the thread. Trolling is not likely to get you anywhere good, savvy?<br>"; portalMessage+="7. No flaming. We all have people we don't particularly like, but there's no need to blast anyone in the forum, or on the C-box, or even in PM. If things get to be too much, PM a staff member, and we will deal with the situation accordingly.<br>"; portalMessage+="8. If flaming becomes two sided, or some argument has begun, take it to PM. It doesn't look pretty for other members to see, and no one likes to hear the drama. C-box argument messages will be removed, as well as threads containing arguments.<br>"; portalMessage+="9. NO. DRAMA. WHAT. SO. EVER! Honestly? No one needs it. Really. It's fine to share your personal life, and even to complain about it in the forum, but if it gets too ridiculous (Suicide threads, hate threads, etc.) Don't expect them to last too long.<br>"; portalMessage+="10. Any thread posted in the wrong area will simply be moved to the correct area. No big deal. :) <br>; portalMessage+="11. Let's try to keep complaints to a minimum. If your demands aren't being met, then we'll try our best to meet them, but please do not bug the mods to death. <br>; portalMessage+="12. Have a good time. We're all here to unite as people. Remember that. Not as a religion, or group, or anything. As people, so that we may learn from each other. <br>; </td></tr></table>"; portalMessage+="<br><p align='right'>If agree to follow these rules, click \"I accept\" below.<br>If you will not follow these rules, click \"I decline\"<br>"; </p><br>";
var declineURL="http://www.blanksite.com/"; //URL of where to send them if they decline
var defaultBG = "4C8C00"; var defaultTxt= "000000"; var portKeyWidth="800";
//NO FURTHER EDITS SHOULD BE NECESSARY
function declineFnc() { window.location=declineURL; }
function acceptFnc() { todDate=new Date(); todDate2=todDate.getFullYear()+"-"+todDate.getMonth()+"-"+todDate.getDate(); todDate.setYear(todDate.getFullYear()+1); document.cookie="portkey="+escape(todDate2)+"; expires="+todDate; window.location="\index.cgi?"; }
function makePortKey() { tbs=document.getElementsByTagName('table'); for (a=0;a<tbs.length; a++) { tbs[a].style.display="none"; } divs=document.getElementsByTagName('div'); for (a=0;a<divs.length; a++) { divs[a].style.display="none"; }
pkmessage="<table align='center' height='400' width='"+portKeyWidth+"' cellpadding='5' class='bordercolor' cellspacing='5'><tr><td>"; pkmessage+="<table align='center' width='100%' height='100%' style='background-color:"+defaultBG+"' cellpadding='0' class='windowbg'><tr><td>"; if (banMsg) pkmessage+=bannedMessage; if (expMsg) pkmessage+=absenceMessage;
pkmessage+="</td></tr><tr><td><font color="+defaultTxt+">"; pkmessage+=portalMessage; pkmessage+="</font></td></tr>";
pkmessage+="<tr><td height='10%'><table width='100%' valign='bottom'><tr>"; pkmessage+="<td align='center' width='50%'><input id='acc' type='button'onclick='acceptFnc()'>I Accept</input></td>"; pkmessage+="<td align='center' width='50%'><input id='dec' type='button' onclick='declineFnc()'>I Decline</input></td>"; pkmessage+="</tr></table></td></tr>"; pkmessage+="</table>"; pkmessage+="</td></tr></table>";
document.getElementById('pk').innerHTML=pkmessage; document.getElementById('pk').style.display=''; }
tds=document.getElementsByTagName('td'); for (w=tds.length-1; w>0; w--) { if (tds[w].width=="100%" && tds[w].className=="windowbg" && !tds[w].getElementsByTagName('form').length) { fnts=tds[w].getElementsByTagName('font'); if (fnts[0] && fnts[0].size=="2" && fnts[0].innerHTML.match(/Sorry, but you have been banned from this forum./i)) { todDate=new Date(); todDate.setYear(todDate.getFullYear()+10); document.cookie="portkey="+escape("banned")+"; expires="+todDate; portKeyActive=false; } } } document.write("<div id='pk' width='100%' style='display:none'></div>"); if (pb_username!="Guest" && portKeyActive && !location.href.match(/headersfooters/i)) { var showPortKey=true; var banMsg=false; var expMsg=false; var noobMsg=false; if (document.cookie.match(/portkey=([^;]*)/)) { res=RegExp.$1; if (res!="banned") { res=unescape(res); res=res.split('-'); lastDate=new Date(res[0],res[1],res[2]); todDate=new Date(); diff=todDate.getTime()-lastDate.getTime(); diff/=(1000*60*60*24); if (diff>absenceTime) expMsg=true; } else { banMsg=true; } } else { noobMsg=true; } if ((absenceMonitor=="yes" && expMsg)||(bannedMonitor=="yes" && banMsg)||noobMsg) {
if (!pb_username.match(exemptUsers)) makePortKey();
} } if (pb_username=='admin') { adLink=document.createElement('a'); adLink.align='center'; adLink.href='javascript:void(0);'; adLink.onclick= function() {makePortKey()}; adLink.style.backgroundColor='000000'; adLink.style.color='FFFFFF'; adLink.innerHTML='PORTKEY TEST'; document.write('<div width="100%" id="linkspace" align="center"></div>'); document.getElementById('linkspace').appendChild(adLink); } // --> </script>
<script type="text/javascript"> <!-- var fWidth = '714';
var table = document.getElementsByTagName('table'); for(t=0; t<table.length; t++) { if(table.item(t).width == "92%") { table.item(t).width = fWidth; } } // --> </script>
|
|
|
Post by Wormopolis on Jun 6, 2010 20:55:56 GMT -8
you cant put HTML in the middle of javascript like that. you have to use the variables to add more conent.
var portalMessage="<font size='4'>Welcome to ☼►All Kin◄☼!</font><br><br><br>"; portalMessage+="<br><br><P align=\"center\"> *WARNING*<br>This website is not for the close minded. If you are not open to speaking with people of different religion, or different kin(vampires, therians, faeries, etc), then this site is not for you.<br>This is a website for knowledge, opinions, ideas, beliefs, and acceptance. The website accepts everyone, but you may not accept this site, in which case, we would rather not waste our time with you. <br>";
|
|
allkin
Not New Member
Posts: 8
allkin said 0 great things
|
Post by allkin on Jun 7, 2010 8:05:56 GMT -8
Ooooh. Thank you very much! I was wondering why that wasn't working. I'll go try that. But do you think that'll fix the entire thing? Sorry. I'm a total newb at codes but I'm learning as I go.
EDIT: I put that into the code and it still is not working. Whatever link is supposed to be there for me to click to view the page is not working, and nothing shows up, guest or otherwise. :/
|
|
|
Post by Wormopolis on Jun 7, 2010 16:25:50 GMT -8
paste what you have for the editable part now. or you need to put a URL I can look at it with. and if you have any " in the portalMessage, you need to escape them by putting a \ in front of them.
|
|
allkin
Not New Member
Posts: 8
allkin said 0 great things
|
Post by allkin on Jun 7, 2010 20:47:43 GMT -8
Okay. ^^ So, the biggest issue is, I put it in the right spot, but it shows up NO WHERE. O.o The link to view it as an admin or otherwise.
<script type="text/javascript"> <!-- /* PortKey v1.21 By Wormopolis Keep Header intact, Do not repost without permission */
//EDIT THESE var portKeyActive = true; //true if you want it on, false if you dont
var exemptUsers=/()/;
var absenceMessage="You've been away a long time, here are the basic rules of the site in case you forgot.:" var absenceTime = 30; //number of days someone can be absent before they see portal again var absenceMonitor = "yes" // yes if you want portal reshown to members who havent been on in a while // no if you dont.
var bannedMessage="You were recently banned. Perhaps you should look over the site rules again?:" var bannedMonitor = "yes" // yes if you want someone who was recently unbanned to see portal again // no if you dont
var portalMessage="<font size='4'>Welcome to ☼►All Kin◄☼!</font><br><br><br>"; portalMessage+="<br><br><P align=\"center\"> *WARNING*<br>This website is not for the close minded. If you are not open to speaking with people of different religion, or different kin(vampires, therians, faeries, etc), then this site is not for you.<br>This is a website for knowledge, opinions, ideas, beliefs, and acceptance. The website accepts everyone, but you may not accept this site, in which case, we would rather not waste our time with you. <br>"; <br> portalMessage+="<table align='center'><tr><td>Site rules:<br><br>"; //just keep adding to portalMessage portalMessage+="1. No, no, no, no spamming in random threads. That's kind of a given, yet it occurs too often on other websites.<br>"; portalMessage+="2. Be respectful. This is a website for people of all races, ages, gender, religion, and kin. If you can not respect another's opinions, beliefs, personality, race, age, gender, or kin, then you don't belong on this forum, I'm afraid.<br>"; portalMessage+="3. If you're going to ****ing curse, it sure as ****ing hell should not be excessive, just for ****'s sake(See what I did there?). Swearing is fine, but please don't go over the top. It may be forgivable in some situations(Rants, quotes, etc.) <br>"; portalMessage+="4. This is NOT a place to push your theories, beliefs, or opinions on anyone. Only a place to share them, debate about them, and meet people that feel the same way.<br>"; portalMessage+="5. Do not advertise your website in the C-box.<br>"; portalMessage+="6. No trolling. This means you may not post in a forum with the intention of simply striking an argument. For example, do not purpously go into a thread about Lady GaGa simply to say, "Lady GaGa is GAY!" Not only is it not true, but it does nothing but ruin the thread. Trolling is not likely to get you anywhere good, savvy?<br>"; portalMessage+="7. No flaming. We all have people we don't particularly like, but there's no need to blast anyone in the forum, or on the C-box, or even in PM. If things get to be too much, PM a staff member, and we will deal with the situation accordingly.<br>"; portalMessage+="8. If flaming becomes two sided, or some argument has begun, take it to PM. It doesn't look pretty for other members to see, and no one likes to hear the drama. C-box argument messages will be removed, as well as threads containing arguments.<br>"; portalMessage+="9. NO. DRAMA. WHAT. SO. EVER! Honestly? No one needs it. Really. It's fine to share your personal life, and even to complain about it in the forum, but if it gets too ridiculous (Suicide threads, hate threads, etc.) Don't expect them to last too long.<br>"; portalMessage+="10. Any thread posted in the wrong area will simply be moved to the correct area. No big deal. :) <br>; portalMessage+="11. Let's try to keep complaints to a minimum. If your demands aren't being met, then we'll try our best to meet them, but please do not bug the mods to death. <br>; portalMessage+="12. Have a good time. We're all here to unite as people. Remember that. Not as a religion, or group, or anything. As people, so that we may learn from each other. <br>; </td></tr></table>"; portalMessage+="<br><p align='right'>If agree to follow these rules, click \"I accept\" below.<br>If you will not follow these rules, click \"I decline\"<br>"; </p><br>";
var declineURL="http://www.blanksite.com/"; //URL of where to send them if they decline
var defaultBG = "4C8C00"; var defaultTxt= "000000"; var portKeyWidth="800";
//NO FURTHER EDITS SHOULD BE NECESSARY
just needed the editable parts
|
|
|
Post by Wormopolis on Jun 7, 2010 21:18:20 GMT -8
var portalMessage="<font size='4'>Welcome to ☼►All Kin◄☼!</font><br><br><br>"; portalMessage+="<br><br><P align=\"center\"> *WARNING*<br>This website is not for the close minded. If you are not open to speaking with people of different religion, or different kin(vampires, therians, faeries, etc), then this site is not for you.<br>This is a website for knowledge, opinions, ideas, beliefs, and acceptance. The website accepts everyone, but you may not accept this site, in which case, we would rather not waste our time with you. <br>"; portalMessage+="<table align='center'><tr><td>Site rules:<br><br>"; //just keep adding to portalMessage portalMessage+="1. No, no, no, no spamming in random threads. That's kind of a given, yet it occurs too often on other websites.<br>"; portalMessage+="2. Be respectful. This is a website for people of all races, ages, gender, religion, and kin. If you can not respect another's opinions, beliefs, personality, race, age, gender, or kin, then you don't belong on this forum, I'm afraid.<br>"; portalMessage+="3. If you're going to ****ing curse, it sure as ****ing hell should not be excessive, just for ****'s sake(See what I did there?). Swearing is fine, but please don't go over the top. It may be forgivable in some situations(Rants, quotes, etc.) <br>"; portalMessage+="4. This is NOT a place to push your theories, beliefs, or opinions on anyone. Only a place to share them, debate about them, and meet people that feel the same way.<br>"; portalMessage+="5. Do not advertise your website in the C-box.<br>"; portalMessage+="6. No trolling. This means you may not post in a forum with the intention of simply striking an argument. For example, do not purpously go into a thread about Lady GaGa simply to say, \"Lady GaGa is GAY!\" Not only is it not true, but it does nothing but ruin the thread. Trolling is not likely to get you anywhere good, savvy?<br>"; portalMessage+="7. No flaming. We all have people we don't particularly like, but there's no need to blast anyone in the forum, or on the C-box, or even in PM. If things get to be too much, PM a staff member, and we will deal with the situation accordingly.<br>"; portalMessage+="8. If flaming becomes two sided, or some argument has begun, take it to PM. It doesn't look pretty for other members to see, and no one likes to hear the drama. C-box argument messages will be removed, as well as threads containing arguments.<br>"; portalMessage+="9. NO. DRAMA. WHAT. SO. EVER! Honestly? No one needs it. Really. It's fine to share your personal life, and even to complain about it in the forum, but if it gets too ridiculous (Suicide threads, hate threads, etc.) Don't expect them to last too long.<br>"; portalMessage+="10. Any thread posted in the wrong area will simply be moved to the correct area. No big deal. :) <br>; portalMessage+="11. Let's try to keep complaints to a minimum. If your demands aren't being met, then we'll try our best to meet them, but please do not bug the mods to death. <br>; portalMessage+="12. Have a good time. We're all here to unite as people. Remember that. Not as a religion, or group, or anything. As people, so that we may learn from each other. <br>; </td></tr></table>"; portalMessage+="<br><p align='right'>If agree to follow these rules, click \"I accept\" below.<br>If you will not follow these rules, click \"I decline\"<br>"; </p><br>";
the lady Gaga part still had quotes that needed to be escaped, and there was a stray <BR> in the middle of that that javascript doesnt like so much.
|
|
allkin
Not New Member
Posts: 8
allkin said 0 great things
|
Post by allkin on Jun 8, 2010 7:37:06 GMT -8
Okay, so I don't know what in the world I'm doin' wrong, but nothing shows up. :/ there isn't a link anywhere to view it as an admin...Or anything. :/ I do put it in the Global Footer, yes? I'm just copying and pasting exactly what I need. :/ Could one of my other codes be affecting it?
|
|
|
Post by Wormopolis on Jun 8, 2010 15:15:32 GMT -8
its possible. I would need a URL in order to determine that however.
and yes, global footer. also can you add into the exemptuser variable the name "merkin"
|
|
allkin
Not New Member
Posts: 8
allkin said 0 great things
|
Post by allkin on Jun 8, 2010 19:17:19 GMT -8
Hey, I'm going to PM you the codes I have in my global header/footer...because this is frustrating! xD
|
|