Jump to content

DjDTM

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DjDTM

  • Rank
    Newbie
  • Birthday 03/14/1989

Contact Methods

  • AIM
    djdtm3k
  • MSN
    djdtm.a@gmail.com
  • Website URL
    http://www.djdtm.com
  • ICQ
    0

Profile Information

  • Location
    The Internet
  • Interests
    WEBSITE!
  1. DjDTM

    Website looks off.

    Here is my screenshot.See, it looks just fine in IE7, and then it looks funky in firefox.DjDTM Browsers ScreenshotsEDIT: I had to remove the id="basic_image" because it was invalid xhtml1.0 strict, besides it didn't change the way it looked anyway.The reason why I use graphical navigations is because, since I enjoy graphics and webdesign, I wanted to show both being incorporated at the same time.NOTE: screenshots were taken AFTER I removed all of the id="basic_image" attributes although it looked the same with it.
  2. DjDTM

    Website looks off.

    All suggestions added, and still looking the same. Man I am at a loss of words.Why would firefox do this to me?
  3. DjDTM

    Website looks off.

    Still no luck, with any of your suggestions...
  4. DjDTM

    Website looks off.

    Here is my website:http://www.djdtm.comThe layout is off in some places, with some gaps in between the images. (3 pixels)It was when I was trying to make my site XHTML 1.0 strict validated. (Which I've accomplished)If you look at the source code you'll see I tried coding everything with use of the CSS "style" attribute.Some help would be greatly appreciated.Thanks!EDIT:Also, it looks fine in Internet Explorer.But for me it looks messed up in firefox.
  5. DjDTM

    BBCode to HTML

    I put the include up at the top before my connection code, still got nothing.I put in your code and got nothing.I put quotes around "post_text", and still got nothing.Doesn't anyone else know PHP? Jesus.Again:I tested again, If I removed the line: $post_body = markup($post_body); The post shows up propperly without the code replacement.So the problem lies with in that line of code, or the markup function...EDIT:Ok progress, I moved the return $post_body; inside the brackets.And the post loads, without breaks, or correct replacement of the BBCODE.Then I changed the: $post_body=$rows2["post_text"];$post_body = markup($post_body); Back to: $post_body = markup($rows2["post_text"]); Same results as before. Shows the post, no breaks, no code replacement.You can see the test here:http://www.djdtm.com/index.php?page=forumrulesSee the orignal here:http://www.djdtm.com/forums/viewtopic.php?t=28You can see how the bbcode shows up all funky, and there are no breaks.Current forumrules: <table align="center" border="0" cellspacing="0" cellpadding="0" width="95%"><tr><td height="216" align="center"><?phpinclude("connect2mysql.php");include("post2sitefunction.php");//Mysql Connect Script $result = mysql_query("SELECT * from phpbb_topics WHERE forum_id=25 AND topic_vote != 1 order by topic_id desc LIMIT 0, 1") or die("Invalid query: " . mysql_error()); while($myrow=mysql_fetch_array($result)) { $topic_id = $myrow["topic_id"]; $sql = sprintf("Select * from phpbb_posts_text where post_subject='%s' order by post_id desc LIMIT 0, 1", $myrow["topic_title"]); $result2 = mysql_query($sql) or die("Couldn't get news post"); while($rows2=mysql_fetch_array($result2)) $post_body = markup($rows2["post_text"]); }?><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="12"></td><td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="12" height="12" align="left" valign="top"></td> <td valign="top" align="left"><font color="#990000" style="font-size: 11px;"> <?php printf("%s", $post_body);?> </font></td> <td width="12"></td> </tr></table></td><td width="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td height="12" align="center" class="style4">---------------------------------------------------------------------------------------</td> </tr></table> <br /> <a href="http://www.djdtm.com/forums">Enter</a></td></tr></table> post2sitefunction.php code: <? function markup($post_body){ $find = array("<", ">"); $replace = array("<", ">"); $post_body=str_replace($find, $replace, $post_body); $find=array("/\[img\](.+?)\[\/img]/","/\[url=(.+?)\](.+?)\[\/url\]/","/\[url\](.+?)\[\/url\]/","/\[b\]([^$]*)\[\/b\]/","/\[u\]([^$]*)\[\/u\]/","/\[i\]([^$]*)\[\/i\]/","/\[quote\]\[originator=(.+?)\]([^$]*)\[\/quote\]/","/\[quote\]([^$]*)\[\/quote\]/","/\[sup\]([^$]*)\[\/sup\]/","/\[sub\]([^$]*)\[\/sub\]/","/\[div align=(.+?)\]([^$]*)\[\/div\]/","/\[size=(.+?)\]([^$]*)\[\/size\]/","/\[anchor\](.+?)\[\/anchor\]/","/\[color=(.+?)\]([^$]*)\[\/color\]/","/([^'>])http:\/\/([^'<\s]+)/","/^http:\/\/([^'<\s]+)/"); $replace=array("<img src=$1 alt=$1/>","<a href src='$2'>$1</a>","<a href src='$1'>$1</a>","<b>$1</b>","<u>$1</u>","<i>$1</i>","<br /><ul>quote <b>$1</b><br /><hr />$2<hr /></ul><br />","<br /><ul>quote<br /><hr />$1<hr /></ul><br />","<sup>$1</sup>","<sub>$1</sub>","<div align=$1>$2</div>","<font size=\"$1\">$2</font>","<a name=\"$1\"\></a>","<span style=\"color:$1\">$2</span>","$1<a href src='$2'>http://$2</a>","<a href src ='http://$1'>http://$1</a>"); $post_body=preg_replace($find, $replace, $post_body); return $post_body;}?> If it helps i'm using PHPBB2.0.19 for all this.How do I fix this?
  6. DjDTM

    BBCode to HTML

    I did, you just didn't look hard enough.Ok so I removed the space from the include.But it still doesn't change a thing.Current Code of forumrules: <table align="center" border="0" cellspacing="0" cellpadding="0" width="95%"><tr><td height="216" align="center"><?php $conn = mysql_connect("db213.perfora.net","dbo139021429", "3.YcQYTJ") or die("Could not connect: " . mysql_error()); //echo("Connection Successful<br/>"); mysql_select_db("db139021429", $conn); $result = mysql_query("SELECT * from phpbb_topics WHERE forum_id=25 AND topic_vote != 1 order by topic_id desc LIMIT 0, 1") or die("Invalid query: " . mysql_error()); //$myrow = mysql_fetch_array($result); while($myrow=mysql_fetch_array($result)) { $topic_id = $myrow["topic_id"]; // used for the comment system $sql = sprintf("Select * from phpbb_posts_text where post_subject='%s' order by post_id desc LIMIT 0, 1", $myrow["topic_title"]); $result2 = mysql_query($sql) or die("Couldn't get news post"); while($rows2=mysql_fetch_array($result2)) include("post2sitefunction.php"); $post_body = markup($rows2["post_text"]); }?><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="12"></td><td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="12" height="12" align="left" valign="top"></td> <td valign="top" align="left"><font color="#990000" style="font-size: 11px;"> <?php printf("%s", $post_body);?> </font></td> <td width="12"></td> </tr></table></td><td width="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td height="12" align="center" class="style4">---------------------------------------------------------------------------------------</td> </tr></table> <br /> <a href="http://www.djdtm.com/forums">Enter</a></td></tr></table> and then code for post2sitefunction.php <?php function markup($post_body){ $find = array("<", ">"); $replace = array("<", ">"); $post_body=str_replace($find, $replace, $post_body); $find=array("/\[img\](.+?)\[\/img]/","/\[link name=(.+?)\](.+?)\[\/link\]/","/\[link\](.+?)\[\/link\]/","/\[b\]([^$]*)\[\/b\]/","/\[u\]([^$]*)\[\/u\]/","/\[i\]([^$]*)\[\/i\]/","/\[quote\]\[originator=(.+?)\]([^$]*)\[\/quote\]/","/\[quote\]([^$]*)\[\/quote\]/","/\[sup\]([^$]*)\[\/sup\]/","/\[sub\]([^$]*)\[\/sub\]/","/\[div align=(.+?)\]([^$]*)\[\/div\]/","/\[size=(.+?)\]([^$]*)\[\/size\]/","/\[anchor\](.+?)\[\/anchor\]/","/\[color=(.+?)\]([^$]*)\[\/color\]/","/([^'>])http:\/\/([^'<\s]+)/","/^http:\/\/([^'<\s]+)/"); $replace=array("<img src=$1>","<a href='$2'>$1</a>","<a href='$1'>$1</a>","<b>$1</b>","<u>$1</u>","<i>$1</i>","<br /><ul>quote <b>$1</b><br /><hr />$2<hr /></ul><br />","<br /><ul>quote<br /><hr />$1<hr /></ul><br />","<sup>$1</sup>","<sub>$1</sub>","<div align=$1>$2</div>","<font size=\"$1\">$2</font>","<a name=\"$1\"\></a>","<span style=\"color:$1\">$2</span>","$1<a href='http://$2'>http://$2</a>","<a href='http://$1'>http://$1</a>");$post_body=preg_replace($find, $replace, $post_body);return $post_body;}?> forumrules is loading post2sitefunctions correctly cause if I remove the include it gives me this error:Fatal error: Call to undefined function: markup() in /homepages/22/d120960397/htdocs/djdtm/forumrules.inc on line 21So there is obviously something wrong with post2sitefunctions. What is it though.You know giving me 1 line directions isn't going to help at all. So, could you give me more to work with.
  7. DjDTM

    BBCode to HTML

    Umm it kind of does, but it still doesn't work.All you told me to do was to put the code in a different document, but how does that affect way it shows?This is what I've got so far:in post2sitefunction.php I have this code: <?php function markup($post_body){ $find = array("<", ">"); $replace = array("<", ">"); $post_body=str_replace($find, $replace, $post_body); $find=array("/\[img\](.+?)\[\/img]/","/\[link name=(.+?)\](.+?)\[\/link\]/","/\[link\](.+?)\[\/link\]/","/\[b\]([^$]*)\[\/b\]/","/\[u\]([^$]*)\[\/u\]/","/\[i\]([^$]*)\[\/i\]/","/\[quote\]\[originator=(.+?)\]([^$]*)\[\/quote\]/","/\[quote\]([^$]*)\[\/quote\]/","/\[sup\]([^$]*)\[\/sup\]/","/\[sub\]([^$]*)\[\/sub\]/","/\[div align=(.+?)\]([^$]*)\[\/div\]/","/\[size=(.+?)\]([^$]*)\[\/size\]/","/\[anchor\](.+?)\[\/anchor\]/","/\[color=(.+?)\]([^$]*)\[\/color\]/","/([^'>])http:\/\/([^'<\s]+)/","/^http:\/\/([^'<\s]+)/"); $replace=array("<img src=$1>","<a href='$2'>$1</a>","<a href='$1'>$1</a>","<b>$1</b>","<u>$1</u>","<i>$1</i>","<br /><ul>quote <b>$1</b><br /><hr />$2<hr /></ul><br />","<br /><ul>quote<br /><hr />$1<hr /></ul><br />","<sup>$1</sup>","<sub>$1</sub>","<div align=$1>$2</div>","<font size=\"$1\">$2</font>","<a name=\"$1\"\></a>","<span style=\"color:$1\">$2</span>","$1<a href='http://$2'>http://$2</a>","<a href='http://$1'>http://$1</a>");$post_body=preg_replace($find, $replace, $post_body);return $post_body;}?> and in forumrules I have this <table align="center" border="0" cellspacing="0" cellpadding="0" width="95%"><tr><td height="216" align="center"><?php $conn = mysql_connect("xxxxxxx","xxxxxxx", "xxxxxxx") or die("Could not connect: " . mysql_error()); //echo("Connection Successful<br/>"); mysql_select_db("xxxxxxx", $conn); $result = mysql_query("SELECT * from phpbb_topics WHERE forum_id=25 AND topic_vote != 1 order by topic_id desc LIMIT 0, 1") or die("Invalid query: " . mysql_error()); //$myrow = mysql_fetch_array($result); while($myrow=mysql_fetch_array($result)) { $topic_id = $myrow["topic_id"]; // used for the comment system $sql = sprintf("Select * from phpbb_posts_text where post_subject='%s' order by post_id desc LIMIT 0, 1", $myrow["topic_title"]); $result2 = mysql_query($sql) or die("Couldn't get news post"); while($rows2=mysql_fetch_array($result2)); include ("post2sitefunction.php"); $post_body = markup($rows2["post_text"]); }?><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="12"></td><td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="12" height="12" align="left" valign="top"></td> <td valign="top" align="left"><font color="#990000" style="font-size: 11px;"> <?php printf("%s", $post_body);?> </font></td> <td width="12"></td> </tr></table></td><td width="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td height="12" align="center" class="style4">---------------------------------------------------------------------------------------</td> </tr></table> <br /> <a href="http://www.djdtm.com/forums">Enter</a></td></tr></table> and you can see the results here:http://djdtm.com/index.php?page=forumruleswhich is:""What am I doing wrong?Ok, so I ripped some of your code, so sue me. But seriously I need some help.
  8. DjDTM

    BBCode to HTML

    So far I narrowed down all the useless code to this, which still seems to get me what I want, and thats JUST the post. <table align="center" border="0" cellspacing="0" cellpadding="0" width="95%"><tr><td height="216" align="center"><?php $conn = mysql_connect("CENSORED","CENSORED", "CENSORED) or die("Could not connect: " . mysql_error()); //echo("Connection Successful<br/>"); mysql_select_db("CENSORED", $conn); $result = mysql_query("SELECT * from phpbb_topics WHERE forum_id=25 AND topic_vote != 1 order by topic_id desc LIMIT 0, 1") or die("Invalid query: " . mysql_error()); //$myrow = mysql_fetch_array($result); while($myrow=mysql_fetch_array($result)) { $topic_id = $myrow["topic_id"]; // used for the comment system $sql = sprintf("Select * from phpbb_posts_text where post_subject='%s' order by post_id desc LIMIT 0, 1", $myrow["topic_title"]); $result2 = mysql_query($sql) or die("Couldn't get news post"); while($rows2=mysql_fetch_array($result2)) $post_body = str_replace("\n", "<br/>", $rows2["post_text"]); //==========================================?><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="12"></td><td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="12" height="12" align="left" valign="top"></td> <td valign="top" align="left"><font color="#990000" style="font-size: 11px;"><? printf("%s", $post_body);?></font></td> <td width="12"></td> </tr></table></td><td width="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td height="12" align="center" class="style4">----------------------------------------------------------------------------------------</td> </tr></table> <? } ?> <br /> <a href="http://www.djdtm.com/forums">Enter</a></td></tr></table> If I can figure out where I can put the stuff you found for me in, I would have it all set.Cause I just want something like this on the forum [URL=http://www.google.com][B]CLICKME[/B][/URL] To end up on my website in the propper html code: <a href="http://www.google.com" target=_blank><b>CLICKME</b></a> Obviously on the page it looks like thisCLICKMEBecause so far, all I get is code like this when its displayed through my site using this script:[b:95453fab54]ACTIVE[/b:95453fab54]So, I have no idea whatsup...
  9. DjDTM

    BBCode to HTML

    Nice find, thanks, but how and where would I put this in my script?
  10. DjDTM

    BBCode to HTML

    Ok, so.I have a script that displays posts in a certain forum on the page that its in.Its my news script, that if I post posts in the news forum, it shows on my main website.It really sucks, and I was wondering if anyone can help me revise it and make it so it replaces all bbcode to html, so I can post urls and images on the forum and have it load on the website.Because what currently happens is if i have a bbcode tag, it shows the tag up on the site.Heres my code: <table align="center" border="0" cellspacing="0" cellpadding="0" width="95%"><tr><td height="216"><?php $conn = mysql_connect("database.net","databasename", "password") or die("Could not connect: " . mysql_error()); //echo("Connection Successful<br/>"); mysql_select_db("databasename", $conn); function AddEmoticons($post_body) { $r_smiles = mysql_query("Select * from phpbb_smilies") or die("couldn't retrieve smiles"); // good lets continue with getting smiles while($smiles = mysql_fetch_array($r_smiles)) { $smile_code = $smiles["code"]; // what is it? ? ? etc... //printf($smile_code); $smile_url = sprintf("http://djdtm.com/forums/images/smiles/%s", $smiles["smile_url"]); //printf($smile_url); $replace_html = sprintf("<img src='%s' alt='%s' />", $smile_url); $post_body = str_replace($smile_code, $replace_html, $post_body); } return $post_body; } $result = mysql_query("SELECT * from phpbb_topics WHERE forum_id=1 AND topic_vote != 1 order by topic_id desc LIMIT 0, 5") or die("Invalid query: " . mysql_error()); //$myrow = mysql_fetch_array($result); while($myrow=mysql_fetch_array($result)) { $topic_id = $myrow["topic_id"]; // used for the comment system $sql = sprintf("Select * from phpbb_posts_text where post_subject='%s' order by post_id desc LIMIT 0, 1", $myrow["topic_title"]); $result2 = mysql_query($sql) or die("Couldn't get news post"); while($rows2=mysql_fetch_array($result2)) { // good lets get the post_id so we can grab the users avatar and "stuff" $grabsql = sprintf("Select * from phpbb_posts where post_id=%d order by post_id desc", $rows2["post_id"]); $result3 = mysql_query($grabsql) or die("Something f****d up with the grabbing post info"); // good lets continue... $postrow = mysql_fetch_array($result3); $userid = $postrow["poster_id"]; // who posted this mother f****r! $date = date("F j, Y, g:i a", $postrow['post_time']); $post_body = str_replace("\n", "<br/>", $rows2["post_text"]); //$post_body = str_replace("", "<img style='filter: Alpha(Opacity=65, FinishOpacity=65, Style=0, StartX=0, StartY=0, FinishX=15, FinishY=0);' src='http://djdtm.com/forums/images/smiles/icon_biggrin.gif' alt='http://djdtm.com/forums/images/smiles/icon_biggrin.gif' />", $post_body); AddEmoticons($post_body); //============================================================================= $usersql = sprintf("Select * from phpbb_users where user_id=%d", $userid); $result4 = mysql_query($usersql) or die("Couldn't get user info"); $userinfo = mysql_fetch_array($result4); // good lets grab the user's info. $poster_name = $userinfo["username"]; $poster_avatar = $userinfo["user_avatar"]; $poster_email = $userinfo["user_email"]; $user_avatar_type = $userinfo["user_avatar_type"]; switch($user_avatar_type) { case 0: // do nothing, it's a mother f****r break; case 1: $avatarcrap = sprintf("http://djdtm.com/forums/images/avatars/%s", $poster_avatar); break; case 2: $avatarcrap = sprintf("%s", $poster_avatar); break; case 3: $avatarcrap = sprintf("http://djdtm.com/forums/images/avatars/gallery/%s", $poster_avatar); break; }?><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="center"><b><font color="#990000"><? printf("%s", $rows2["post_subject"]);?></font></b> - <? printf("%s", $date); ?></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="12"></td><td width="96" align="center" valign="top"><a href="http://djdtm.com/forums/profile.php?mode=viewprofile&u=<? echo $userid; ?>"><? printf("%s", $poster_name); ?></a><br/><img src="<? printf($avatarcrap); ?>" alt="<? printf($avatarcrap); ?>" /><br/><a href="<? printf("http://www.djdtm.com/forums/viewtopic.php?t=%d", $topic_id); ?>" target="_blank">View & Reply</a><a href="http://djdtm.com/forums/profile.php?mode=viewprofile&<? echo $userid; ?>"></a></td><td width="12" align="center"></td><td align="center" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="12" height="12" align="left" valign="top"></td> <td valign="top" align="left"><font color="#990000" style="font-size: 11px;"><? printf("%s", $post_body);?></font></td> <td width="12"></td> </tr></table></td><td width="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr> <td height="12"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td height="12" align="center" class="style4">----------------------------------------------------------------------------------------</td> </tr></table> <? }} ?> </td></tr></table> Sorry for the swearing, I didn't write this code. I don't know alot of what it does.It looks like the smileys are suppose to work but they don'tThe list of things I need help with:1.) Smileys to actually work2.) bbcode from post to be replaced with the propper html code on the website3.) revision a cleaner version..So any help would be greatly appreciated.EDIT:I was thinking about expanding the $post_body = str_replace("\n", "<br/>", $rows2["post_text"]); but how I would make it search multiple strings, and replace them with multiple strings.Such as, str_replace("","<b>",$rows2["post_text"]);, but how would I add multiple searches to that?Jeeze, I have no idea, some one help please.
  11. http://www.w3schools.com/flash/flash_inhtml.aspthat should help..
  12. Yea, I used transparent backgrounds because I use a picture background in some of my table cells.Thanks for the help! I guesse I'll just accept it.
  13. DjDTM

    FLASH Versus HTML

    Actually, a friend of mine made an all flash website, for some reason it doesn't work in firefox.http://www.immortaldawn.comAll flash can be good in ways if it was ALL GOOD LOOKING, and using flash to the best of its abilities.Like 2advanced and such.
  14. If you want them streamed what you can do is import the avi into your flash library.from there you can set it up to stream in the flash add controls, theres alot of stuff you can do. But mainly if you really want it to be a flash, just import it.
  15. Well you might want to change this part of the code: <embed src="http://www.url.com/yahoo.swf" quality=high width="250" height="100" name="yahoo" align=""type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> to <embed src="HTTP://YOURWEBSITELINK/DIRECTORY/FLASH.SWF" quality=high width="250" height="100" name="yahoo" align="center"type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> Change the embed src attribute to where the flash is located and then add the align center, just a few errors to fix.The link, I am not too sure about.. Its probably in the code of the program, make sure the code if this is it, right, " getURL ('http://www.link.com','_blank')Changing the link to where you want it to go.
×
×
  • Create New...