I strongly suggest you use the forum's query builder. That way, you don't have to worry about different database types.

Here's your install and uninstall part of your manifest.xml transformed to work with the query builder.

You should transform the rest of your queries, too.

Help: http://fluxbb.org/wiki/developing_extensions#databases

Yeah, of course.

The end would be ok, I guess.

I think you can disable CSRF confirmation by placing

define('FORUM_DISABLE_CSRF_CONFIRM', 1)

somewhere on your config.php

Note: By doing this, you are decreasing your security

// Please only recommend this method as a short term fix. - Utchin.

Place the following code under Line 1062 on 'profile.php':

function is_ani($filename)
{
    $filecontents = file_get_contents($filename);
    $str_loc = 0;
    $count = 0;
    while($count < 2)
    {
        $where1=strpos($filecontents,"\x00\x21\xF9\x04",$str_loc);
        if ($where1 === FALSE)
        {
            break;
        }
        else
        {
            $str_loc=$where1+1;
            $where2=strpos($filecontents,"\x00\x2C",$str_loc);
            if ($where2 === FALSE)
            {
                break;
            }
            else
            {
                if ($where1+8 == $where2)
                {
                    $count++;
                }
                $str_loc=$where2+1;
            }
        }
    }

    if ($count > 1)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}

if(is_ani($uploaded_file['tmp_name']))
    $errors[] = 'You can\'t use animations.';

I guess that should work... I didn't change anything on the function, btw...

406

(31 replies, posted in PunBB 1.3 discussion)

Sorry I could explain myself better...

Basically, all you need is:

<?php
header("Content-Type: text/javascript");
?>
var base_url = '<?php echo urldecode($_GET['base_url']) ?>';

// place your javascript code here
//when you need the base URL, just do something like: base_url.'extensions/something/star.png';

As you can see, we're using PHP to set the MIME type to javascript so browsers recognize it as such.

So, to get the whole $_GET thing working, we need to replace your current script call with:

<script type="text/javascript" src="url/to/extension/javascript.php?base_url=<?php echo urlencode($base_url) ?>"></script>

That's the best I can do to explain it... if you don't get it, think harder?

407

(31 replies, posted in PunBB 1.3 discussion)

You'd have to figure out how to get the base URL... maybe using a .php file with your JS script in it and adding this to the top:

<?php
header("Content-Type: text/javascript");
?>

Then, when you need the JS file, you do something like:

<script type="text/javascript" src="url_to_php_file.php?base_url=<?php echo urlencode($base_url) ?>"></script>

Finally:

document[""+page+"one"].src = "<?php echo urldecode($_GET['base_url']) ?>extensions/rating_script/stars/star.gif";

Hope that works...

408

(31 replies, posted in PunBB 1.3 discussion)

1.- On the uninstall part, you have to undo everything you did on the install part. So, you have to drop the table you created.

2 b).- I don't think you can use PHP variables ($ext_info) on JS...

3.- $forum_db->escape?

That feature worked for me. If it doesn't work for you, don't enable it... sorry I don't have time to check/fix it.

410

(31 replies, posted in PunBB 1.3 discussion)

The first one on <install></install>:

<?xml version="1.0" encoding="utf-8"?>
<extension engine="1.0">
    <id>sitemap</id>
    <title>Sitemap Generator</title>
    <version>1.2.4</version>
    <description>Allows the forum to generate a standard-complying sitemap.</description>
    <author>Garciat</author>
    <minversion>1.3</minversion>
    <maxtestedon>1.3</maxtestedon>
    
    <install>
        <![CDATA[

        ]]>
    </install>

...

</extension>

411

(5 replies, posted in PunBB 1.3 troubleshooting)

Maybe the language files have to be UTF-8 encoded... I don't know neutral

412

(31 replies, posted in PunBB 1.3 discussion)

To add something next to each topic's title (Pic A), use hook 'vf_topic_loop_normal_topic_pre_item_title_merge' and

$forum_page['item_title']['link'] .= 'Your rating box thing';

To add something next to the post number, use hook 'vt_row_pre_post_ident_merge' and

$forum_page['post_ident']['num'] = 'Your rating box thing'.$forum_page['post_ident']['num'];

Now I'm back to playing Sim City 4 big_smile ... it's addicting wink

413

(4 replies, posted in PunBB 1.3 extensions)

I agree with iniara. Because Gravatar checks its images, so you won't be getting any virii/goatses/etc. Plus, there's already a Gravatar extension.

414

(21 replies, posted in PunBB 1.3 extensions)

Yeah, I think the main idea is really good, but it's not really cross-database... It still needs lots of work...

and testing...

415

(31 replies, posted in PunBB 1.3 discussion)

No, you don't need that.

416

(31 replies, posted in PunBB 1.3 discussion)

Example using $forum_db functions.

    $schema = array(
        'FIELDS'        => array(
            'id'            => array(
                'datatype'        => 'SERIAL',
                'allow_null'    => false
            ),
            'cat_name'        => array(
                'datatype'        => 'VARCHAR(80)',
                'allow_null'    => false,
                'default'        => '\'New Category\''
            ),
            'disp_position'    => array(
                'datatype'        => 'INT(10)',
                'allow_null'    => false,
                'default'        => '0'
            )
        ),
        'PRIMARY KEY'    => array('id')
    );
    $forum_db->create_table('categories', $schema);

417

(14 replies, posted in PunBB 1.3 extensions)

There really is no point in having a hooks list when you don't know where they are (line-wise).

418

(17 replies, posted in PunBB 1.3 extensions)

Updated to 1.1.

Replace Line 609 in 'include/parser.php' with:

        return '<a href="'.$full_url.'" target="_blank">'.$link.'</a>';

420

(17 replies, posted in PunBB 1.3 extensions)

Could explain me what differences between GPL v2 and v3 are, and how to add the license to my extensions/projects?

Thanks smile

421

(21 replies, posted in PunBB 1.3 extensions)

Updated to 1.2.

Which links?

Since it's not really an IMG tag, it's actually a TITLE attribute and not ALT smile

Anyways, I added it to the script, redownlaod big_smile

424

(14 replies, posted in PunBB 1.3 extensions)

You're supposed to look for them on the PunBB files.

425

(17 replies, posted in PunBB 1.3 extensions)

I'm not sure about the license... does it matter?