1

(1 replies, posted in PunBB 1.3 troubleshooting)

hmm
i found the code thats causing the problem ...

$query = array(
                                'SELECT'        => '*',
                                'FROM'          => 'cpages'
                        );
                        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
                        while ( $item = $forum_db->fetch_assoc($result) ) {
                                $forum_rewrite_rules['/^'.$item['url'].'$/i'] = 'extensions/'.$ext_info['id'].'/page.php?p='.$item['id'];
                        }

its one of my own extensions, but i have no idea why this doesn't work ....

2

(1 replies, posted in PunBB 1.3 troubleshooting)

when i go to the search page of my website i'm getting the following result ...

http://neworder.box.sk/forum/search.html

any ideas?

if i go directly to the search page without the rewrite i'm getting the correct result ....

Hi,

i'm trying to make an extension that allows to cerate a sidebar on punbb

here is an example.

 -------------------------------------------
| Current header                            |
 -------------------------------------------
| Sidebar |  Current punbb forum   |
|              |                                      |
 -------------------------------------------
| Current footer                           |
 -------------------------------------------

any idea how i can do this?
i know i'll have to adept the css template to, but i have no clue where to start

Maikel

4

(3 replies, posted in Discussions)

KeyDog wrote:

I still think you should join (the team) and ajax it.... !
as discussed here:
http://punbb.informer.com/forums/post/122068/#p122068

as i said in that thread, i'm not doing it if this is not sure the code will be used

5

(3 replies, posted in Discussions)

hi,

is punbb still under active development, all i see is some bugfixes and some very small modifications/aditions.

So is anyone actually working on the core of punbb? any plans/dates for future releases?

i found the problem,

one of my extensions did set the $query variable, serahc.php is checking on isset($query), but is never clearing this var so i added a clear action for it (the last else):

if (isset($_GET['search_id']))
{
....
}
else if (isset($_GET['action']))
{
....
}
else
{
unset($query);
}

anyone what has an idea what causes this?

Wuu wrote:

Where i can get list of $forum_url ,or get rid off this annoying fing "Unable to confirm security token". Why the hell you really need it? Anyway $forum_url['login'] is for login form ,but i need for logout,post edit etcc.. big_smile

$forum_url is defined in include/url/<url scheme>/forum_urls.php

the security token is needed for csrf attacks, more info here: http://en.wikipedia.org/wiki/Cross-site_request_forgery

Scripted wrote:

In my opinion, via + notepad are good for quick and dirty stuff ... but for long run ... consider professional IDE editor. (save time and money)

did you know vi(m) has plugins and stuff like this?

my vim has a lot of options a lot of popular ide's have:
- autocompletion
- autoindenting
- folding
- taglist (quickjump to functions)
- color highlighting
- syntax cheking
- ... and much more

i really don't understand the people who pay for stuff like dreamweaver ....

10

(28 replies, posted in PunBB 1.2 troubleshooting)

could be on a verry calm moment

on a bussy moment (when you have the problem) it should be a lot more

11

(28 replies, posted in PunBB 1.2 troubleshooting)

you can run this in phpmyadmin to

just hit sql and then past the comand

12

(28 replies, posted in PunBB 1.2 troubleshooting)

well it would be good to ahve the output of both commands,

when its not occuring and when its ocuring

13

(28 replies, posted in PunBB 1.2 troubleshooting)

on the moment you have this log in into a mysql shell and do the

SHOW PROCESSLIST;

command and output the data here, then we can see what the server is really doing at that time ...

14

(4 replies, posted in PunBB 1.3 extensions)

its BETA smile

/me hates copy paste big_smile

//EDIT: fixed

yeah without this rule, the searching works perfect

Scripted wrote:

Personally, Vi. For everything.

You must be very good with UNIX command, I'm more like a Microsoft person.


UNIX command ahs nothing todo with VI

what i love about VI is that you don't need any mouse for, everything can be done with keyboard commands.

also small note: i use gvim, thats a graphical VI for windows smile

i create a new url rewriting as folowed

$forum_rewrite_rules['/^wallpapers$/i'] = 'extensions/'.$ext_info['id'].'/page.php?p=2';

i don't see how this can influence the one sued for the search ....

18

(4 replies, posted in PunBB 1.3 extensions)

i created an extension that allows adding of custom pages to punbb

this extension allows creating pages with static HTML it includes an admin section and a database

there are 3 items that are stored for each page:
- title = used in breadcrumbs and html title
- url = base_url/<url> for reaching the page
- txt = the html content of the page

NOTE: this extension requires that the .htaccess is in place as it uses url rewriting

http://punbb.informer.com/unofficial/pu … ns/cpages/

hmm,

there are no se% hooks in the db ...

the only thing there is are some url rewrites in a custom extension and it seems that these are creating the troubles
more specific:

$query = array(
                                'SELECT'        => '*',
                                'FROM'          => 'cpages'
                        );
                        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
                        while ( $item = $forum_db->fetch_assoc($result) ) {
                                $forum_rewrite_rules['/^'.$item['url'].'$/i'] = 'extensions/'.$ext_info['id'].'/page.php?p='.$item['id'];
                        }

but there are no 'search' urls in the db and certainly no search.html

hi, when i use url rewriting (the file based fancy one) the search link is not working

this is with the rewrite: http://neworder.box.sk/forum/search.html
this is the direct link: http://neworder.box.sk/forum/search.php

any ideas what goes wrong?

21

(2 replies, posted in PunBB 1.3 extensions)

nevermind in rewrite.php there was the correct hook .....

hi

in enabled the fancy file based url rewriting.

but now i want some of my extensions to use rewriting to, how can i do this?
what hooks can i use?

at the moment i use one hook to modify the url schema of the forum

<hook id="co_modify_url_scheme"><![CDATA[
                        $forum_url['linkdb'] = 'extensions/'.$ext_info['id'].'/linkdb.php';
                        $forum_url['linkdb_grp'] = 'extensions/'.$ext_info['id'].'/linkdb.php?currentgrp=$1';
                        $forum_url['linkdb_add'] = 'extensions/'.$ext_info['id'].'/linkdb.php?add=1';
                        $forum_url['admin_linkdb'] = 'extensions/'.$ext_info['id'].'/admin.php';
                ]]></hook>

how do i add rewriting?

23

(2 replies, posted in PunBB 1.3 bug reports)

anyone?

24

(2 replies, posted in PunBB 1.3 bug reports)

when a user group has only access to post on a forum its not possible to really post on this forum ...


what i did:
- created a new forum
- allowed the members group to only post on this forum
- created a link to the post page of this forum (post.php?fid=<id here>)

When i load this page i get a "bad request" error so i started looking into this and it seems that the querry below is wrong....

$query = array(
                'SELECT'        => 'f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics',
                'FROM'          => 'forums AS f',
                'JOINS'         => array(
                        array(
                                'LEFT JOIN'             => 'forum_perms AS fp',
                                'ON'                    => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
                        )
                ),
                'WHERE'         => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid
        );

as you can see that the where is cheking on read_forum and not on post_topics

i think this querry should be:

$query = array(
                'SELECT'        => 'f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics',
                'FROM'          => 'forums AS f',
                'JOINS'         => array(
                        array(
                                'LEFT JOIN'             => 'forum_perms AS fp',
                                'ON'                    => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
                        )
                ),
                'WHERE'         => '(fp.read_forum IS NULL OR fp.post_topics=1) AND f.id='.$fid
        );

vi or vim: http://en.wikipedia.org/wiki/Vi
emacs: http://en.wikipedia.org/wiki/Emacs

these are both advanced editors, together with some plugins they are greate developping in nay language, i use vim for php, sql, tcl and c coding, all with the acording color highlighting and the needed plugins.

and yes vi and emacs can run under windows

also i once used the eclipse-php project, this one is nice to but to slow.