Next Page

Need help implementing the HCS forum on a site by Captain Ron at 7:01 PM EDT on July 30, 2011
Hey, hcs.

You've got some cool stuff & I like the way you implemented the forum. I'm thinking of implementing it on my own site, but I have a couple of questions.

Can you provide any specific instructions on implementing the forum on my own site? Because I know this forum requires an SQL database, but I'm not sure how it should be populated (or if the forum's PHP code will automatically create the schema when I log into it for the first time).

And what's the difference between the BB code tags for emphasis & italics? Couldn't I just remove the emphasis tag from your source & replace it with another tag/function?

Thanks in advance.

edited 7:06 PM EDT July 30, 2011
by hcs at 8:22 PM EDT on July 30, 2011
No, the forum will not automatically create the tables. Here's MySQL code that should handle it.

You'll also need two files, dblogin.php and dblogin_write.php, which should respectively contain a function called dblogin() and dblogin_write(). These are for connecting in to the MySQL database, they should return the handle returned from mysqli_connect. The user in dblogin need only give SELECT permission, dblogin_write's user needs SELECT, INSERT, and UPDATE.

Let me know if you need anything else.

[edit]
There's not a good reason beyond pedantry to have both <i> and <em>.

edited 8:24 PM EDT July 30, 2011
by Captain Ron at 10:13 PM EDT on July 30, 2011
Hmm... Interestingly enough, one would expect some kind of a download for the forum software's dependencies if the main forum software itself is open for public access/usage.

By dblogin.php & dblogin_write.php, are you actually talking about this file with a modified version, or are you talking about two separate PHP files that you've made yourself?
by hcs at 11:07 PM EDT on July 30, 2011
You're the first person in 5+ years to be interested in using it.

The files are my own doing, they're just there so I can publish the source without exposing the db login credentials. They look like:

<?php
function dblogin() {
$dbh = mysqli_connect("server", "username", "password","database") or die(mysqli_error($dbh));
return $dbh;
}
?>
by Captain Ron at 11:26 PM EDT on July 30, 2011
Yeah; even though the forum itself may be old, it's still very useful (especially on web hosts that impose heavy limits on SQL usage; compared to other forums, this one's the only truly light forum that has user authentication).

Anyways, thanks to your help, I now understand how the dblogin() function works. As for the dblogin_write() function, is it safe for me to assume that its PHP code is the exact same as what you posted above (& that forum.php does all the work of giving users SELECT, INSERT & UPDATE permissions)?

edited 11:34 PM EDT July 30, 2011
by Vague Rant at 12:12 AM EDT on July 31, 2011
There's actually plenty good reason to have both <i> and <em>. Italics is about styling text, while emphasis is about emphasising text. It might look the same, but if you're visually impaired and using a screen reader, the distinction is quite important. There aren't any shades of meaning in Super Mario Galaxy (italics), whereas a sentence like "That was slightly (emphasis) annoying," there's a good chance sarcasm is being applied. It's the same reason there are different HTML tags for <b> and <strong>.
by Captain Ron at 1:08 AM EDT on July 31, 2011
That's true to a certain extent, but again, <i> & <em> (outside of a text reader) implies the exact same thing to an otherwise able-bodied user (i.e.: a user who's not legally blind). Also, the text reader will still read the text as it appears (though without any articulation of words using the <em> tag); it's not like the text reader can blue-screen a computer if the <em> tag isn't used. Furthermore, I could argue for the reason why there's no <strong> tang on this forum, but for all intents & purposes, I have no real need for the <em> tag in my own application.

This is aside from the fact that <em> & <i> (as well as <strong> & <b>) have, for actual presentational purposes, essentially been superseded by CSS code anyways (as well as the fact that every other forum software essentially uses <i> & <b> instead of <em> & <strong>, thereby making them all monotonous when read through a text reader). Besides, I've decided to replace the <em> with a custom <yt> tag; I want to see if I can implement a working YouTube video embed tag.

In any case, I'm still curious whether or not dblogin.php's code is the same as that of dblogin_write.php's.

edited 1:08 AM EDT July 31, 2011
by hcs at 1:27 AM EDT on July 31, 2011
dblogin_write has a dblogin_write() function that works the same way but uses a user with more permissions. This is based on the principle of least privilege, so bug in read access (which is by far the most common operation) will not be able to damage the DB.

If you don't have different users with different permissions for this, then you can use the same user in both functions, I think.

In case it isn't clear, we're talking about SQL DB users, not forum users. HCS Forum has only one type of user, any admin stuff is done through directly editing the DB.

[edit]
Re <i> vs. <em>, at the time I wrote the forum I was regularly using <em> when I actually meant emphasis, so it made it in. I've never used <strong>. I don't see why it is necessary to remove markup in order to add your own (yt), in any case, it's not like the time running that regex is significant.

edited 1:31 AM EDT July 31, 2011
by Captain Ron at 1:47 AM EDT on July 31, 2011
Ah; now I completely understand what you're getting at. The dblogin() & dblogin_write() functions exist depending on the different SQL database users & their respective permissions. Since I'll be the only SQL DB user, I can safely change forum.php & dblogin.php in a way that I'd only need to include dblogin.php (if I've understood you correctly). Otherwise, I could just copy dblogin.php, change the variables a bit & save it as dblogin_write.php.

Hopefully, thanks to you, implementing this forum on my site will be a cakewalk. I'll post back with my forum's (link once I get it working) & send you my modifications (especially my YouTube tag once it's been tested).

Thanks, Halley.

edited 1:48 AM EDT July 31, 2011
by hcs at 6:08 AM EDT on July 31, 2011
Yes. And the most important thing to remember is to not blame me if anything goes horribly wrong.

Next Page
Go to Page 0 1 2

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source