151

(2 replies, posted in PunBB 1.3 extensions)

matt1298 wrote:

This will be made when 1.3 is released

that will be nice. but will we be able to import the older reputation? bcoz we will upgrade from 1.2x (repu mod is installed there) to 1.3

hello,
I have translated punbb 1.2.x to my language Bangla (Bengali). Like most other software, all strings were in Bangla except the numbers, date etc. For that I have used a mod to convert string in Bangla. Suppose, in forum homepage there were forum name, topics, posts, last posted by in english.

i hacked the codes and showed numbers of topics, posts in Bangla.

if the code was like:

echo $num_topics;

i have changed it to:
echo convert2bn($num_topics);

the convert2bn() function takes care of converting english strings to Bangla.

But I am worried about 1.3. How these issues are handled there? have I still need to hack each file manually?  or i need to make a extension to do all such. I think, in extension, it will be too long. but if there is option in language file, that will be nice.

suppose:
$int1='১';
$int2='২';

or it may be in array. then it will be much easier to translate us.

thanks in advance!

it will be surely when my forum is upgraded to 1.3. but my installation is so much Moded that I am afraid, how to upgrade to punbb1.3

Just now, released v1.5 with adding new and deleting old config value feature. thanks

Hello, today I wanted to tested a Plugin Development for PunBB. So, I have developed a Config Editor Plugin. Using this you can edit all values of config table.

Please download the plugin from my blog. http://hungrycoder.xenexbd.com/node/158

comments are appreciated smile.

mixart wrote:

I thought I saw a post on this once but can't for the life of me find it.

I would like a "do not remember me" feature for public users who use internet cafes, librarys, schools, etc.

This would be a checkbox on the login page that says "This is a public computer, do not remember my password" - so users that have their account settings to "remember me" can check this and it does not remember them (either changes their account remember me setting or does not set the "remember me cookie" for this session.

Any ideas? Has someone already one this?

i highly agree with you. i was planning to open thread of such things. but found it already opened. thanks

in my forum, i often get complains from users that they have used the forum in public computer and later forgot to logout. so they are signed in there for a long time. most probably, password changing does not solve it.

so, i strongly request to implement either Remember Me (then setting privacy options is not needed) / Don't Remember me while login. Later one may be an easier solution.

thanks

157

(7 replies, posted in PunBB 1.3 extensions)

yeah, it can be an extension. but all extensions that need javascript framework, should use this extension.

thanks

158

(7 replies, posted in PunBB 1.3 extensions)

my forum (http://forum.projanmo.com) is on punbb. i have installed many MOD to extend my forum. i have used some mod for ajax call and also made some of my own mod which requires ajax calls. but the ajax libraries from MOD to MOD are inconsistent. that is, some mod uses one ajax library and other use another ajax libraries. it causes unnecessary javascript codes which increases confusion and slow down the loading of forum at client side.

so, I request PunBB team, to announce a standard javascript/ajax framework, so that all other mod uses the same framework. it would be fine for PunBB 1.2.x but I believe it should be must for 1.3.x

thanks and greetings to PunBB teams for their continuous efforts.

I wish to provide some more proposals for PunBB1.3x

Thanks

159

(48 replies, posted in News)

Its amazing to see new version of PunBB.

I have just downloaded and installed it. I see registration system is still not much improved. But I think it should be improved by:

1. Email Activation System (Not by current method but by registration key after giving login details with username and password). The current option can also be kept as another option.
2. Captcha
3. Manual Admin Activation

all options is configuration from moderator section.

thanks. Good luck.

another thing:
I think admin panel does not require SEF. In case i misconfigure the SEF, i cannot access the admin panel too. so, please keep Admin section normal and only is FrontEnd configurable for SEF.

thanks

160

(5 replies, posted in PunBB 1.2 troubleshooting)

i am facing same issue. I am getting an error in my forum:
Error: Unable to fetch old entries from online list.

when i click Optimize from phpmyadmin i get same error the the table format is not supported. but earlier it worked.

what should I do now?

thankx in advance

Is there any way in the search feature to list the only topics created by a particular user.

I did not find yet.

thanks

thats good. i wonder then why line number is shown in our forum mad

code tag uses the line number which is hard for someone to copy the code and test. so i used plain.

thanks

Being inspired from PunPortal, I am designing a Personal Homepage (My Page) for punbb. In the My Page a user can see many information about himself.

I will share the codes with you here. any suggestion & optimization is welcome.

------------------My Overview------------------------------------
//Start Subst - <pun_my_overview>. 

ob_start();

?>
<div class="block" id="myoverview">
<h2><span><?php echo $lang_my['Overview'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?
        $result = $db->query('SELECT u.registered,u.num_posts,u.last_post FROM '.$db->prefix.'users as u WHERE id='.$pun_user['id'].' LIMIT 1') or error('Unable to fetch user information',__FILE__,__LINE__, $db->error());
        $myinfo = $db->fetch_assoc($result);
        //save db values to variable
        $regdate=$myinfo['registered'];
        $num_posts=$myinfo['num_posts'];
        $last_post=$myinfo['last_post'];
            
        //now get total number of topics created by user
        $result = $db->query('SELECT count(t.id) as thread FROM '.$db->prefix.'topics as t JOIN '.$db->prefix.'users as u ON t.poster=u.username WHERE u.id='.$pun_user['id']) or error('Unable to fetch user\'s total topics',__FILE__,__LINE__, $db->error());
        $myinfo = $db->fetch_assoc($result);
        //saving database values to variable
        $num_topics=$myinfo['thread'];
        
        //fetch my reputation
        $uid = $pun_user['id'];
        if ($uid<2)
        message($lang_common['Bad request']);
    
        $result = $db->query('SELECT SUM(rep_plus) - SUM(rep_minus) AS repu FROM '.$db->prefix.'reputation as r WHERE r.user_id='.$uid) or error('Unable to fetch reputation info', __FILE__, __LINE__, $db->error());
            if ($db->num_rows($result)){
                $user_rep = $db->fetch_assoc($result);
                $user_rep = $user_rep['repu'];
            } else {
                message($lang_common['Bad request']);
            }
        
        
        //making list
        $showalltopics="search.php?action=search&keywords=&author=".$pun_user['username']."&forum =-1&search_in=topic&sort_by=0&sort_dir=DESC&show_as=topics";
        $myoverview = '<ul>';
        
        if(!empty($regdate)) $myoverview .='<li>'.$lang_my['Reg Date'].': '.date($pun_config['o_date_format'], $regdate).'</li>';
        if(!empty($num_posts)) $myoverview .='<li>'.$lang_my['Total Posts'].': '.$num_posts.'</li>';
        if(!empty($last_post)) $myoverview .='<li>'.$lang_my['Last Post'].': '.date($pun_config['o_date_format'], $last_post).'</li>';
        if(!empty($num_topics))    $myoverview .='<li><a href="'.$showalltopics.'">'.$lang_my['Total Topics'].'<a/>: '.$myinfo['thread'].'</li>';
        $myoverview .= '<li><a href="'.$pun_config['o_base_url'].'/reputation.php?uid='.$pun_user['id'].'">'.$lang_my['Reputation'].'</a>: '.unicode($user_rep) .'</li>';
        
        $myoverview .='</ul>';
        
        echo $myoverview;
        
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_my_overview>', $tpl_temp, $tpl_main);
    ob_end_clean();
//End Subst - <pun_my_overview>. 
--------------------My Overview----------------------------------


------------------My Recent Topics------------------------------------
//Start Subst - <pun_my_recent_topics>. topic created by me
ob_start();

$topicslimit =10; //$pun_config['o_portal_topics_limit'];
?>
<div class="block" id="myrecenttopics">
<h2><span><?php echo $lang_my['Recent Topics'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?
        $result = $db->query('SELECT t.id,t.subject,t.poster FROM '.$db->prefix.'topics AS t JOIN '.$db->prefix.'users AS u ON t.poster=u.username AND u.id="'.$pun_user['id'].'" ORDER BY t.posted DESC LIMIT '.$topicslimit) or error('Unable to fetch recent topic list', __FILE__, __LINE__, $db->error());
        while($cur_topics = $db->fetch_assoc($result))
        {
            $recent_topics = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topics['id'].'">'.$cur_topics['subject'].'</a></li></ul>';
        
            echo $recent_topics;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_my_recent_topics>', $tpl_temp, $tpl_main);
    ob_end_clean();

//End Subst - <pun_my_recent_topics>. topic created by me
------------------My Recent Topics------------------------------------


------------------My Recent Posts-------------------------------------
//Start Subst - <pun_my_recent_posts>. post created by me

ob_start();


$postslimit =10; 
?>
<div class="block" id="myrecentposts">
<h2><span><?php echo $lang_my['Recent Posts'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?
        $result = $db->query('SELECT p.id,p.message,p.poster_id,t.subject FROM '.$db->prefix.'posts as p JOIN '.$db->prefix.'topics as t ON p.topic_id=t.id WHERE poster_id='.$pun_user['id'].' ORDER BY p.posted desc LIMIT '.$postslimit) or error('Unable to fetch recent posts list',__FILE__,__LINE__, $db->error());
        while($cur_posts = $db->fetch_assoc($result))
        {
            $recent_posts = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?pid='.$cur_posts['id'].'#p'.$cur_posts['id'].'">'.$cur_posts['subject'].'</a></li></ul>';
        
            echo $recent_posts;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_my_recent_posts>', $tpl_temp, $tpl_main);
    ob_end_clean();

//End Subst - <pun_my_recent_posts>. 
------------------My Recent Posts-------------------------------------


-----------------My Subscriptions-------------------------------------
//Start Subst - <pun_my_subscription>. topics to which I am subscribed
ob_start();


?>
<div class="block" id="mysubscriptions">
<h2><span><?php echo $lang_my['Subscribed Topics'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?
        $result = $db->query('SELECT t.id,t.subject FROM '.$db->prefix.'topics AS t JOIN '.$db->prefix.'subscriptions AS s ON t.id=s.topic_id AND s.user_id="'.$pun_user['id'].'" ORDER BY t.posted DESC LIMIT 100') or error('Unable to fetch your subscribed topics', __FILE__, __LINE__, $db->error());
        while($cur_topics = $db->fetch_assoc($result))
        {
            $subscribed_topics = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topics['id'].'">'.$cur_topics['subject'].'</a> <a title="Click here to unsubscribe from this topic" href="'.$pun_config['o_base_url'].'/misc.php?unsubscribe='.$cur_topics['id'].'"><img src="img/my/minus.gif"/></a></li></ul>';
        
            echo $subscribed_topics;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_my_subscriptions>', $tpl_temp, $tpl_main);
    ob_end_clean();

//End Subst - <pun_my_subscription>.  
-----------------My Subscriptions-------------------------------------


I have developed a mod named My Favorite Topics. i will disclose those codes in another thread


---------------New Posts AFter my last Visit--------------------------
//Start Subst - <pun_my_newpost>. new posts after my last visit
ob_start();


?>
<div class="block" id="mynewposts">
<h2><span><?php echo $lang_my['New Posts'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        
        <?
        $result = $db->query('SELECT t.id,t.subject,t.last_post_id FROM '.$db->prefix.'topics as t WHERE t.last_post >'.$pun_user['last_visit']) or error('Unable to fetch new posts from your last visit',__FILE__,__LINE__, $db->error());
        //die($db->num_rows($result));
        if($db->num_rows($result))
        {    
            while($cur_posts = $db->fetch_assoc($result))
            {
                $new_posts = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?pid='.$cur_posts['last_post_id'].'#p'.$cur_posts['last_post_id'].'">'.$cur_posts['subject'].'</a></li></ul>';
            
                echo $new_posts;
            } 
        } else {
            require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';
            echo ($lang_search['No new posts']);
        }
        
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_my_new_posts>', $tpl_temp, $tpl_main);
    ob_end_clean();

//Start Subst - <pun_my_newpost> 

---------------New Posts AFter my last Visit--------------------------

Now i need to do something more. A user's all posts can be listed by using search.php?action=show_user&user_id=xxx

but is there in code already done in the search.php to list all topics by a particular user. I can make it, but it will be best if i can do it without writing/editing search.php file.

actually I am doing these things so far without changing any current files. So far I just added a line in the header.php (template file)


thanks

165

(5 replies, posted in PunBB 1.2 discussion)

sorry I meant emptying these 3 tables. I already truncated these 3 tree tables and everything seems to working fine.

166

(5 replies, posted in PunBB 1.2 discussion)

can anyone plz tell me use of these tables in punbb database:

punbb_search_cache
punbb_search_matches
punbb_search_words

these 3 tables holds more than 1/3 of my total db usage. can I empty the database from time to time? will it cause any problem to system?

167

(11 replies, posted in General discussion)

I want to upgrade my server to PHP5. So today I tried my punbb with WAMP 5. But while browsing the index.php i get the following error:

Parse error: syntax error, unexpected $end in E:\My Files\Websites\Projanmo\forum\header.php on line 649

the 649 is the last line of header.php. 648 is:

define('PUN_HEADER', 1);

I have several mod installed.
1. punportal
2. pms
3. topic rating, user reputation
and etc.

where is the problem? thanks in advance

168

(11 replies, posted in General discussion)

hmmmmmmmmmmmmm

thanks

169

(11 replies, posted in General discussion)

dear,
today i got the culprit.

The reason of slowing was the PunPortal Mod. Today I removed it and saw forum is loading within 0.025 seconds. Earlier it took 2 - 8 seconds sad.

So, my recommendation to everybody not to use PurPortal Mod if performance is a issue. This mod includes some sql query in header.php file which is not needed except the homepage. as in header.php these queries are executed in each page.

thanks all for advice and helps

170

(11 replies, posted in General discussion)

Dear
Thank you very much for your post. Actually sub-forum is a must for any big forum. If not use MOD we miss many features. I think core punbb should give more such features.

My server has 2GB RAM and not more than 30 websites.

Zend Accelerators is installed in our server smile. Should it not improve performance? But I will follow your caching recommendation too.

in my setting user online is enabled and user has posted earlier is disabled.

one of the performance degredation cause i think:
some MODs coded in common files though these MOD does not work in every page. So they also causing some performance issue sad.

anyway, thanks for your reply. i am going through your recommendation.

171

(11 replies, posted in General discussion)

actually i have just one question:
My forum is loading slower than earlier. Initially it took less than 1 seconds. then it took about 2 seconds and now near 3 seconds.

its increasing as the database size increasing.

Now how can I improve (decreasing loading time) the forum?

db size is now 25MB.

all texts are in Unicode.

thanks

172

(11 replies, posted in General discussion)

does not anyone to help me?

My forum too about 2 seconds to load. Now its taking about 2.96 seconds to load.................how i will tackle in near future and long future sad

otherwise i have to change the forum engine sad.

173

(11 replies, posted in General discussion)

My forum at http://forum.projanmo.com is growing very fast. the database size is increasing too fast as there is unicode texts.

so i want to implement page caching. how can I do that?

thanks in advance

174

(3 replies, posted in PunBB 1.2 troubleshooting)

actually I was converting all numeric figures in forum to another Language. all texts are in Bangla language. But only numeric are in English. So, today I made another function to convert all numeric figures in Bangla. but Today & Yesterday was disturbing............

my guess with date is not working  .................trying another method

175

(3 replies, posted in PunBB 1.2 troubleshooting)

I want to disable today & yesterday feature. How can I do this ?

thanks in advance