Staredit Network

Staredit Network -> Website Feedback, Bugs & Discussion -> Html... God Thats Confusing!
Report, edit, etc...Posted by Hick on 2004-08-19 at 02:46:04
Hey Yoshi, i was reading a little HTML primer kind of thing for fun and it said if you click View > Source, it would dislpay the page in HTML format. I did. And i nearly censored.gif my pants. Did you do all of that??? If you did where did you learn, and how long did it take you to get SEN up and running?
Report, edit, etc...Posted by KiLLeR2001 on 2004-08-19 at 03:00:56
QUOTE(Hick @ Aug 19 2004, 01:46 AM)
Hey Yoshi, i was reading a little HTML primer kind of thing for fun and it said if you click View > Source, it would dislpay the page in HTML format. I did. And i nearly  censored.gif  my pants. Did you do all of that??? If you did where did you learn, and how long did it take you to get SEN up and running?

I'm guessing most of the code is generated from Invision Board, of course Yoshi most likely edited here and there and added some files and such to the existing code, but I could be wrong...
Report, edit, etc...Posted by (U)Bolt_Head on 2004-08-19 at 04:07:39
Yeah most of it is created by invision. Yoshi does php code but he didn't code Staredit.net from scratch. Notice the copyright at the bottom of the screen.

"Powered by Invision Power Board(U) v1.3.1 Final © 2003 IPS, Inc."

never did figure out who let invision power board into clan (U)
Report, edit, etc...Posted by chooie333 on 2004-08-19 at 07:38:10
this board is coded in php & Mysql not html.

visit there websites

www.php.net
www.mysql.com
both are a lot easier than html
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-19 at 10:57:56
Its all PHP generated. It doesn't actually do all of that, its easier than you think.

Like this page, is generated like this:


Header (the header)
Table Start (starts the table with the posts)
Post Row (one row of a poster)
Post Row (one row of a poster)
Post Row (one row of a poster)
Post Row (one row of a poster)
Table End (ends the post table)
Footer (the footer)

Its a bit more complex than that, but I'm giving you an example.

Most of the more impressive coding is the one you don't see through "view source". I use Invision boards as a base (because if I made my own site from scrach, it'd suck) and built upon it.
Report, edit, etc...Posted by Mini Moose 2707 on 2004-08-19 at 12:04:30
You have templates and files specificied for each feature. Just think of the forum as huge fill in the blanks. I could set up a site pretty damn close to this minus what Yoshi coded relatively easily. (though probably with a different look) Looking at source code of a forum isn't really a good place to even try to understand HTML because there's way too much crap in it.... unless you're also coding a forum. tongue.gif
Report, edit, etc...Posted by Mr.Camo on 2004-08-19 at 12:18:02
HTML is one of the most simple languages out there, the source is something different then the code.
Report, edit, etc...Posted by MapUnprotector on 2004-08-19 at 20:05:54
bleh.gif i no html happy.gif muahaha im god
Report, edit, etc...Posted by Hick on 2004-08-19 at 20:17:02
QUOTE(devilesk @ Aug 19 2004, 07:05 PM)
bleh.gif i no html happy.gif muahaha im god

where did you learn? i know some basic stuff but i'd like to learn more about it smile.gif .
Report, edit, etc...Posted by Reever on 2004-08-19 at 20:42:32
Htmlgoodies.com best site for people who want to know HTML and other stuff.
Report, edit, etc...Posted by melkor191 on 2004-08-19 at 23:01:28
Im a coder too , im guessin this subject is closed but ill say my part anyway tongue.gif , the forums are invision as he said , but the website is not a template , so yoshi probably coded everything , something that may surprise you is that the code isint the longest part , the designing and the images are . html is easy! i used Lissaexplain.com for that
Report, edit, etc...Posted by Res-Kevin on 2004-08-20 at 18:13:59
QUOTE(Hick @ Aug 19 2004, 07:17 PM)
QUOTE(devilesk @ Aug 19 2004, 07:05 PM)
bleh.gif i no html happy.gif muahaha im god

where did you learn? i know some basic stuff but i'd like to learn more about it smile.gif .

i learned from viewing other HTML pages MWAHAHAHAHA
(then testing it right on my desktop tongue.gif)
((I CAN'T USE PHP BECAUSE... WELL... bleh... ranting.gif!!!))
(((EDIT 1: this is pointless, should I delete?)))
((((Part of edit 1 + 2: bleh.gif <HTML> <HEAD> <TITLE>W00T HTML</TITLE> </HEAD> <BODY> bleh.gif i did it !!! </BODY> </HTML>))))
Report, edit, etc...Posted by MapUnprotector on 2004-08-20 at 19:58:20
yea i basically learned all my html from htmlgoodies happy.gif and davesite.com
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-20 at 20:23:26
QUOTE(Res-Kevin @ Aug 20 2004, 06:13 PM)
((((Part of edit 1 + 2: bleh.gif <HTML> <HEAD> <TITLE>W00T HTML</TITLE> </HEAD> <BODY> bleh.gif i did it !!! </BODY> </HTML>))))

Next thing you're going to tell me, is that 1+1=2.
Report, edit, etc...Posted by Res-Kevin on 2004-08-20 at 20:40:54
yup, and 6458977^3/68-1234567893=962618852821564105.60294117647059
bleh.gif
EDIT 1: grrrrrrrrrrrrrrr damn tab button on keyboard... anyway, BEAT THAT!!! bleh.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-20 at 20:42:44
Here is a modification I released for invision boards. Yes, I programmed this.
CODE
/*=====================================*/
//
// Yoshi - Subtract Posts on Delete v1.1
// -----------------------------------
// There was a mod for this in Invision
// 1.3, but all I wanted was something
// quick and dirty to do the same job.
//
/*=====================================*/

////////
// FILES EDITED:
// sources/lib/modfunctions.php
////////

/*--------------
OPEN sources/lib/modfunctions.php
FIND:
--------------*/

 $topics     = array();

/*--------------
BELOW THIS, PLACE:
--------------*/

 // Yoshi - Subtract Posts on Delete

 $author_id = array();
 $num_to_del = array();

 // END Yoshi - Subtract Posts on Delete

/*--------------
FIND:
--------------*/
 
 $DB->simple_construct( array( 'select' => 'pid, topic_id', 'from' => 'posts', 'where' => 'pid'.$pid ) );
 $DB->simple_exec();
 
 while ( $r = $DB->fetch_row() )
 {
  $posts[ $r['pid'] ]       = $r['topic_id'];
  $topics[ $r['topic_id'] ] = 1;
 }

/*--------------
REPLACE WITH:
--------------*/

 // Yoshi - Subtract Posts on Delete
 
 $DB->simple_construct( array( 'select' => 'author_id, pid, topic_id', 'from' => 'posts', 'where' => 'pid'.$pid ) );
 $DB->simple_exec();
 
 while ( $r = $DB->fetch_row() )
 {
  $posts[ $r['pid'] ]       = $r['topic_id'];
  $topics[ $r['topic_id'] ] = 1;
  $author_id[$r['author_id']]++;
 }

 // END Yoshi - Subtract Posts on Delete

/*--------------
FIND:
--------------*/

 //---------------------------------------
 // Update the stats
 //---------------------------------------

/*--------------
BELOW THIS, PLACE:
--------------*/

 // Yoshi - Subtract Posts on Delete
 
 if ($this->forum['inc_postcount'])
 {
  if ( count($author_id) > 0 )
  {
   foreach ($author_id as $member_id => $posts_to_del)
   {
    $num_to_del[$posts_to_del] .= $member_id." ";
   }

   foreach ($num_to_del as $num => $auth)
   {
    $authorids = " IN(".implode( ",", explode (" ", rtrim ($auth)) ).")";

    $DB->simple_exec_query( array( 'update' => 'members',
     'set' => "posts = posts - ".$num,
     'where' => "id{$authorids}") );
   }
  }

 }
 
 // END Yoshi - Subtract Posts on Delete










/*--------------
FIND:
--------------*/

 $attach = array();

/*--------------
BELOW THIS, PLACE:
--------------*/

 // Yoshi - Subtract Posts on Delete

 $author_id = array();
 $num_to_del = array();

 // END Yoshi - Subtract Posts on Delete

/*--------------
FIND:
--------------*/

 $DB->simple_construct( array( 'select' => 'pid', 'from' => 'posts', 'where' => "topic_id".$tid ) );
 $DB->simple_exec();
 
 while ( $r = $DB->fetch_row() )
 {
  $posts[] = $r['pid'];  
 }

/*--------------
REPLACE WITH:
--------------*/

 // Yoshi - Subtract Posts on Delete
 
 $DB->simple_construct( array( 'select' => 'author_id, pid', 'from' => 'posts', 'where' => "topic_id".$tid ) );
 $DB->simple_exec();
 
 while ( $r = $DB->fetch_row() )
 {
  $posts[] = $r['pid'];
  $author_id[$r['author_id']]++;  
 }

 if ($this->forum['inc_postcount'])
 {
  if ( count($author_id) > 0 )
  {
   foreach ($author_id as $member_id => $posts_to_del)
   {
    $num_to_del[$posts_to_del] .= $member_id." ";
   }

   foreach ($num_to_del as $num => $auth)
   {
    $authorids = " IN(".implode( ",", explode (" ", rtrim ($auth)) ).")";

    $DB->simple_exec_query( array( 'update' => 'members',
     'set' => "posts = posts - ".$num,
     'where' => "id{$authorids}") );
   }
  }

 }

 // END Yoshi - Subtract Posts on Delete

/*--------------
THATS ALL FOLKS!
--------------*/


HTML doesn't seem that hard anymore does it?
Report, edit, etc...Posted by Kame on 2004-08-20 at 20:44:09
if I had the concentration and attention span, I probably might be able to figure this out. tongue.gif
Report, edit, etc...Posted by Res-Kevin on 2004-08-20 at 20:47:49
... grrrrrrrrrrrrr.........
btw, (off topic) wouldn't the minerals thingy for the army system want people to try to spam or something even though there is a rule against that??????
":w00t: LES SPAM SO I CAN GET SOME DAMN MINERALS!!!"
(on topic)
QUOTE("FireKame")
if I had the concentration and attention span, I probably might be able to figure this out. tongue.gif

exactly... BUT I CAN'T USE PHP COS... well... bleh. (again). mad.gif ranting.gif crazy.gif disgust.gif ranting.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-20 at 21:22:43
Stop posting this kind of crap or you'll find yourself unable to post at all.
Report, edit, etc...Posted by Shmeeps on 2004-08-21 at 14:12:26
To help Yoshi explain:
PHP is basicly an advanced DHTML, which stands for Dynamic Hyper-Text Markup Language. All PHP code uses variables, text messages, arrays MySQL databases and other things to determine how it gets written. For example, you write something in the post message box, that gets sent as a variable, say $msg. Then the thread makes a table for a new post. It retrieves info from the MySQL database about Post#, Minerals, Avvy location, other crap, and posts it. So basicly its a somewhat easier/harder way of using HTML. A guestbook works the same way, except without guestbook, post# ect, just name and message.
...I think tongue.gif
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-21 at 14:18:57
PHP -> Hypertext Preprocessor.

Based upon C, outputs HTML.
Report, edit, etc...Posted by Shmeeps on 2004-08-21 at 15:17:00
QUOTE(Yoshi da Sniper @ Aug 21 2004, 01:18 PM)
PHP -> Hypertext Preprocessor.

Based upon C, outputs HTML.

W00T. I was right again, that's twice in my life!
Report, edit, etc...Posted by MindArchon on 2004-08-22 at 00:04:56
Everyone says PHP owns.. (yes it does) but not many people actually know WHY it owns.

PHP is perfect because it is hidden when the page is displayed so it cannot be seen by newbs who want to steal the code. For instance if the actuall code to the page looked like this:

CODE
<?php

$encrypted = md5($enterword);

If($encrypted == "489fd52def4aec426667bb6ced67d975"){

echo "Yes, that is my name";

}else{

echo "NONO THATS NOT MY NAME LOL";

}

?>


It would either return "Yes, that is my name", or "NONO THATS NOT MY NAME LOL" depending on either the vairable is set. So in View Source it would either appear as one of those, and it wont show the actual code.

Now you might be scratching your head and going WHAT THE HELL DOES THAT CODE DO? Lets take it apart.

<?php tells the page that PHP code is starting. You cant write PHP without putting this ("<?" also works instead of <?php)

$encrypted is a vairable, for you VB people out there you do not have to DIM php vairables.

md5() is a function that encrypts strings. so $encrypt = md5($enterword) would encrypt whatever is in $enterword to the vairable $encrypt.

If($encrypted == "489fd52def4aec426667bb6ced67d975"){ is a simple if statement. If $encrypt equals that encrypted word then do something. "489fd52def4aec426667bb6ced67d975" is the encrypted data for "MindArchon"

If the word is equal to MindArchon then it prints on the page "Yes, that is my name" and if it doesnt equal to that encrypted word it displays that you were wrong.

?> ends the php code.

There you go a simple php lesson for you all
Report, edit, etc...Posted by Yoshi da Sniper on 2004-08-22 at 00:15:06
Thats the easiest piece of code ever. Don't let that encryption key confuse you tongue.gif
Report, edit, etc...Posted by MindArchon on 2004-08-22 at 00:34:25
QUOTE(Yoshi da Sniper @ Aug 21 2004, 11:15 PM)
Thats the easiest piece of code ever. Don't let that encryption key confuse you tongue.gif

But confusing people is fun ><
Next Page (1)