Please.. hmm

Frank H, is't possible when the uploaded file is deleted show this somehow in the post? It's hard to explain, but something like this,



When a file still exist it's look just like normal:

http://www.brunna.se/index/img/attach/audio.png Depeche mode - Just Cant Get Enough.mp3, Size: 423 362 bytes, Downloads: 3



When a file is deleted it will look someting like this:

X Depeche mode - Just Cant Get Enough.mp3 (deleted)



Edit: It would be great. Because now when a file is deleted and you cant tell there where a file there previously and the post make no sense. smile

Thanks, but I'm sorry, I explain bad. I don't want thumbnails. I just want the image when it uploads to reduce to size 800*600 or something. smile

The problem is not only that my English sucks but also that I almost know nothing about php. http://www.brunna.se/index/img/smilies/dumbom.gif

Frank H wrote:

but I suppose you can add such code in the same place as above for the thumbnails, but I won't incorporate it smile

I see. smile

Could someone please help me with this? To automatic change the size of images when they are uploaded?

I have removed the info about "Newest user" and "Number of users online" from the bottom, but a big space is left!

How can i make this space disappear?

http://www.brunna.se/bilder/fraga2.png

Code in my viewforum:

// Collect some statistics from the database
$result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
$stats['total_users'] = $db->result($result);

$result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
$stats['last_user'] = $db->fetch_assoc($result);

$result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);

?>
<div id="brdstats" class="block">
    <h2><span><?php echo $lang_index['Board info'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <dl class="conr">
                <dt><strong><?php echo $lang_index['Board stats'] ?></strong></dt>
            </dl>
            <dl class="conl">
<?php

if ($pun_config['o_users_online'] == '1')
{
    // Fetch users online info and generate strings for output
    $num_guests = 0;
    $users = array();
    $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1&&$pun_user_online['user_id'] != 1)
            $users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        else
            ++$num_guests;
    }

    $num_users = count($users);
    
    // users on line today 
    $date = getdate(time());
    $todaystamp = mktime(0,0,0, $date['mon'], $date['mday'], $date['year']);

$result = $db->query("SELECT username, id, last_visit from ".$db->prefix."users WHERE last_visit >= '".$todaystamp."' ORDER by last_visit DESC") or error("Impossible de retrouver la liste des utilisateurs en ligne aujourd'hui", __FILE__, __LINE__, $db->error());

    $users_today = array();
    while ($pun_user_online_today = $db->fetch_assoc($result))
        $users_today[] .=  "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online_today['id'].'" title="Dernière visite de '.$pun_user_online_today['username'].' : '.format_time($pun_user_online_today['last_visit']).'">'.$pun_user_online_today['username'].'</a>';
        
    $num_users_today = count($users_today);

    echo '</dl>'."\n";
    if ($num_users > 0)
        echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.'Online just nu'.': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n";
    else
        echo "\t\t\t".'<div class="clearer"></div>'."\n";

// list users on line today
    echo "\t\t\t".'<dl id="onlinetodaylist">'."\n\t\t\t\t".'<dt><strong>'.'Online idag'.': </strong></dt>';
                
    if ($num_users_today > 0) 
        echo implode(',</dd> ', $users_today).'</dd>'."\n\t\t\t".'</dl>'."\n";
    else
        echo '<dd><em></em></dd>'."\n\t\t\t".'</dl>'."\n";

}
else
    echo "\t\t".'</dl>'."\n\t\t\t".'<div class="clearer"></div>'."\n";


?>
        </div>
    </div>
</div>

Is it possible to automatic change the size of images when they are uploaded?

It would be great!

32

(23 replies, posted in PunBB 1.2 troubleshooting)

Damn it. It didn't work either. Any other ideas?

33

(23 replies, posted in PunBB 1.2 troubleshooting)

The .css file:
http://www.brunna.se/index/style/import … ard_cs.css

I really appreciate your help man!

34

(23 replies, posted in PunBB 1.2 troubleshooting)

It didn't work. http://www.brunna.se/index/img/smilies/grater.gif

35

(23 replies, posted in PunBB 1.2 troubleshooting)

I dont get it. sad

36

(23 replies, posted in PunBB 1.2 troubleshooting)

Strofanto wrote:

If you don't want to do so try adding a vertical-align: bottom; in your .conl (I'm actually not sure if this is gonna work, I don't have the poll mod in any of my boards).

I'm not sure how to change the code?

37

(23 replies, posted in PunBB 1.2 troubleshooting)

You mean somewhere in the base.css?

/****************************************************************/
/* 1. INITIAL SETTINGS */
/****************************************************************/

.pun TABLE, .pun DIV, .pun FORM, .pun P, .pun H1, .pun H2, .pun H3,
.pun H4, .pun PRE, .pun BLOCKQUOTE, .pun UL, .pun OL, .pun LI, .pun DL,
.pun DT, .pun DD, .pun TH, .pun TD, .pun FIELDSET, .pun IMG {
    MARGIN: 0px;
    PADDING: 0px;
    FONT-WEIGHT: normal;
    LIST-STYLE: none;
}

.pun IMG {BORDER: none}

.pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {MARGIN: 0}

/****************************************************************/
/* 2. STRUCTURAL SETTINGS - VERY IMPORTANT - DO NOT CHANGE */
/****************************************************************/

/* 2.1 Clearing floats and invisible items */
.pun .clearer, .pun .nosize {
    HEIGHT: 0;
    WIDTH: 0;
    LINE-HEIGHT: 0;
    FONT-SIZE: 0;
    OVERFLOW: hidden
}

.pun .clearer, .pun .clearb {CLEAR: both}
.pun .nosize {POSITION: absolute; LEFT: -10000px}

/* 2.2 Overflow settings for posts */

DIV.blockpost DIV.box, DIV.postleft, DIV.postsignature, DIV.postmsg {OVERFLOW: hidden}

/****************************************************************/
/* 3. BUG FIXES - VERY IMPORTANT - DO NOT CHANGE */
/****************************************************************/

/* 3.1 This attempts to eliminate rounding errors in Gecko browsers. */

DIV>DIV>DIV.postfootleft, DIV>DIV>DIV.postfootright {PADDING-TOP: 1px; MARGIN-TOP: -1px}

/* 3.2 This is only visible to IE6 Windows and cures various bugs. Do not alter comments */

/* Begin IE6Win Fix \*/
* HTML .inbox, * HTML .inform, * HTML .pun, * HTML .intd, * HTML .tclcon {HEIGHT: 1px}
* HTML .inbox DIV.postmsg {WIDTH: 98%}
/* End of IE6Win Fix */

/* 3.3 This is the equivelant of 3.2 but for IE7. It is visible to other browsers
but does no harm */

/*Begin IE7Win Fix */
.pun, .pun .inbox, .pun .inform, .pun .intd, .pun .tclcon {min-height: 1px}
/* End of IE7Win Fix */

/****************************************************************/
/* 4. HIDDEN ELEMENTS */
/****************************************************************/

/* These are hidden in normal display. Add comments to make them visible */

#brdfooter H2, #brdstats H2, #brdstats .conl DT, #brdstats .conr DT,
#modcontrols DT, #searchlinks DT, DIV.postright H3 {
    POSITION: absolute;
    DISPLAY: block;
    OVERFLOW: hidden;
    WIDTH: 1em;
    LEFT: -999em
}

/****************************************************************/
/* 5. BOX CONTAINERS AND FLOATS */
/****************************************************************/

/* 5.1. Setup all left and right content using floats. */  

.conr {
    FLOAT: right;
    TEXT-ALIGN: right;
    CLEAR: right;
    WIDTH: 40%
}

.conl {
    FLOAT: left;
    WIDTH: 55%;
    OVERFLOW: hidden;
    WHITE-SPACE: nowrap
}

LABEL.conl {
    WIDTH: auto;
    OVERFLOW: visible;
    MARGIN-RIGHT: 10px
}

/* 5.2 Set up page numbering and posts links */

DIV.linkst .conl, DIV.linksb .conl, DIV.postlinksb .conl {WIDTH:18em}

DIV.linkst .conr, DIV.linksb .conr, DIV.postlinksb .conr {WIDTH:16em}

FORM DIV.linksb .conr {WIDTH: 32em}

/* 5.3 Keep breadcrumbs from shifting to the right when wrapping */

.linkst UL, linksb UL, .postlinksb UL {MARGIN-LEFT: 18em}

/* 5.4 Settings for Profile and Admin interface.*/

DIV.block2col {PADDING-BOTTOM: 1px}

DIV.block2col DIV.blockform, DIV.block2col DIV.block, #viewprofile DD {MARGIN-LEFT: 14em}

DIV.blockmenu, #viewprofile DT {
    FLOAT:left;
    WIDTH: 13em
}

#profileavatar IMG {
    FLOAT: right;
    MARGIN-LEFT: 1em
}

#viewprofile DL {FLOAT: left; WIDTH: 100%; OVERFLOW: hidden}

/****************************************************************/
/* 6. TABLE SETUP */
/****************************************************************/

/* 6.1 Table Basic Setup */

.pun TABLE {WIDTH: 100%}

/* 6.2 Fixed Table Setup */

#punindex TABLE, #vf TABLE {TABLE-LAYOUT: fixed}

.tcl {TEXT-ALIGN: left; WIDTH: 50%}

.tc2, .tc3, .tcmod {WIDTH: 9%; TEXT-ALIGN: center}

.tcr {WIDTH: 32%; TEXT-ALIGN: left}

#punsearch #vf .tcl, #punmoderate #vf .tcl {WIDTH: 41%}

#punsearch #vf .tc2 {WIDTH: 18%; TEXT-ALIGN: left}

.tcl, .tcr {OVERFLOW: HIDDEN}

/* 6.3 Other Table Setup */

#users1 .tcl {WIDTH: 40%}

#users1 .tcr {WIDTH: 25%}

#users1 .tc2 {WIDTH: 25%; TEXT-ALIGN: left}

#users1 .tc3 {WIDTH: 10%; TEXT-ALIGN: center}

#debug .tcr {WIDTH: 85%; WHITE-SPACE: normal}

#punindex TD.tcr SPAN.byuser {DISPLAY: block}

/****************************************************************/
/* 7. VIEWTOPIC SETUP */
/****************************************************************/

/* 7.1 This is the basic structure. */

DIV.postleft, DIV.postfootleft {
    FLOAT:left;
    WIDTH: 18em;
    OVERFLOW: hidden
}
    
DIV.postright, DIV.postfootright {
    BORDER-LEFT-WIDTH: 18em;
    BORDER-LEFT-STYLE: solid
}

DIV.postfootright, P.multidelete {TEXT-ALIGN: right}

DIV.blockpost>DIV>DIV.inbox {PADDING-BOTTOM: 1px}

/* 7.3 This is the div which actually contains the post and is inside .postright */

DIV.postmsg {WIDTH:100%}

/* 7.4 These items control overflow and scrolling within posts. */

DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden}
DIV.scrollbox {WIDTH: 100%; OVERFLOW: auto}
IMG.postimg {max-width: 100%}
A .postimg {max-width: 100%}

/* 7.5 Turn off the poster information column for preview */

#postpreview DIV.postright {BORDER-LEFT: none}

/* 7.6 Create the horizontal line above signatures */

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    WIDTH: 200px;
    TEXT-ALIGN: left;
    HEIGHT: 1px;
    BORDER:none
}

/* 7.7 Maximum height for search results as posts. Position go to post link */

DIV.searchposts DIV.postmsg {HEIGHT: 8em}
DIV.searchposts DD P {PADDING-TOP: 3em}

/* 7.8 Class for bbcode [u] */

SPAN.bbu {TEXT-DECORATION: underline}

/****************************************************************/
/* 8. LISTS SPECIAL SETTINGS */
/****************************************************************/

/* 8.1 Horizontal display of online list, main navigation menu and breadcrumbs */

    #onlinelist DD, #onlinelist DT, #onlinetodaylist DD, #onlinetodaylist DT,
    #brdmenu LI, DIV.linkst LI, DIV.linksb LI, DIV.postlinksb LI,
    DIV.postfootright LI, UL.bblinks LI {
        DISPLAY: inline;
        HEIGHT: 0
}

/* 8.2 Turn on square icon for posterror list */

#posterror UL LI {LIST-STYLE: square inside}

/* 8.3 Right alignment of descriptions in ordinary member view of other members profiles */

#viewprofile DT {TEXT-ALIGN: right}

/****************************************************************/
/* 9. FORM SETTINGS */
/****************************************************************/

/* 9.1 Makes textareas and long text inputs shrink with page */

DIV.txtarea {WIDTH: 75%}

DIV.txtarea TEXTAREA, INPUT.longinput {WIDTH: 100%}

.pun LABEL {DISPLAY: block}

#qjump SELECT {WIDTH: 50%}

/****************************************************************/
/* 10. HELP FILES AND MISC. */
/****************************************************************/

/* 10.1 Put some space between sections of the help file */

#helpfile H2 {MARGIN-TOP: 12px}

/* 10.2 Internal padding */

#helpfile DIV.box {PADDING: 10px}

/* 10.3 Other templates */

#punredirect DIV.block, #punmaint DIV.block {MARGIN: 50px 20% 12px 20%}

38

(23 replies, posted in PunBB 1.2 troubleshooting)

Sorry, i mean move down. http://www.brunna.se/index/img/smilies/rodnar.gif

39

(23 replies, posted in PunBB 1.2 troubleshooting)

Allright, thanks!

Another question: In viewforum.php, how can i make the pages info (marked in red) move down a line.

http://www.brunna.se/bilder/fraga.png

// Generate paging 
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewforum.php?id='.$id);

40

(23 replies, posted in PunBB 1.2 troubleshooting)

Thanks!

But i did it like this:

$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
require PUN_ROOT.'header.php';

if (!$pun_user['is_guest'])
{
    header("Location: viewforum.php?id=1");
}
else 
{
    header("Location: login.php");

}
require PUN_ROOT.'footer.php';

define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

41

(23 replies, posted in PunBB 1.2 troubleshooting)

But now if some one is logged out and visits index.php they get a "Bad request"-message. (Guests have no permissions to read the board)

If I want them to be redirected to login.php, how can I do that?

42

(23 replies, posted in PunBB 1.2 troubleshooting)

Thanks! smile

43

(23 replies, posted in PunBB 1.2 troubleshooting)

How can I make my index, look like this?

http://enhjulingsfolket.se/viewforum.php?id=2

Thanks! smile

Really great mod!

But I want the images to be displayed inline at some max resolution (for example 800x600) and the php thumb stuff to be removed. And by clicking on the pictures in the thread you should be redirected directly to their path (for example www:forum.com/uploads/example_picutre.jpg).

Can anyone help me achieving this?

For now I have installed your mod according to the instruction and it works fine!
My knowledge about php is very small and that is why I'm asking for help.

I would be mostly grateful!

Frank H wrote:

FredrikK: Your email bounce, but I saw that you had solved it by yourself.

Well, not really. smile

Now i get this message when I trying to upload a .txt-file:

An error was encountered
Error: Unable to move file from: /tmp/phpv4Nscc to /customers/brunna.se/brunna.se/httpd.www/forum/attachments/9eea88ac6e1a8fd7730b777b3fe9f99c/3ef4b1a12400d4f50b7480e2c3d55aa7.attach.

But when I try to uploade a gif, jpg or any other file everything loads perfectly without any errors and the post is made, but the file isn't uploaded. hmm

File: /customers/brunna.se/brunna.se/httpd.www/forum/install_mod.php
Line: 114

PunBB reported: Unable to create new subfolder with name '/attachments/dd0f394a40a4598b317405930dae3c4b' with mode 0750

Please help. sad

47

(62 replies, posted in News)

Toppen! http://www.brunna.se/forum/img/smilies/buga.gif

48

(52 replies, posted in PunBB 1.2 discussion)

A few new ones:

Pissed off: http://www.brunna.se/forum/img/smilies/skitarg.gif
Proud: http://www.brunna.se/forum/img/smilies/stolt.gif

...and some more with help from the great nation of France:

Surprised: http://www.brunna.se/forum/img/smilies/va.gif
Satisfied: http://www.brunna.se/forum/img/smilies/tillfreds.gif
"Huh?": http://www.brunna.se/forum/img/smilies/huh.gif

49

(3 replies, posted in Archive)

Bra fråga! smile

50

(6 replies, posted in PunBB 1.2 discussion)

Where do I find this "online table"?