[ an / aw / cr / fi ] [ ra ] [ au / ga / he / sp ]

/aw/ - AwsumChan Meta

Discussion of AwsumChan itself.
Name
Email
Subject
Comment
Verification
File
Password (For file deletion.)

File: 1579798657583.jpg (58.54 KB, 904x900, 4.jpg)

 No.195

https://4usa.com/z0/index.php

<?php


// Configuration
$name = 'BBS';
$background = 'cadetblue';
$text = 'black';
$defname = "Anonymous";
// End of configuration

// HTML character escaping
$p = htmlentities($_GET["p"], ENT_QUOTES | ENT_IGNORE, "UTF-8");







// If request is to post, writes to file
if ($_GET["p"]){
$bbs = '<hr> ';
if ($_GET["n"]) {
$bbs .= "<b><font color=\"#117743\">$n</font></b>";
} else {
$bbs .= "<b><font color=\"#117743\">$defname</font></b>";
}
if ($_GET["a"]) {
$bbs .= " - <b>$a</b>";
}
$mydate=getdate(date("U"));
$bbs .= " $mydate[weekday], $mydate[month] $mydate[mday], $mydate[year]";
$bbs .= '<br/>' . $p . "<br/>\n";
$bbs .= file_get_contents('v.htm');
file_put_contents('v.htm', $bbs);
header("Location: ./ ");
}

// Site navigation and style
echo "<body style=\"color: $text;\" bgcolor=\"$background\">";
echo "<title>$name</title>";
echo '<meta http-equiv="pragma" content="no-cache" />';
echo '<a href="index.php">Refresh</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
href="/rules/">Rules</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
href="/">Home</a>&nbsp;&nbsp&nbsp;&nbsp; ';

// Name and post form
echo "<br/><center><h1>$name</h1></center>\n";
echo "<center><form method=\"GET\"><textarea name=\"p\"></textarea><br/><input type=\"submit\" value=\"Submit\"></form></center>";
echo '<br/>';

// If file does not exists, creates empty
if(!file_exists("v.htm")) {
file_put_contents("v.htm", '');
}

// Prints contents of file
$file = fopen("v.htm", "r");
while(!feof($file)) {
echo fgets($file). "<br/>\n";
}
fclose($file);



?>

 No.196

Would you be willing to help with a serious project? I am trying to make a simple but ultra efficient text board. The example code given and link to the working instance is just a reference.

goals-

1) Ultra simple code (to future proof) but efficiency matters more.

2) possibility of having lots of posts. I will have a board for each state un the usa, and within each state in the usa there will be more boards (lots of categories). So, there is the potential that there could be lots of posts at once. I really need a board that could potentially handle it.

3) Looking for a simple interface as shown in the example. Ultra easy for poster to make a post.

4)All the posts are meant to be there for years, so some kind of archive system is needed. Something simple, like saving the archived files in simple txt files. or html like v.htm

5)I have other code which locks the board (so 2 users cant post at once) posts at the bottom of the board. This seems more efficient, but new posts should show up on the top, not the bottom.

6)css style changer (which would be simple just text color and background color changer to make it easier on ppl's eyes to read

7)works well…very well, on mobile phone devices. very easy to post and read from mobile.

8)If you want to help on this, let me know. I can pay on March 1, price is not a concern. I will use the code for a production site.

9) As efficiency is vital, you can use any language, any db, but pls try to keep it simple and secure.

 No.197

the ability to reply to posts in not needed, it would be more efficient to just number each post, then if someone was referencing a post they could just put the post number in the new post.
Also the htmlentity in the example post is interesting it seems to limit the amount of chars - too many words and the submit button don't work. Also hitting submit without a message does nothing either. kind of built in anti flood

 No.198

it should be so simple that it does not have error checking messages… just reading and posting. More efficient and user friendly that way.

 No.199

I put 2 simple textboards at https://github.com/4usacom
They are called textboard1 and textboard2 Each one is just like 5 lines of code! If you could improve on either it would be so awesome, the goal is just efficiency in case many boards were run. I will pay for any help!



[Return][Go to top] [Catalog] [Post a Reply]
Delete Post [ ]
[ an / aw / cr / fi ] [ ra ] [ au / ga / he / sp ]