126

(17 replies, posted in PunBB 1.3 troubleshooting)

nope gheheh, as I said, it only happens the first time wink
http://pundemo.kierownik.nl

127

(17 replies, posted in PunBB 1.3 troubleshooting)

Tried that but it did not help, it is also only when I log in the first time after I started my laptop hmm

128

(17 replies, posted in PunBB 1.3 troubleshooting)

Anybody have an idea sad

129

(17 replies, posted in PunBB 1.3 troubleshooting)

How can it happen that if I log in at my forum that I am redirected to the rss feed of my forum. I only have this with my laptop if I start it. I tried it at work but there he redirect me correct. Does anybody have an idea?

Why not then check if user is logged in, if not show ad, if logged in do not show ad.

if( $pun_user['is_guest'] ) { show ad }

131

(14 replies, posted in PunBB 1.2 troubleshooting)

I registered at your site and I only have to login once hmm

132

(16 replies, posted in PunBB 1.2 troubleshooting)

Does your logout link look like this?

http://sitename.nl/login.php?action=out&id=2&csrf_token=b2593ce435b2038f1420f3754e108cec236abdf0

133

(14 replies, posted in PunBB 1.2 troubleshooting)

What is the url to your site?

134

(3 replies, posted in PunBB 1.2 troubleshooting)

I think you should change o_base_url in the database!

135

(3 replies, posted in PunBB 1.3 troubleshooting)

what are your rewrite rules, I also had difficulty in getting that right.

136

(14 replies, posted in PunBB 1.2 troubleshooting)

Where do you specify logo.png. If it is not in the css file then you should go to the file where you set logo.png as your header and put the <a> around it there, then it should work.

I think it is in the *.tpl files.

137

(14 replies, posted in PunBB 1.2 troubleshooting)

you found:

$tpl_main = str_replace('<pun_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_board_title']).'</span></h1>', $tpl_main);

and you made it into:

$tpl_main = str_replace('<pun_title>', '<h1><span><a href="http://your website.com">'.pun_htmlspecialchars($pun_config['o_board_title']).'</a></span></h1>', $tpl_main);

138

(14 replies, posted in PunBB 1.2 troubleshooting)

What is no go? Did you try everything in this topic?

hmm, then I think it should be ../../ hmm

140

(8 replies, posted in PunBB 1.3 extensions)

http://www.punres.org/desc.php?pid=492

Would be nice, give credit to those who diserve it.

then change the ../ to ./ so it points to the root of the punbb installation.

143

(151 replies, posted in PunBB 1.3 extensions)

I think you should use co_common and re_rewrite_rules for that.

144

(2 replies, posted in PunBB 1.2 troubleshooting)

and now in english hmm

145

(11 replies, posted in Programming)

yes that was my mistake, I did not copy that wright roll
It should be all userid_$id_ smile

but it works now smile

146

(11 replies, posted in Programming)

aha, if ^ means that it has to start with it then it is enough, thanks.

147

(7 replies, posted in Programming)

ok, I will try those thing.

Thanks Smartys

148

(7 replies, posted in Programming)

hmm, I think that most of the $_POST will be set if they hit the update button.

So the second code if not good the first is better!

I use the first code but how should I use $db->query_build then can you explain smartys.

149

(7 replies, posted in Programming)

What feature are you talking about?

150

(7 replies, posted in Programming)

I now have this code:

case 'process':
      $query = array (
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_script']).'\'', 'WHERE' => 'conf_name= \'o_gallery_script\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_show_bbcode']).'\'', 'WHERE' => 'conf_name= \'o_gallery_show_bbcode\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_upload_size']).'\'', 'WHERE' => 'conf_name= \'o_gallery_upload_size\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_upload_dir']).'\'', 'WHERE' => 'conf_name= \'o_gallery_upload_dir\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_extension']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_extension\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_usergroups']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_usergroups\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_disallowed_user']).'\'', 'WHERE' => 'conf_name= \'o_gallery_disallowed_user\'' ),
        array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_upload']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_upload\'' )
      );
      foreach ( $query as $update ) {
        $db->query_build ( $update ) or error (__FILE__, __LINE__);
      }
      require_once PUN_ROOT.'include/cache.php';
      generate_config_cache ( );
      redirect ( pun_link ( 'extensions/gallery/admin/gallery.php' ), $lang_gallery['update success'] );

Or is it faster if I do this?

case 'process':
  if ( $_POST['o_gallery_script'] != $pun_config['o_gallery_script'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_script']).'\'', 'WHERE' => 'conf_name= \'o_gallery_script\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_show_bbcode'] != $pun_config['o_gallery_show_bbcode'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_show_bbcode']).'\'', 'WHERE' => 'conf_name= \'o_gallery_show_bbcode\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_upload_size'] != $pun_config['o_gallery_upload_size'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_upload_size']).'\'', 'WHERE' => 'conf_name= \'o_gallery_upload_size\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_upload_dir'] != $pun_config['o_gallery_upload_dir'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_upload_dir']).'\'', 'WHERE' => 'conf_name= \'o_gallery_upload_dir\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_allowed_extension'] != $pun_config['o_gallery_allowed_extension'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_extension']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_extension\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_allowed_usergroups'] != $pun_config['o_gallery_allowed_usergroups'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_usergroups']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_usergroups\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_disallowed_user'] != $pun_config['o_gallery_disallowed_user'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_disallowed_user']).'\'', 'WHERE' => 'conf_name= \'o_gallery_disallowed_user\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }
  if ( $_POST['o_gallery_allowed_upload'] != $pun_config['o_gallery_allowed_upload'] ) {
    $query = array ( 'UPDATE' => 'config', 'SET' => 'conf_value=\''.$db->escape($_POST['o_gallery_allowed_upload']).'\'', 'WHERE' => 'conf_name= \'o_gallery_allowed_upload\'' );
    $db->query_build ( $update ) or error (__FILE__, __LINE__);
  }

  require_once PUN_ROOT.'include/cache.php';
  generate_config_cache ( );
  redirect ( pun_link ( 'extensions/gallery/admin/gallery.php' ), $lang_gallery['update success'] );

I think that the first is faster because in the time that the second script has to check if $_POST and $pun_config is the same the first script is already done with it I think;

What do you all think?