1

(6 replies, posted in PunBB 1.2 discussion)

yeah, I used the Human Test mod, and people who used that 'ru' email spamm accounts significantly decreased.

Well, i forgot to mention that this happens with everything. post.php, the administration, logging in, profile, etc. And post.php is probably modified correctly, ty.

Do you know why this would happen? hmm I see that it has "$destination_url = 'index.php';", which is where it redirects. I would like it to be secure, but I also want it to work...

hmm never checked back for a while.

Actually, it is a problem with the redirect function. I changed it back and it worked fine.

Changing this caused it to always redirect to the index:

// Prefix with o_base_url (unless there's already a valid URI)
    $destination_url = 'index.php';
    if (strpos($destination_url, 'http://') !== 0 && strpos($destination_url, 'https://') !== 0 && strpos($destination_url, '/') !== 0)
        $destination_url = $pun_config['o_base_url'].'/'.$destination_url;

    // Do a little spring cleaning
    $destination_url = preg_replace('/([\r\n])|(%0[ad])|(;[\s]*data[\s]*:)/i', '', $destination_url);

Is there a problem with it? Or do i need to change something else for it to work?

for now im going to keep my original code.

After updating using hdiff from 1.2.14 to 1.2.17, I noticed that after posting a new topic or reply that it no longer redirects to that topic. Instead, it redirects back to the index of the forums.

I noticed that it to redirect it checks the $new_pid so that it can redirect to that post. I also remember changing some lines that had to do with the $new_pid variable. I'm betting that is the reason for the bug.

Is anyone else having this problem?

-ag

Looks like a nice plugin, however, id rather not send the email to banned users or whatever. It would be more usefull if there was a way to select only certain usergroups to send the email to, but at least it has the basic system.

6

(3 replies, posted in PunBB 1.2 troubleshooting)

Thanks elbekko

7

(3 replies, posted in PunBB 1.2 troubleshooting)

Hi. I set up my forums on a host, and they worked fine. However, when I moved my forums, the admin cp could not set some of the settings because of a cache write error.

I did set my permissions to allow writing to the directory, but it still gives that error:

Error: Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory 'cache'.

I think I read somewhere that you need to do something when moving the forums to a new host, but im not sure what that is. Do I need to adjust something in the files or the database?

if i need to change something in the database, id appreciate if you could tell me exactly what needs to be changed(table, field, values), because I dont have a working phpmyadmin yet.

thanks!

-ag

8

(98 replies, posted in News)

thanks. I didnt know what that was smile

9

(98 replies, posted in News)

Hmmm... I would install new versions, but I made a lot of changes to many of the files. Is there any topics or tutorials that point out what to change in each files? I'd rather not go through them myself tongue

Ummm, I forgot to mention it, but forums with no posts in it don't show up at all now. It isn't a major problem, but it is an inconvienience. Can anyone see the problem here?

I looked for it, but didn't find it...

Thanks smile Worked just fine.

Hey, this is about improving what is shown on the index.

I know that the links to the recent posts use "$cur_forum[]". I would like to add the recent topic title, and make the last post's user name to be linkable.

The problem is, I don't know if the variables exist to do that. If they do, what are they? If they don't, how could I make these variables exist, or just get that information?

Thanks smile

Oh, ok.

If anyone else cares, this is how I did it:

Open the parser file, go down to "// Convert a series of smilies to images", and find:

$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);

And change it to:

$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="'.PUN_ROOT.'img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);

Thanks Smatys.

Hi everyone.

On my site, people can view their profile right on the site instead of on the forums. Instead of copying the parser file to the site directory, I just include it to the php file. The problem is, smilies are displayed relative to the forum directory. So, it uses "img/smilies/image.png" or whatever it really is. I tryed chmod-ing only the funtion, but that only threw errors. I read up on that and the chmod doesn't work for images anyway.

Is it possible to display the images some how without editing a whole lot of files, or copying the file?

Thanks, AG.

You have to include the config file on your php file I believe. That is what I do.

But I don't use is_guest, so I don't know if that is the problem or not. I just use  if ($pun_user['username'] == 'Guest') {

It's more hassle, but it's worth a try smile

It was the syntax. Thanks for all your help!

Somehow it also deletes the scores properly too, so I'm all set!

Yeah, I did that and got an error. Do I have to include every column of the table in the query? Maybe I have to activate NULL on the rows i dont set?

Thanks for your help!

New row.

And I made the 'id' the primary key to auto increment. There are multiple scores, so I need a table. The problem is, I don't know how to add a row when a user is created. I also don't know how to delete it for that matter.

Hello.

I was wondering how I could add a row to a table in the database when a user registers. I want to have 'scores' for my site, and it would be easiest to do it with another table, instead of adding on to the 'users' table. I do have the id auto incrementing, and all of the scores start at zero.

So my question is, what is the accurate code for inserting a row, and where do I put it? I looked in register.php, but I am not sure where it would go.

My current code is this:

//Insert another row for the highscores for that user
$db->query('INSERT INTO '.$db->prefix.'scores (`username`) VALUES ($username)');

But if that is correct, I must have it in the wrong spot.

Thanks for your help!

-AG

20

(6 replies, posted in PunBB 1.2 discussion)

Thanks! It worked beautifully smile

21

(6 replies, posted in PunBB 1.2 discussion)

I've been trying to use the database to determine the forum id, but I am having some trouble. But it must get the variable when viewing the page cause otherwise, it would not know the name of the forum for the navigation.

EDIT: Okay, I got the forum id working, but now i'm having trouble getting the poster's id. I tried using the variables such as $cur_post['poster_id'] but it didn't work...

22

(2 replies, posted in PunBB 1.2 discussion)

mysql is a databse. This is where all of your information including members and posts are stored. There are many free databases around the internet that you can use.

23

(6 replies, posted in PunBB 1.2 discussion)

Well, I wanted to allow html for a certain forum for certain members. So I'll simply check what forum it is, what member group they are, and then choose to parse everything, or allow html in it.

Actually, I checked the parser.php, and was confused where the html was parsed in the message parse function. If I find it, I could make a new function to parse everything but the html. Could anyone tell me what I would need to take out?
Edit: Actually, I just replaced the "\n" with a line break, so that should be good enough. smile

24

(4 replies, posted in PunBB 1.2 discussion)

k. thanks smile

25

(6 replies, posted in PunBB 1.2 discussion)

I'd like to get the forum id, and post id of the topic. Is there a way through set variables to determine this?

If not, I can use mysql to figure it out, but I'd just like to know if there is an easier way tongue