NightFalcon wrote:

Did you guys go to the forum permissions and enabled image uploads? By default they won't be allowed for users. Go to Administration -> Forums -> Edit (Next to one of the forums you want users to upload to) -> And Enable Image Upload for groups that need it.

Shame on me ... indeed it's better I thought ... very perfect.

Other users don't have the option to upload images. It seems to be only working for me as the admin. Any ideas? OR is it supposed to only work for admins?

Same problem for me !! Or I think this option is interesting for USER : because a webmaster knows, in theory, the power of FTP (et doesn't really need to upload pics by this way)

OK smile I give you a little tutorial smile

so ... instead of <table> .... you begin by <div class="thumbs">

and instead of using <td> ... </td> you use only <a href=" "><img src=" " /></a>

</div>

As you can see ... you win in quality of code smile (no ? smile)


So in CSS ...

.thumbs a {
width : 50px; >> control of the width of your thumb
height : 50px; >> control of the height of layer
overflow : hidden; >> no scroll
float : left; >> to "simulate" a row
border : 3px solid #000; >> gadget
margin : 3px; >> gadget smile
}
.thumbs a:hover {
border : 3px solid #C23000;
}

.thumb a img {
margin-top : -15px;
margin-left : -20px;
border : 0;
}

Using this technique, I have "cropped" my pics without using GD or ImageMagick smile and it's floated ...

Result : your code is very clean and respect the "spirit" of the viewtopic.php (no tables)

smile

NightFalcon wrote:
Rod wrote:

Because with tables, the only choice you have is to insert rows * cols

I don't see a problem with that... Your monitor is made up of rows and columns, but you don't seem to be complaining there wink

ggrrrrrrrrrr smile

the problem is the "non control" by css : I remember you TABLES are only used for TABULAR DATAS in xhtml smile or ... punBB is xhtml compliant smile

Because with tables, the only choice you have is to insert rows * cols

or with a css structures, you don't need this smile

About Point 2 : if a pic is bigger, it's not scaled : or in the whole forum, the pic, if bigger, is scaled smile

I'm in France, about 15 sec to load (8mb/s) smile

I think the Upload image created by NightFalcon http://punbb.org/forums/viewtopic.php?id=8829 is perfect for this sort of posts smile

I see where is the "bad" code smile

image_upload.php

$output[] = "\t\t\t\t\t\t\t<table cellspacing='0' cellpadding='0' border='0' style='margin-top: 15px; margin-bottom: 15px'>";

    while ($idx < $image_count) {

        $output[] = "\t\t\t\t\t\t\t\t<tr>";

        for ($col = 0; $col < $max_cols; $col++, $idx++) {
            $output[] = "\t\t\t\t\t\t\t\t\t<td align='center' valign='top' width='$cell_width%' style='border: none; padding: 0px'>";

            if ($idx < $image_count) {

                $output[] = "\t\t\t\t\t\t\t\t\t\t<table cellspacing='0' cellpadding='0' border='0' width='$cell_width%'>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t\t<tr>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t<td align='center' valign='middle' width='$cell_width%' height='$cell_height' style='border: none; padding: 0px'>";

                $url_name = urlencode($images[$idx]);

                if (!$edit)
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='postgallery.php?pid=$pid&filename=$url_name&tid=$tid'>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src='showimage.php?pid=$pid&filename=$url_name&preview=true' />";
                if (!$edit)
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t</a>";

                if ($edit) {
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t</td>";
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t</tr>";
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t<tr>";
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t<td align='center' valign='bottom' width='$cell_width%' style='border: none; padding: 0px'>";
                    $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t<label><input type='checkbox' name='delete_image[]' value='".urlencode($images[$idx])."'> Delete</label>";
                }

                $output[] = "\t\t\t\t\t\t\t\t\t\t\t\t</td>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t\t</tr>";
                $output[] = "\t\t\t\t\t\t\t\t\t\t</table>";

            } else {
                $output[] = "\t\t\t\t\t\t\t\t\t\t ";
            }

            $output[] = "\t\t\t\t\t\t\t\t\t</td>";
        }

        $output[] = "\t\t\t\t\t\t\t\t</tr>";
    }

    $output[] = "\t\t\t\t\t\t\t</table>";
    $output[] = "\t\t\t\t\t\t</fieldset>";
    $output[] = "\t\t\t\t\t\t<br />";
    $output[] = "\t\t\t\t\t</div>";

    echo implode("\n", $output);

}

OK I have installed it ... so smile ...

http://www.sortons.net/forum/viewtopic.php?id=5008

1. NO TABLES !!! smile it's quite simple to use instead

<div class="thumbs">
<a href="urlofthepic.php"><img src="thumb.jpg" /></a>
<a href="urlofthepic.php"><img src="thumb.jpg" /></a>
<a href="urlofthepic.php"><img src="thumb.jpg" /></a>
<a href="urlofthepic.php"><img src="thumb.jpg" /></a>
<a href="urlofthepic.php"><img src="thumb.jpg" /></a>
</div>

And play with the CSS to float or not, to crop (with css) the pic or not ... it would be great appreciated smile

2. The resize of the pic doesn't work when you click on the pic ...

3. Have the possibility to add pics inside "Quick Answer Box"

NightFalcon wrote:

Rod: it's certainly possible for me to do that, but there is a problem with such approach - when dealing with large photos, or photos of variable size, it becomes very difficult to fit it with the content and still have the whole thing look good. I'll have to think about this one and the best way to implement it. I'm thinking if I have some kind of a pop-up on mouseover event using layers, or something to that sort, it might work, but I'll have to play around with it to figure out the best way. Also there's the issue of loading the images - some poor soul on 56K places his cursor over an image while viewing a thread, and there goes his bandwidth. We'll see... If I find a good way to implement this, I will.

I'm ok with you of certain points ... but it would be great webmaster STOP to think 56k, stop to think Netscape 4, stop to think IE 4 ... the future is IN FRONT OF US smile not behind.

thanx to consider my view.

So here's my request ... and I think it's possible to you to do this smile ... I'm fed up with all system galleries where you "leave" the page to see a pic. So go to http://www.sortons.net/test-nucleus.html and see at the left of the pic : 100% dom, very degradable system (if people have no JS, it links to the pics without errors).

The advantage ??? you DON'T LEAVE the post you read. Hoping this idea pleases you smile

Dumb I am ... but is it possible to have SIMPLY a modified externnews.php to Copy / Paste with all the present features inside this thread ? smile

87

(20 replies, posted in PunBB 1.2 show off)

It proves TABLE HAVE TO DISAPPEAR smile

Ohhhh yes !!!! Very good !!! smile I try tomorrow smile Love the possibility to have several pics on a same pic smile only one thing : I'll post a hack here to call pic inside a layer (dhtml) : better and more beautiful smile

Very good !!!! smile top the would be to add the avatar (in my case, I would like to use this extension for my editos, and we are several to post)

90

(3 replies, posted in General discussion)

Why do you want to have a menu inside an iframe ?

Ok smile I listen your question, even if when reading again my post, it was simple to realize smile So .. ?

OK .... so .... I see you like options smile

1. open parser.php


2. after

    '#\[email\](.*?)\[/email\]#',
    '#\[email=(.*?)\](.*?)\[/email\]#',

Add

    '#\[player=(.*?)\](.*?)\[/player\]#',

3. Find

    '<a href="mailto:$1">$1</a>',
    '<a href="mailto:$1">$2</a>',

Add after

'<OBJECT ID="mediaPlayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject"><PARAM NAME="fileName" VALUE="http://msdn.microsoft.com/downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/Buttons/control.asx"><PARAM NAME="animationatStart" VALUE="true"><PARAM NAME="transparentatStart" VALUE="true"><PARAM NAME="autoStart" VALUE="true"><PARAM NAME="showControls" VALUE="true"></OBJECT>',

BUT BUT BUT ...

As I don't see the code to put the value of the url of media ... can do nomore.

93

(18 replies, posted in Feature requests)

StevenBullen wrote:
Rod wrote:

I win about between 200 & 300$ per month with Google and they paid at the end of the month. Any problem.

Sorry...Being stupid here... but 'WIN'... what do you mean win?


I can understand why some would have Google Ads... but personally I would rather not have them, any site is so much cleaner without them.

when you pay a dedicated server, God and preaches are not enough to send money to your webhost smile

hum smile but I don't see the difference : people with my mod can "press / pause / play" : it's not a popup, but a dhtml layer. Now you can by playing with parser.php do appear directly the player inside your thread : but warning it becomes easy for the final user.

95

(18 replies, posted in Feature requests)

I win about between 200 & 300$ per month with Google and they paid at the end of the month. Any problem.

In same time, we speak about a forum, and not a blog or another page of a site. I don't think 2 br inside a post in the end of the world. Pun is very far of the other bbs about the quality of its markup.

However, I use a plugin under NUCLEUS which accompishes very well the "smart paragraphs" : maybe it can help you.

<?

// plugin needs to work on Nucleus versions <=2.0 as well
if (!function_exists('sql_table'))
{
    function sql_table($name) {
        return 'nucleus_' . $name;
    }
}
class NP_SmartParagraphs extends NucleusPlugin {
function getName() { return 'SmartParagraphs'; }
function getAuthor() { return 'Traweb'; }
function getURL() { return 'http://www.traweb.com/extra/nucleusplugin/'; }
function getVersion() { return '1.5.1'; }
function getDescription() {
    return 'This plugin will convert line breaks and paragraphs in your entries, by adding the corresponding markup tags to produce valid HTML or XHTML. It is smart enough not to insert these tags in places where they may conflict with block elements and other HTML markup tags you may already be using in your posts. Basically, this is a more powerful line break converter than the default one embedded in Nucleus. It is now based entirely on the autop script by Matthew Mullenweg - see at see at http://photomatt.net/scripts/autop.';
}

function supportsFeature($feature) {
    switch($feature) {
        case 'SqlTablePrefix': return 1;
        default: return 0;
    }
}

function getEventList() {
return array('PreItem','PrepareItemForEdit');
}

function event_PreItem($data) {
$this->doSmartParagraphs($data['item']->body);
$this->doSmartParagraphs($data['item']->more);
}

// remove before editing if auto convert breaks had been enabled
function event_PrepareItemForEdit($data) {
$this->undoSmartParagraphs($data['item']->body);
$this->undoSmartParagraphs($data['item']->more);
}

function autop(&$pee, $br=1) {

$pee = $pee . "\n"; // just to make things a little easier, pad the end
$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
$pee = preg_replace('!(<(?:table|ul|ol|li|pre|form|blockquote|h[1-6])[^>]*>)!', "\n$1", $pee); // Space things out a little
$pee = preg_replace('!(</(?:table|ul|ol|li|pre|form|blockquote|h[1-6])>)!', "$1\n", $pee); // Space things out a little
$pee = preg_replace("/(\r\n|\r)/", "\n", $pee); // cross-platform newlines
$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "\t<p>$1</p>\n", $pee); // make paragraphs, including one at the end
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
$pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists
$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
$pee = preg_replace('!<p>\s*(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)!', "$1", $pee);
$pee = preg_replace('!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*</p>!', "$1", $pee);
if ($br) $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks
$pee = preg_replace('!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee);
$pee = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $pee);
$pee = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $pee);

}

function doSmartParagraphs(&$data) {
$this->autop($data);
}

function undoSmartParagraphs(&$data) {

$data = str_replace("<p>",'',$data);
$data = str_replace("</p>\n\n","\n\n",$data);
$data = str_replace("<br />\n","\n",$data);
}

}
?>

Tobi wrote:

Well,
although it is really unpolite to laugh at somebody who made an effort to help out others  I agree that this doesn't look user friendly at all.

But then again, if people want it like this, why not?
People want Windows, you know... smile

Windows is more friendly than Linux smile even if Linux is powerful. People don't want necessary the best thing, but the easiest thing : and coders have to think about that.

AHHAHAHAHA smile

and you say TEXTILE IS EASIER FOR FINAL USER ??? Let me laugh very high.

It's simplier for a final user to learn directly CSS / XHTML than textile ... waouh : never textile please Rickard.

http://www.sortons.net/forum/viewtopic. … 89#p101489

like this ?

Example I would like smile
http://www.seinemaritime.net/publicatio … ritime.php

You define categories and under each of them ... you have the PDF smile As you can see it's a new request, in fact smile So I stop to spam this thread.