1

(9 replies, posted in PunBB 1.2 discussion)

Paul wrote:

mcovey: I'm no php expert myself but I can't see how your idea would work with PunBB. My reasoning is that PunBB produces entire web pages not just chunks of xhtml which could be incorporated into an existing page. By far the easiest way to achieve the result you want would be to edit the template file main.tpl to include the relevant portions of your website. In other words, instead of including bits of PunBB in your website you would include bits of your website in PunBB. A way of starting off would be to take a copy of your index page, wipe out the content in the right column and then include the relevant bits from main.tpl. Now save that file as main.tpl and place it back in PunBB's directory. You will of course have to do a certain amount of playing around with information in the document head.

actually I got punbb to go into the page, but I had to open a huge security hole. I had it so that any page that the URL variable was given to would work. So I could do index.php?url=http://kafene.org/forum, which worked, and so forth. But the problem is that someone could do index.php?url=http://hackerswebsite.com/malicious/script and screw up my page.

Is there any way to protect myself from this, by letting only pages on my domain be parsed into the page, for example?

2

(9 replies, posted in PunBB 1.2 discussion)

bob wrote:

Your code is shit man.... if ($var == sdasdasd) ... NO! if assdads is a string, then surround it in fucking quotes! There are so many second rate PHP coders out there... learn how to fucking code!


I started learning PHP a week ago, and I copy and pasted that code from an example and modified it. Honestly, it parses perfectly on my personal website, so I dont care if the code isnt perfect. So excuse me.

You know, there are a lot off arrogant programmers out there who think that because they can write good code, that somehow makes them better than everyone else. I write for pleasure, and a personal website. My job is not to code. My real interest is lingustics, anyways; the PHP is for convenience.

A question: do you get this mad at people who use <? ?> or <% %> for their code? I mean... it's not the standard!

OK my site is at http://kafene.org/.

As you can see, each page has a consistent design, except the forum. What I want to do is make it so that the forum goes in the right side like everything else. Each page is parsed into the main div (the right side) depending on which page is requested.

Here is the part where it needs to be parsed:

<div id="main">

<?php
if ($url == copyright){
    include "lic.php"; }
elseif ($url == atkafene) {
    include "atkaf.php"; }
elseif ($url == contact) {
    include "contact.php"; }
elseif ($url=="propaganda") {
    include "prop.php"; }
elseif ($url=="forum") {
    include "forum.php"; }
elseif ($url=="todo") {
    include "todo.php"; }
elseif ($url=="blog") {
    include "blog.php"; }
elseif ($url=="main") {
    include "main.php"; }
elseif ($url=="") {
    include "main.php"; }
else {
    echo "That is not a valid location!"; }
?>

</div>

If anyone has any tips on stripping down the punbb source or something, please let me know. If you need the full page source, I can give that too, but it's a little big so i wont post it yet.

Thanks.

Thanks. I accidentally typed a space before it.

:-)

I just installed PunBB, but I'm getting an error when I go on to it.

Check it out: http://kafene.org/forum