1

(10 replies, posted in PunBB 1.2 troubleshooting)

Oh gosh.  I was reading 1.2.14 as 1.2.1.4 ... which would bring it before 1.2.9.. hence my confusion.  my bad...

and I was looking for cache under the /cache/ directory  (eep.)

thank you....

2

(10 replies, posted in PunBB 1.2 troubleshooting)

*confused*
if the "latest and greatest" version of punBB is 1.2.14, then why are there old versions 1.2.9 and such?
and there doesn't seem to be a cache.php file in the new pack/zip file... where should I be looking?

Thanks so much for your help..

3

(10 replies, posted in PunBB 1.2 troubleshooting)

strange.. I ran the upgrade as per instructions and it looked like it went without hitch.
truth be told, aside from stating the correct version, I noticed no differences.
(according to my previous installation, I had been running 1.2.2 ??)

4

(10 replies, posted in PunBB 1.2 troubleshooting)

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;


//
// If we are running pre PHP 4.2.0, we add our own implementation of var_export
//
if (!function_exists('var_export'))
{
    function var_export()
    {
        $args = func_get_args();
        $indent = (isset($args[2])) ? $args[2] : '';

        if (is_array($args[0]))
        {
            $output = 'array ('."\n";

            foreach ($args[0] as $k => $v)
            {
                if (is_numeric($k))
                    $output .= $indent.'  '.$k.' => ';
                else
                    $output .= $indent.'  \''.str_replace('\'', '\\\'', str_replace('\\', '\\\\', $k)).'\' => ';

                if (is_array($v))
                    $output .= var_export($v, true, $indent.'  ');
                else
                {
                    if (gettype($v) != 'string' && !empty($v))
                        $output .= $v.','."\n";
                    else
                        $output .= '\''.str_replace('\'', '\\\'', str_replace('\\', '\\\\', $v)).'\','."\n";
                }
            }

            $output .= ($indent != '') ? $indent.'),'."\n" : ')';
        }
        else
            $output = $args[0];

        if ($args[1] == true)
            return $output;
        else
            echo $output;
    }
}


//
// Generate the config cache PHP script
//
function generate_config_cache()
{
    global $db;

    // Get the forum config from the DB
    $result = $db->query('SELECT * FROM '.$db->prefix.'config', true) or error('Unable to fetch forum config', __FILE__, __LINE__, $db->error());
    while ($cur_config_item = $db->fetch_row($result))
        $output[$cur_config_item[0]] = $cur_config_item[1];

    // Output config as PHP code
    $fh = @fopen(PUN_ROOT.'cache/cache_config.php', 'wb');
    if (!$fh)
        error('Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__);

    fwrite($fh, '<?php'."\n\n".'define(\'PUN_CONFIG_LOADED\', 1);'."\n\n".'$pun_config = '.var_export($output, true).';'."\n\n".'?>');

    fclose($fh);
}


//
// Generate the bans cache PHP script
//
function generate_bans_cache()
{
    global $db;

    // Get the ban list from the DB
    $result = $db->query('SELECT * FROM '.$db->prefix.'bans', true) or error('Unable to fetch ban list', __FILE__, __LINE__, $db->error());

    $output = array();
    while ($cur_ban = $db->fetch_assoc($result))
        $output[] = $cur_ban;

    // Output ban list as PHP code
    $fh = @fopen(PUN_ROOT.'cache/cache_bans.php', 'wb');
    if (!$fh)
        error('Unable to write bans cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__);

    fwrite($fh, '<?php'."\n\n".'define(\'PUN_BANS_LOADED\', 1);'."\n\n".'$pun_bans = '.var_export($output, true).';'."\n\n".'?>');

    fclose($fh);
}


//
// Generate the ranks cache PHP script
//
function generate_ranks_cache()
{
    global $db;

    // Get the rank list from the DB
    $result = $db->query('SELECT * FROM '.$db->prefix.'ranks', true) or error('Unable to fetch rank list', __FILE__, __LINE__, $db->error());

    $output = array();
    while ($cur_rank = $db->fetch_assoc($result))
        $output[] = $cur_rank;

    // Output ranks list as PHP code
    $fh = @fopen(PUN_ROOT.'cache/cache_ranks.php', 'wb');
    if (!$fh)
        error('Unable to write ranks cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__);

    fwrite($fh, '<?php'."\n\n".'define(\'PUN_RANKS_LOADED\', 1);'."\n\n".'$pun_ranks = '.var_export($output, true).';'."\n\n".'?>');

    fclose($fh);
}


//
// Generate quickjump cache PHP scripts
//
function generate_quickjump_cache($group_id = false)
{
    global $db, $lang_common, $pun_user;

    // If a group_id was supplied, we generate the quickjump cache for that group only
    if ($group_id !== false)
        $groups[0] = $group_id;
    else
    {
        // A group_id was now supplied, so we generate the quickjump cache for all groups
        $result = $db->query('SELECT g_id FROM '.$db->prefix.'groups') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
        $num_groups = $db->num_rows($result);

        for ($i = 0; $i < $num_groups; ++$i)
            $groups[] = $db->result($result, $i);
    }

    // Loop through the groups in $groups and output the cache for each of them
    while (list(, $group_id) = @each($groups))
    {
        // Output quickjump as PHP code
        $fh = @fopen(PUN_ROOT.'cache/cache_quickjump_'.$group_id.'.php', 'wb');
        if (!$fh)
            error('Unable to write quickjump cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__);

        $output = '<?php'."\n\n".'define(\'PUN_QJ_LOADED\', 1);'."\n\n".'?>';
        $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'] ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";


        $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.redirect_url 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='.$group_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());

        $cur_category = 0;
        while ($cur_forum = $db->fetch_assoc($result))
        {
            if ($cur_forum['cid'] != $cur_category)    // A new category since last iteration?
            {
                if ($cur_category)
                    $output .= "\t\t\t\t\t\t".'</optgroup>'."\n";

                $output .= "\t\t\t\t\t\t".'<optgroup label="'.pun_htmlspecialchars($cur_forum['cat_name']).'">'."\n";
                $cur_category = $cur_forum['cid'];
            }

            $redirect_tag = ($cur_forum['redirect_url'] != '') ? ' >>>' : '';
            $output .= "\t\t\t\t\t\t\t".'<option value="'.$cur_forum['fid'].'"<?php echo ($forum_id == '.$cur_forum['fid'].') ? \' selected="selected"\' : \'\' ?>>'.pun_htmlspecialchars($cur_forum['forum_name']).$redirect_tag.'</option>'."\n";
        }

        $output .= "\t\t\t\t\t".'</optgroup>'."\n\t\t\t\t\t".'</select>'."\n\t\t\t\t\t".'<input type="submit" value="<?php echo $lang_common[\'Go\'] ?>" accesskey="g" />'."\n\t\t\t\t\t".'</label></div>'."\n\t\t\t\t".'</form>'."\n";

        fwrite($fh, $output);

        fclose($fh);
    }
}

I did find that reordering cache_ranks.php fixed the problem.. but is there something in my cache.php that should be different?

Thank you smile

re-ordering worked.  adding new ranks also worked..
Thank you.



But if I remove user ranks, then everyone shows as Members, even though some are Admins, and some are Friends..

6

(10 replies, posted in PunBB 1.2 troubleshooting)

Was this ever fixed?  Remains a problem for me, even upgrading to the latest 1.2.14..

Thanks smile

that is pretty weird wink

http://forum.textpattern.com uses alpha, beta, gamma ... etc.

i'm using animals... starting with fancy guppy, then tree frog, and moving up through chinchilla, quail, sun bear, tiger, and up to dragon.

CodeXP wrote:

Why not use the news generator plugin for that? It's perfect for the job [simple demo here] smile

that is a really layout you have.. i don't suppose there's a brief write-up anywhere about the mods/steps you took to get those features and that appearance on your forum?

9

(21 replies, posted in General discussion)

i'd completely forgotten about <del>.  'will certainly be using that now, thanks

10

(21 replies, posted in General discussion)

Mart wrote:

<del> is perfectly valid XHTML and serves the same function (ie, it allows strike-through text to be displayed). Its default CSS behaviour is text-decoration:strike-through, though that can obviously be changed via CSS. Hope that helps.

oh smile i can live with that. thank you.

11

(21 replies, posted in General discussion)

Paul wrote:

The <strike> and <s> tags are not valid XHTML Strict or even HTML Strict. You should use <span class="strike"> and then set text-decoration on the <span> in the stylesheet.

man, what was wrong with 'strike' that it had to be stricken from validity??  *sigh*  these crazy newfangled ideas...

12

(21 replies, posted in General discussion)

thoroughly reasonable.  couldn't we have a set of allowed tags?  such as <code> and <strike> and other familiar friends of the sort?

13

(21 replies, posted in General discussion)

i'm sure there's a discussion on here about why html is not allowed... could someone please point me to that?  and also (especially) how to enable html in punbb?  that would be real swell smile

thank you!

so moving topics is built into punbb?  just not moving individual posts?  or am i misunderstanding?

15

(11 replies, posted in Feature requests)

sounds like something a mod/plugin would be suited for?

just to check.. as of 1.2.2, is it now possible to move topics and also move individual posts? 
is the split topic mod necessary for both of these features?

thanks..

has anyone given this subject more thought, or practiced it?  it's not something i'm needing anytime soon... but it's definitely something to consider in the future: the intertwining of more than one punbb forum (separate installs).

18

(6 replies, posted in PunBB 1.2 discussion)

i'd love to see some sort of styling guide too smile

*discovery* ! 
bluearc21 introduced Rickard to Textpattern... and PunBB came to be a staple on TextDrive....
i feel like i've dug up a bit of genealogy smile

this is an old thread, but i'm with bluearc: (though it takes a bit toget used to) textile is tons less cumbersome than bbcode, and makes typing code much much easier.

*edit: p.s. thanks bluearc!

20

(1,382 replies, posted in General discussion)

face

21

(7 replies, posted in PunBB 1.2 discussion)

nice; making note of this for future use

Thank you so much, erissiva.  I will check all this out.  Much appreciated!

understandable, Connor wink  'hope all the projects you're working on go well, and i'll try to patiently look forward to seeing PunCMS.
meanwhile...
i was hoping someone could tell point me to an existing list or tell me: what plugins/mods/additions/changes are made to the basic PunBB install to produce the features shown on the main http://punbb.org/ site?  those seem to be a few 'portal' features.. i tried searching for an existing mention of punbb.org's site features, but came up without luck. 
thanks smile

how's this coming? smile

thanks erissiva smile