Dale wrote:
I'm creating a small site for the hacks
go dale!
if you need help just email.
You are not logged in. Please login or register.
PunBB Forums → Posts by sporkit
Dale wrote:
I'm creating a small site for the hacks
go dale!
if you need help just email.
well i had to do it the hard way but basicly i reconstructed my template from scratch and found that if i didnt have the # in front of the backround color then it would appear blank.
still dont know why the tables apear in strange places in netscape. for now i guess im good though.
ahh lol. yea i think its new so im like totally lost and really need the user mod off that.
maybe we could set something temporaty up if people have the mods still.
Vad hände?
Jag råkade ut för en serverkrasch vilket resulterade i
att en uppdatering av mjukvaran skedde på samma gång.
Därför har servern varit nere under drygt en vecka.
so wait wait. does this say something new?! im a stupid american .
i created dropdowns using a script i found with this link.
http://dynamicdrive.com/dynamicindex1/dropmenuindex.htm
basicly it allows you to create text that has a dropdown associated with it.
this goes in the header
<script language="JavaScript1.2">
//Drop down menu link- © Dynamic Drive (www.dynamicdrive.com)
//For full source code and 100's more DHTML scripts, visit http://www.dynamicdrive.com
//Credit MUST stay intact for use
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href=/clan_members.php><font size=0 face=verdana color=FFFFFF> ../clan members</font></a><br>'
menu1[1]='<a href=/clan_members.php><font size=0 face=verdana color=FFFFFF> ../clan history</font></a><br>'
//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href=test.htm><font size=0 face=verdana color=FFFFFF> ../fatal articles</font></a><br>'
menu2[1]='<a href=test.htm><font size=0 face=verdana color=FFFFFF> ../gap attack</font></a><br>'
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href=test.htm>Menu link here</a><br>'
menu3[1]='<a href=test.htm>Menu link here</a><br>'
menu3[2]='<a href=test.htm>Menu link here</a><br>'
</script>
this goes just after the body tag
<script language="JavaScript1.2">
//reusable/////////////////////////////
//Drop down menu by http://www.dynamicdrive.com
var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")
function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"
themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu
themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0
themenuStyle.left=ns6||ns4? e.pageX-e.layerX : themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 : themenuoffsetY+event.clientY-event.offsetY+18
hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}
function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}
if (ie4||ns6)
document.onclick=hidemenu
//reusable/////////////////////////////
</script>
i place this where i want and the text /MEMBS will have a dropdown associated with it.
<!----------Menu 1 starts here---------->
<ilayer>
<layer visibility=show>
<div class=wrap1>
<span class=wrap2 onClick="dropit(event, 'dropmenu0');event.cancelBubble=true;return false"><a href="alternate.htm" onClick="if(ns4) return dropit(event, 'document.dropmenu0')"><font color="#FFFFFF" face=Verdana> /MEMBS</font></a>
</span>
</div>
</layer>
</ilayer><br>
<!----------Menu 1 ends here---------->
<!----------Menu 2 starts here---------->
<ilayer>
<layer visibility=show>
<div class=wrap1>
<span class=wrap2 onClick="dropit(event, 'dropmenu1');event.cancelBubble=true;return false"><a href="alternate.htm" onClick="if(ns4) return dropit(event, 'document.dropmenu1')"><font color="#FFFFFF" face=Verdana> /INFO</font></a>
</span>
</div>
</layer>
</ilayer><br>
<!----------Menu 2 ends here---------->
this goes at the bottom of the page and defines the colors of the dropdowns.
<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:5f7797;width:100;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="4px"
for (i=0;i<menu1.length;i++)
document.write(menu1[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu0.captureEvents(Event.CLICK)
document.dropmenu0.onclick=hidemenu
}
</script>
<div id=dropmenu1 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:5f7797;width:100;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu1.style.padding="4px"
for (i=0;i<menu2.length;i++)
document.write(menu2[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu1.captureEvents(Event.CLICK)
document.dropmenu1.onclick=hidemenu
}
</script>
<div id=dropmenu2 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:120;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu2.style.padding="4px"
for (i=0;i<menu3.length;i++)
document.write(menu3[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu2.captureEvents(Event.CLICK)
document.dropmenu2.onclick=hidemenu
}
</script>
it works on the other pages. you can click /ROOT then membes and /INFO to take a look. it just in the forum where the code is a problem. www.fatalthugs.com
if there is any other information you need i would be glad to post. so far im stumped as to why it would do this though.
Kennel wrote:
Why it doesn't work correctly when used in the forums is beyond me at this time. I haven't had the strength to read through your code above though. Perhaps I will be up to it tomorrow. Does the output look correct? I mean, is the output in the forums the same as the output on the other pages?
the backround doesnt appear for the dropdowns on the forums but does on the other parts of my site.
heh yea tomorrow i think i show my code more specifcily. must be something with the css i use or... something.
i found a little script that i managed to mod just a bit and got a cool dropdown effect for my site. the only problem is that they dont seem to work as well when i stick them in the template for my boards.
i think its possibly that the script tags dont work in a .tpl file. is there some type of obvios problem that im missing here?
you can peep what im talking about at http://www.fatalthugs.com/forum/index.php
thanks guys.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html dir="{pun_content_direction}">
<head>
<script language="JavaScript1.2">
//Drop down menu link- © Dynamic Drive (www.dynamicdrive.com)
//For full source code and 100's more DHTML scripts, visit http://www.dynamicdrive.com
//Credit MUST stay intact for use
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href=/clan_members.php><font size=0 face=verdana color=FFFFFF> ../clan members</font></a><br>'
menu1[1]='<a href=/clan_members.php><font size=0 face=verdana color=FFFFFF> ../clan history</font></a><br>'
//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href=test.htm><font size=0 face=verdana color=FFFFFF> ../fatal articles</font></a><br>'
menu2[1]='<a href=test.htm><font size=0 face=verdana color=FFFFFF> ../gap attack</font></a><br>'
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href=test.htm>Menu link here</a><br>'
menu3[1]='<a href=test.htm>Menu link here</a><br>'
menu3[2]='<a href=test.htm>Menu link here</a><br>'
</script>
<meta http-equiv="Content-Type" content="text/html; charset={pun_char_encoding}">
{pun_head}
</head>
<body{pun_body}>
<script language="JavaScript1.2">
//reusable/////////////////////////////
//Drop down menu by http://www.dynamicdrive.com
var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")
function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"
themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu
themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0
themenuStyle.left=ns6||ns4? e.pageX-e.layerX : themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 : themenuoffsetY+event.clientY-event.offsetY+18
hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}
function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}
if (ie4||ns6)
document.onclick=hidemenu
//reusable/////////////////////////////
</script>
<!--start my site-->
<br>
<center>
<!-- Main Table -->
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#808080" width="670"><tr><td colspan="2">
<!-- Header -->
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="100%"><tr><td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#808080" width="100%">
<tr>
<td height="90" bgcolor="#354463"><div align="center"><img src="/f8l_banner.gif" height="75" width="95%"></div></td>
</tr>
</table>
</td></tr></table>
<!-- End Header -->
</td></tr>
<tr><td>
<!-- Menu -->
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="100%"><tr><td>
<table cellspacing="1" cellpadding="2" border="0" bgcolor="#354463" width="100%">
<tr>
<td bgcolor="#354463" class="small" width="150"> NAVIGATION >> </td>
</tr>
</table>
</td></tr></table>
</td>
<td>
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="520"><tr><td>
<table cellspacing="1" cellpadding="2" border="0" bgcolor="#354463" width="520">
<tr>
<td bgcolor="#5F7797" class="small" align="center" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'"><a href="/default3.php"><font color="#e9f2fc">/ROOT</font></a></td>
<td width="70" bgcolor="#5F7797" class="small" align="left" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'">
<!----------Menu 1 starts here---------->
<ilayer>
<layer visibility=show>
<div class=wrap1>
<span class=wrap2 onClick="dropit(event, 'dropmenu0');event.cancelBubble=true;return false"><a href="alternate.htm" onClick="if(ns4) return dropit(event, 'document.dropmenu0')"><font color="#FFFFFF" face=Verdana> /MEMBS</font></a>
</span>
</div>
</layer>
</ilayer><br>
<!----------Menu 1 ends here---------->
</td>
<td bgcolor="#5F7797" class="small" align="center" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'"><a href="/forum/index.php"><font color="#e9f2fc">/FORUM</font></a></td>
<td bgcolor="#5F7797" class="small" align="center" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'"><a href="/clan_pics/index.php"><font color="#e9f2fc">/PICS</font></a></td>
<td bgcolor="#5F7797" class="small" align="center" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'"><a href="/Links.php"><font color="#e9f2fc">/LINKS</font></a></td>
<td width="60" bgcolor="#5F7797" class="small" align="left" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'">
<!----------Menu 2 starts here---------->
<ilayer>
<layer visibility=show>
<div class=wrap1>
<span class=wrap2 onClick="dropit(event, 'dropmenu1');event.cancelBubble=true;return false"><a href="alternate.htm" onClick="if(ns4) return dropit(event, 'document.dropmenu1')"><font color="#FFFFFF" face=Verdana> /INFO</font></a>
</span>
</div>
</layer>
</ilayer><br>
<!----------Menu 2 ends here---------->
</td>
<td bgcolor="#5F7797" class="small" align="center" onMouseOver="this.style.backgroundColor='#354463';" onMouseOut="this.style.backgroundColor='#5F7797'"><a href="/vids_game.php"><font color="#e9f2fc">/VIDS</font></a></td>
</tr>
</table>
</td></tr></table>
<!-- End Menu -->
</td></tr>
<tr><td colspan="2">
<!-- Main Field -->
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="100%"><tr><td>
<table border="0" cellpadding="0" cellspacing="10" width="100%" bgcolor="#dcdcdc">
<tr>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td width="100%" align="right">
<p>
<font size="2"><a href="/member_tools.php"><font color=707770>SITE TOOLS</font></a> // <a href="/forum/login.php?action=out"><font color=707770>LOGOUT</font></a></font>
</p>
</td></tr>
</table>
<table width=100% height=100%>
<tr>
<td align=left>
<!--end my site-->
<table class="punmain" cellspacing="1" cellpadding="4">
<tr class="punhead">
<td class="punhead">
<span class="punheadline">{pun_title}</span><br>
{pun_desc}
</td>
</tr>
<tr>
<td class="puncon1">
{pun_navlinks}<br><br>
{pun_status}
</td>
</tr>
</table>
{pun_main}
<table class="punmain" cellspacing="1" cellpadding="4">
<tr>
<td class="puncon2">
<table class="punplain" cellspacing="0" cellpadding="0">
<tr>
<td class="puntop">
</td>
<td class="puntopright">
Powered by <a target="_blank" href="http://punbb.org/">PunBB</a><br>
Version: 1.0.1<br>
© Copyright 2002, 2003 Rickard Andersson
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--start my site-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<!-- End Mainfield -->
</td></tr>
<tr><td colspan="2" width="100%">
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="100%"><tr><td>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#354463" align="left" class="infohead" width="25%"><a href=bug_rpt.php><font color="FFFFFF">Report a bug / comment!</font></a></td>
<td bgcolor="#354463" align="right" class="infohead" width="75%">© copyright 2003 coded by: <a href=http://www.sporkit.com><font color=707770>www.sporkit.com</font></a></td></tr></table></td>
</tr>
</table>
</td></tr></table>
</table>
<!-- End Main Table -->
</center>
<br>
<!--end my site-->
<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:5f7797;width:100;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu0.style.padding="4px"
for (i=0;i<menu1.length;i++)
document.write(menu1[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu0.captureEvents(Event.CLICK)
document.dropmenu0.onclick=hidemenu
}
</script>
<div id=dropmenu1 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:5f7797;width:100;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu1.style.padding="4px"
for (i=0;i<menu2.length;i++)
document.write(menu2[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu1.captureEvents(Event.CLICK)
document.dropmenu1.onclick=hidemenu
}
</script>
<div id=dropmenu2 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:120;visibility:hidden;border:1px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
dropmenu2.style.padding="4px"
for (i=0;i<menu3.length;i++)
document.write(menu3[i])
</script>
</div>
<script language="JavaScript1.2">
if (document.layers){
document.dropmenu2.captureEvents(Event.CLICK)
document.dropmenu2.onclick=hidemenu
}
</script>
</body>
</html>
damn. heh, i really need that one asap.
does anybody else have a copy they could possibly send to me somehow? if so just send me an email. thanks so much.
lol, yea it hit me after a while that the passwords are check as their md5 hashed values. it works pretty well now.
plus keeping my users logged in threw cookies really rocks. cuts way down on the amount of complaining they do.
hmm that link appears to be dead. is there a place where i could still get that?
my members are really giveing me hell about a clan members only section.
heh.
thanks yo!
Kennel wrote:
Could you explain exactly why you want to pull the password from the database? I don't understand.
well the scirpt i made to controll access to special parts of the site uses sessions. it checks to see if there is something in the variable $uid and $pwd. if there isnt it presents them with a form and then checks to see if the exisiting user is in the database.
i could make this script pull the $uid and $pwd from the punbb cookie so itll seem like their always loged in. if they arnt then ill probably edit it to show a link to the login on your forum or something.
oh and this file is accesscntrl.php which is included at the top of all the pages that i want only registered users to see.
EDIT: well now that i think of it. doesnt the password get encrypted by php then that longer code trys to match up with whats in the database?
if thats the case then i think i would probably need to rewrite my script.
asdf
<?php
// We add the forums directory to the PHP path so that PHP can find the scripts we include later
ini_set('include_path', ini_get('include_path').';.\forum');include 'config.php';
// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');// The next line tells PunBB to not update the cookie of the visiting user
// A visit to the front page shouldn't affect stuff like new post indicators
define('PUN_DONT_UPDATE_COOKIE', 1);
require 'include/common.php';?>
asdfasdf
woohoo
asdf
asdfasdf
hot damn. i think that might have done it. i took the @ character off the include so it wouldnt suppress any error messages and eveyrthing seems good.
haha, uhh ok now what do i do.
jk, i used that little command you showed me in an email. dump($cookie); and i think now i have what i need to work with.
oh yea. there is still however the issue of pulling the password from the database. how would i run an MD5 hash on a variable in the forum... $cur_user[password] ?
oh btw:
ini_set('include_path', ini_get('include_path').';.\forum');
is what finally worked for me. even after this last post i had to edit the . in front of the \forum. maybe it would be helpful to others to change that in the other topic i viewed to get this code.
just a thought.
but really thanks for the help. hopefully well ill be putting some more cool new features in the show off section.
nice
hmm about the password thing. i messed it up the first time then it took a little while for me to get the second password email back. lol, here i am trying to mod thi board and i cant even register right.
anyway, i tried the command you showed me.
exit(ini_get('include_path'));
i used this code.
asdf
<?php
// We add the forums directory to the PHP path so that PHP can find the scripts we include later
ini_set('include_path', ini_get('include_path').'\forum');@include 'config.php';
exit(ini_get('include_path'));
// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');// The next line tells PunBB to not update the cookie of the visiting user
// A visit to the front page shouldn't affect stuff like new post indicators
define('PUN_DONT_UPDATE_COOKIE', 1);
require 'include/common.php';exit(ini_get('include_path'));
?>
asdfasdf
and got this message
asdf .;c:\php\includes\forum
oh and i also was using :..\forum without the s. that was just a typo. hmm i also went ahead and tried to think of other combinations like ..\forum ect ect.
anywas thanks for the help so far.
however thats definatly not where i have my website stored. its actually on the d: drive in a folder called fatalthugs.com site or something. maybe i need to modify php.ini?
heh, yup.
http://www.fatalthugs.com is running the latest version of punbb. i run the site out of my basement off a dsl line so this fast loading forum was perfect for me. i also happened to integrate the database of the forum into my site. so like registered members of the forum get special privs and options when the login to me site... and stuff.
does that mean that these boards allow you to place php code in the template without mods?
ok so i integrated this board with the login for the rest of my site. http://www.fatalthugs.com
if you give /ROOT a peep you can see the login box at the bottom of the screen. if a user types his forum name and password into there everyting works nicely and they get a little list of options.
the only thing now is having to retype the password even if your logged into the forum is becoming a pain.
if i could just pull the username and password out of the cookie for punbb then im pretty confident that i wouldnt have much trouble getting users logged in automaticly.
heres what ive tried so far.
<?php include("siteheader.php"); ?>
asdf
<?php
// We add the forums directory to the PHP path so that PHP can find the scripts we include later
ini_set('include_path', ini_get('include_path').'/forums');@include 'config.php';
// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');// The next line tells PunBB to not update the cookie of the visiting user
// A visit to the front page shouldn't affect stuff like new post indicators
define('PUN_DONT_UPDATE_COOKIE', 1);
require 'include/common.php';?>
asdfasdf
<?php include("sitefooter.php"); ?>
however i get the error message
asdf config.php doesn't exist or is corrupt. Please run install.php to install PunBB first.
its pulling the siteheader and sitefooter includes just fine. so i guess that means that its setting the path incorrectly.
all im looking for is the bare minimum code that pulls out the username and password. if i could get this working them im pretty sure ill be able to understand the rest just fine.
thanks for the help everybody.
oh btw, this is sporkit. heh, i must have forgotten to change the password on my other account and i think the password rest function is broken. oh well
EDIT: oh yea and if we need im putting this all in a file called cookie.php on my site for testing. you can check it out here... http://www.fatalthugs.com/cookie.php
PunBB Forums → Posts by sporkit
Powered by PunBB, supported by Informer Technologies, Inc.