51

(3 replies, posted in Programming)

Cool, going to try it ^^.

If you have phpmyadmin you can look in the config table or go to the cache dir where the config is cached.

53

(2 replies, posted in PunBB 1.2 discussion)

I've had the second error when I did 'Mark topics as read'.

It can be done with only CSS ^^. Here big_smile : http://wiki.punres.org/Add_a_logo_to_the_header_via_css

I made this, Alternate row coloring for topic list, userlist and search results: http://wiki.punres.org/Alternate_row_coloring

I don't know why. But when I download a torrentfile and open it in utorrent it says: Unable to load "torrentname": Invalid torrent file! And the same with archives (ace,zip,rar).
I tried .htaccess for force download, but that doesn't work 100%.

This is the script I made:

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

  Copyright (C) 2007-2008  Frank Smit (fsx.nr01@gmail.com)

  This file is part of Download Mod.

  Download Mod 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.

  Download Mod 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

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

define('PUN_ROOT', '../');
require PUN_ROOT.'include/common.php';
define('PUN_QUIET_VISIT', 1);

// Protection
if (intval($pun_config['dl_open_closed']) == 0)
    die('The download section is closed.');

if ($pun_user['id'] == 1 && $pun_config['dl_guest_access'] == 0)
    die('Guests are not allowed to download. Please <a href="register.php">register</a> or if you already are registered you can <a href="login.php">login</a>.');

// Set vars
$info        = explode (",", $_GET['d']);
$filepath    = $pun_config['o_base_url'].'/'.$pun_config['dl_download_dir'].'/'.$info['0'].'/'.$info['1'];

// Include cache file
if (file_exists('../cache/cache_download_data'.$info['0'].'.php'))
    require('../cache/cache_download_data'.$info['0'].'.php');

// Search in the cache for requested file
$filenr = getfilenr($files,$info['1']);

/* echo $info['0'].'<br />';
echo $info['1'].'<br />';
echo $filepath.'<br />';
echo $filenr.'<br />';
echo $files[$filenr]['filename'].'<br />';
echo $files[$filenr]['filetype'].'<br />';
echo $files[$filenr]['filesize'].'<br />'; */

$exclude_files    = explode(',', $pun_config['dl_exclude_files']);
$exclude_ext    = explode(' ', $pun_config['dl_exclude_ext']);
    
// Checking stuff
if(!in_array($files[$filenr]['filetype'], $exclude_ext) || !in_array($files[$filenr]['filename'], $exclude_files)) {
    
    // Update the download count
    $files[$filenr]['downloads']++;
    
    // Save data
    require_once PUN_ROOT.'include/cache.php';
    generate_download_data_cache($info['0'],$files);

} else die('You are not aloud to download this file. <a href="../download.php?c='.$info['0'].'">Click here to go back.</a>');

    // Set mimetype
    switch($files[$filenr]['filetype']) {
        case "pdf": $ctype="application/pdf"; break;
        case "exe": $ctype="application/octet-stream"; break;
        case "zip": $ctype="application/zip"; break;
        case "doc": $ctype="application/msword"; break;
        case "xls": $ctype="application/vnd.ms-excel"; break;
        case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
        case "gif": $ctype="image/gif"; break;
        case "png": $ctype="image/png"; break;
        case "torrent": $ctype="application/x-bittorrent"; break;
        case "jpe": case "jpeg": case "jpg": $ctype="image/jpg"; break;
        default: $ctype="application/force-download";
    }
    
    
    // Download :O
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private",false);
    header("Content-Type: $ctype");
    header("Content-Disposition: attachment; filename=\"".$files[$filenr]['filename']."\";" );
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ".filesize($filepath));
    @readfile($filepath);
    exit();
    
?>

57

(4 replies, posted in PunBB 1.2 show off)

Cool, but what happens with punlancer?

58

(13 replies, posted in General discussion)

Yay, beta comes soon big_smile.

Happy new year to every one big_smile !!

59

(2 replies, posted in Programming)

Yea, you can edit the config to get that, I didn't built it for that. So just try smile.

60

(2 replies, posted in Programming)

My first C++ program big_smile. I wanted to make style developing easier. So I though if something makes the style files and image folder for me, it would be a bit less work. So I made a tool, with some help from elkekko.

I hope it is usefull ^^.
btw, it works only on windows.

Readme:

------------------------------------------------------

  Name: MakeStyle
  Copyright: Frank Smit 2008
  Author: Frank Smit
  Date: 30-12-07 16:44
  Description: A tool for style developing in PunBB.
               This tool creates the style files and
               a folder in the img dir.
  License: BSD, see license.txt for the full license

------------------------------------------------------

Note: This tool works only if you have your PunBB installation running local.

- Extract the archive somewhere.

- Open config.ini and congire everything.
  For configuration help read the config-info.txt

- The CSS that the files style.template and style_cs.template contains comes
  into the style you create. style.template stands for *yourstylename*.css
  and style_cs.template for *yourstylename*_cs.css. You can change the css 
  in these files with Notepad or an other texteditor.

Note: All occurences of <stylename> in the style.template and style_cs.template files
      will be replaced by the name you specified.

- Now you can start makestyle.exe and type the name of your new style and press enter.
  MakeStyle then reports wich files/folder it made. Then you can press enter to close MakeStyle
  

Thats it :D

Download:
MakeStyle
MakeStyle sourcecode

61

(3 replies, posted in PunBB 1.2 discussion)

Link big_smile : http://wiki.punres.org/Website_Integration

62

(2 replies, posted in General discussion)

Awesome yikes, here is almost no firework.

But every one happy new year big_smile. About 4 hours it's new year here in the Netherlands.

63

(3 replies, posted in Programming)

Solved I got it working with Dev-c++ now. I found the solution at http://devpaks.org/ , where I downloaded a pack for PCRE.

64

(3 replies, posted in Programming)

I tried to search for it, but I forgot the name tongue. Stupid me. Thanks Elbekko.

65

(3 replies, posted in Programming)

Is there a way to get the preg_replace() function into C++ or some function that has the same effect? I tried to do it with find() and replace(), but it didn't work. I'm just starting with C++ and I can't solve it.

Also if the $cookie_seed in the config is the same of the two forums? I've got some forums running on my laptop (local) and all th forums have the same cookie seed. I'm always logged in at all forums.

This would be a cool mod big_smile. I'm interested.

You can get the MySQL out of the installer and run the MySQL in phpmyadmin.

If this for guest too?  If it's for members you can leave the 'your name' and 'your email' fields, that info can be fetched from the user table, and maybe also leave the captcha.

70

(3 replies, posted in PunBB 1.2 troubleshooting)

Because the left block (avatar and other user info) is bigger than the right block (post message and signature).

Adds a download section to your forum.

This mod only uses the database for the configuration.
All files are fetched from the download folder.

If you uninstall this mod you have to manually remove
the downloads folder.

This mod doesn't have an upload function, because it
was orginally build for big files ( > 20Mb ).

Punres.org topic
Click here to see screenshots and downloads.

There is no language support yet. I'll add it if this mod is usefull to others.

Planned features:
- Download limit for users
- Usergroup access
- Language file support

1.2 is good too, not as good as 1.3, but 1.2 is not bad.

I'll stick with PunBB. One of the reasons is PunBB is easier to style. PhpBB has a load of template files, it would be a pain in the *** to style it. And PunBB gets a cool modding tool big_smile.

A contest would be cool. But if the contest is for 1.3 lots of people can't join the contest, cause I think when 1.3 is released not everyone is going to switch.

A contest for 1.2 sounds ok to me ^^.

I've been working on a filebased download mod, it's almost finished. But when will the mod make tool for 1.3 be released?