101

(4 replies, posted in PunBB 1.2 troubleshooting)

Your logout button using javascript or another client side script? You have javascript disabled?
When you hover over the logout button it should show something like this:

http://punbb.org/forums/login.php?action=out&id=15

in your status bar. What's yours say?

102

(6 replies, posted in PunBB 1.2 troubleshooting)

Yah, the value="http://..." is what I'm talking about,

in one of the environment variables the full path to the forum along with the protocal is there... that's what install.php should use ;p

103

(6 replies, posted in PunBB 1.2 troubleshooting)

I ran into a problem today while creating a new forum. https is the ONLY way to access my site. After a fresh install of punbb 1.12.14 the basedir was set to http://addresses. It took me about 30 minutes looking over the str_replace + preg_match in confirm_referrer before I suddenly realized it wasn't doing anything to the http:// part of the address. So the code that for whatever reason removed the https:// part of the address during install should be updated IMHO :P

Also, while fumbling around my problem I came across another bug, but the private security related submit thing isn't working. I can't think right now due to a hangover, so I'm unsure if it could be used to do anything... at all, but I'm sure functions are there for a reason... :P

104

(4 replies, posted in PunBB 1.2 troubleshooting)

I'd remove IP based bans after roughly 1 to 2 weeks. Only keep an IP ban on if it is recurring. (It usually takes about 1 week for most residential IP addresses to change, although there are ways to force a change. So if a residential computer users causing grief you may want to look for an alternative solution).

Erm.. FYI I did this one a while ago, before my computer blew up (unrelated blow up, lol) and I disapeared for a while. A true "read posts" does come across some problems though.

make a table "posts_(un)read" with "user_id" "topic_id"

Now choose to either add a value for each uid, every time a new pid is made, since new pid = topic_id has new post (post_unread)
or choose to add a value for uid/tid pair whenever that uid sees that tid. (post_read)

1) Is slow to make posts, and will increase the DB size as the number of inactive users increases.
2) Is fast to post, but will increase the DB size as the number of active users increases.

I've got some work to do yet before I can post this mod on punres. I'll probably go with #2 and at a later date implement a "pruning" feature that auto-magically assumes post over <Admin option> days old are read (and therefor don't need an entry in the database). Let's an admin "tune" the post_read table for their particular user group. First priority is getting the MDT mod/plugin/toolset (not really sure what to call it anymore 0.o). Expect this mod in a month from me, but if someone else wants to make it, be my guess (FYI: when I did it, I completely forgot to look in search.php... if you plan on making this, look in search.php to display searched posts are either read or unread tongue). Also, if 1.3 doesn't have this, or doesn't have a way of doing this that I like, expect a 1.3 extention big_smile tongue

[antiflameshield]PS: I didn't really read this whole thread, and I don't remember why I didn't use the Mark topics as read mod 0.o[/antiflameshield]

Just to say, doing this sorting in sql might be somewhat different for each supported db type.,. Could (in php) make an array of subjects with keys of topic_id then sort the array. finally array_unshift though the alphabetically sorted keys of topic_id.

It was a 1 minute (ok, well i wasn't timing myself, but probably more like 5 0.o) 10 liner tongue Supposed to get whoever does whatever for whomever getting wherever, somewhere soon x.X

108

(3 replies, posted in Feature requests)

just add in the option to turn it on/off in ./admin_options.php, and then punres it big_smile

Could add something like this to your crontab.hourly directory:

#!/bin/sh
# Update the topics subject when the posts in that topic get a match for solved, lower or uppercase

SQLCMD='sqlite /path/db.file.name'
SQLCMD='mysqladmin'

if [[ n`${SQLCMD} 'SELECT topic_id FROM posts WHERE message GLOB "*[Ss][Oo][Ll][Vv][Ee][Dd]*";' != "n" ]]; then
  TOPIC_ID=`${SQLCMD} 'SELECT topic_id FROM posts WHERE message GLOB "*[Ss][Oo][Ll][Vv][Ee][Dd]*";'
  echo do stuff like an UPDATE;
  SUBJECT=`${SQLCMD} "SELECT subject FROM topics WHERE id='${TOPIC_ID}'"`
  ${SQLCMD} "UPDATE topics SET subject='[Solved] - ${SUBJECT}' WHERE id'${TOPIC_ID}'"
  echo Just finished updating the subject of a topic to solved.
fi

110

(5 replies, posted in General discussion)

Install punbb to a subfoler.

Then move punbb to the root folder.

Now you will need to either manually delete the ./cache/*.php files and edit your database manually to check the punbb root directory, or manually edit the ./cache/cache_config.php file to inticate the new root foler and log-in to punbb as an admin, and go into the options panel and re-update the root directory.

it's root directory or base diretory, or something like that.

Also, I remeber having this same problem before, it might be some missing php mods on the server, or incorrect database data. I can't remeber what cause this problem for me though...

1) Download PunBB 1.12.14
2) Unzip the files to a directory on your computer.
3) Look for a txt file and read the directions included.

112

(14 replies, posted in PunBB 1.2 troubleshooting)

Maybe the base path to your forum is incorrect. It's normally stored in the cache, but if you delete the files it will be stored in the database. When you go to rebuild the cache, if the database record is invalid (incorrect path) then it will fail, afaik. Not sure if that value is even read from the database when the cache is removed.

113

(18 replies, posted in PunBB 1.2 troubleshooting)

How did you post this picture above

[img]http://www.thinkgleek.com/images/phpinfo-ssl.jpg[/img]

do you have any options, like yahoo.

yahoo doesn't have a public smtp server, or an smtp server for use with their free e-mail service, afaik.

Any smtp server for which you have access will do though. Does your ISP have an smtp server? Normally ISP accounts come with a pop based e-mail address. pop servers normally have smtp server. if the smtp server require authentication it can usually be accessed outside the ISPs IP subnet.

The are also countless smtp server out there, for which you pay a small fee and allow them to do your e-mail forwarding.

114

(11 replies, posted in Feature requests)

One problem with deleting accounts is that the info from the users table is used when displaying that users posts.

Presumably one could write a mod to give users the option of being displayed in the user list. Or one to disable the user list entirely.

If the main worry is the account existsing, the I'm sure it's possible to write a mod to delete all post made by the user, and all topics started by the user, and then delete the user from the user table. Keep in mind this could be used to delete replies to the users posts.

elbekko wrote:

So... say, when enough people post Solved, it changed the topic title to [SOLVED] Title?

That mod already exists, doesn't it? It's called 50 moderators from different time zones big_smile

<?php
    passthru("perl ./script.cgi");
?>

That will execute the script.cgi file, using perl. I believe cookie data is stored as an environment variable, and passthru should keep the same environment. Then all you have to do is figure out which cookie data means which database entry. Alternatively you can just do all the cookie handling in php, and then run your cgi script, with passthru("perl ./script.cgi -confimed"); and in script.cgi near the top

if ($ARGV[1] != '-confirmed') exit();

117

(95 replies, posted in News)

If you already had punbb 1.2.12 working on your website as a forum, you do not need the install.php file anymore. If you made all the required changes everywhere else, then you simply need to update your database records. Download the PunBB 1.2.14 (zip) from the downloads section. Unzip the files, and in it you will find an extras directory. Upload the 12_to_1214_update.php file to your forum webserver, and navigate to that address.

Good luck smile

118

(14 replies, posted in PunBB 1.2 troubleshooting)

Yah, delete all the .php files in your cache directory. Should only be left with a .htaccess and index.html file (Your most important settings are stored in config.php in the root directory of the forum, so that's the only file you really want to hold onto).

You should backup the files to your local computer before deleting them just to be safe. And then go into the admin panel on your forum and click "save options" once, to re-gen the config files.

119

(4 replies, posted in PunBB 1.2 discussion)

Smarty, why not hook it all. If the request for said code to be hookable isn't made, then wrap that whole part in a hook. That way the next guy to want to use that hook could, at the very least, make partial use of it (Until such time as the specific part of the code he wants to alter is made hookable).

STEP 2:

REPLACE:

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

WITH:

// Print the categories and forums
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.parent_forum_id, t.subject FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'topics AS t ON f.last_post_id=t.last_post_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND (f.parent_forum_id IS NULL OR f.parent_forum_id=0) ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Try it, see if anything blows up and turns into a fiery ball of deaath and explosion and corruption. If the grim reaper doesn't take your forum to that place in the sky were all forums are full of people and never run out of bandwidth or CPU, then grats tongue

121

(4 replies, posted in PunBB 1.2 discussion)

Hum, any punbb dev's program for Palm OS pre V5.x. I believe since Palm OS v1.0 and up to palm OS 4.x you could "hook" into system functions.
Here's an example:

I want to display a little "X appmnts." message in the title of every palm OS app I run.

I could hook into the function that's called to display ~palm os windows~ (can't really call them windows... but you can't not...). Once my custom function is hooked, instead of calling the APIs original version of the function, only my version is called. In my function, I call the original APIs version of the function, and then, I call a function to rename the window, so as to add the "X appmnts." to then end of it's title.

Then I want to use joe's function hook that does the same thing, only his displays the time at the end of the title bar. I hook joe's function to that same call. the API now called joe's function. joe's function think my function is the original version of the function, and calls my function. My function calls the original version of the function, then renames the title bar and returns. joe's function then renames (the renamed) title bar and returns.

Doing it this way allows for a static number of "hookables" to do an unlimited number of things. One could quite easily replace a 100 line function, with a light weight, 20 line version; or simply add a few extra commands in before or after that function, and edit the output of the function to place their results in the middle. Then again this was a full fledged API, on a tiny device mind you, so a tiny API.

I have no clue what 1.3 extentions are like though...

122

(3 replies, posted in PunBB 1.2 troubleshooting)

lol kusion, I did that too smile They really ought to force you to have at least 1 post that's 1 week old before allowing you to go into mentanance mode big_smile

Welcome to punbb smile

I'd go with this for step one...

Now to read pver part 2...

REPLACE:
if ($cur_forum['last_post'] != '')
            $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';

WITH:
if ($l_post != '')
            $last_post = '<a href="viewtopic.php?pid='.$l_pid.'#p'.$l_pid.'">'.format_time($l_post).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($l_pr).'</span>';
//if ($cur_forum['last_post'] != '')
//            $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.$cur_forum['subject'].'</a> <span class="byuser">'.format_time($cur_forum['last_post']).'  -  '.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';

124

(49 replies, posted in PunBB 1.2 discussion)

Connorhd, and Smartys are just trying to drive that "i own joe" part of our brains insane, so that one of us ends up writing 50,000 lines of php to do it XD They know it's possible, they just want to bug us so the we end up doing it instead of them tongue

125

(49 replies, posted in PunBB 1.2 discussion)

Meh, I'd consider doing a diff 2 extention... once I get the guts to look at 1.3 tongue readme 2 diff would be tuff though... not impossible though