Updated to the version 2.0.0 :-)

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

***Please read the IMPORTANT! instructions in the readme***

Download:
http://www.punres.org/files.php?pid=444

Changelog:

- version 2.0.0
changes to MOD:
-- all your domain links will be not opened in new windows
new:
-- little image next to new window links
-- also homepages of users and punBB.org link will be opened in new windows
changes to punBB:
-- long urls will be truncated if > 70 chars instead of 55
-- transitional doctype (because of target attribute)

52

(23 replies, posted in Programming)

MattF wrote:

If you are going to open links in new tabs/windows however, I would suggest using the title= part to list that fact in the <a tag/link. At least people will be advised when they hover over the link, that way.

It's a good idea :-) But I think it's more visible a " (New Window)" at the end of the displayed text of the link ;-)

CodeXP wrote:

Heh, I use a UserJS script in Opera to remove target=whatever from links.
[...]
Using the javascript method mentioned in this thread is a better option than using the target attribute though, as you could just disable javascript for a specific site instead of being left with no alternative other than rewriting the pages client-side...

With UserJs or GreaseMonkey (for Firefox) you can do it easily also for target="_blank" ;-) :

http://developer.mozilla.org/en/docs/DO … tAttribute
http://developer.mozilla.org/en/docs/DO … eAttribute

CodeXP wrote:

I absolutely hate it when websites tries to force me to open a link in a new tab/window.

Also me sometimes, I admit. But I must say as user I found very useful to open external links in new tabs. This is because it's more simple to have 4-5 tabs, without having to surf in the "back" menu. Furthermore in this way I could allow the memory cache of Firefox only for one previous opened page ;-)

CodeXP wrote:

if people are forgetting your site just because they didn't open a link in a new window, then your problem is the content and not the links.

No problem, my not yet existing forum will be full of sexy women ^_________^

53

(23 replies, posted in Programming)

in english:

It'is for visibility. Users than follows an external link could forget the original site! It sounds stupid, but very much people do "zapping" on internet. Furthermore very much people doesn't know what really means "internet"... just imagine how "pretty easy" is open links in a new window!

Unluckily this could cause some statistical problems, because the time on the forum could result very much higher than the real one. But I don't think it's a crucial problem ^___^''

in italian:

e' una questione di visibilita'. Gli utenti che vanno su un sito esterno possono dimenticarsi del sito originale! Sembra una stupidaggine, ma ci sono un sacco di persone che fanno "zapping" tra i siti internet. Tra l'altro, molti non sanno neanche che significhi esattamente "internet" o "browser", pensa quanto dev'essere semplice aprire un link in una nuova finestra per loro! :-P

Purtroppo un sito che funziona in questo modo puo' scombinare le statistiche del sito stesso, perche' risulterebbe che la permanenza media sul forum e' molto piu' lunga di quanto non sia in realta'. Comunque non mi pare un contro assurdo ^___^

This is the more light WYSIWYG editor for PunBB I found for now :-)

Anyway there's very much problems:

- the html code is very outdated ;-)

- "Select Color" does not work with Firefox 2.0 and IE6

- "Styles" if clicked shows the menu for a moment, then disappear, on Firefox 2.0 . I must hold the button.
   On IE6 there's no problem

- popup windows for url and img is a very slow solution

I hope these problems will be corrected :-)

55

(23 replies, posted in Programming)

Actually I don't think I can use target as an attribute, and certainly IE6 can't interpret it.

When xhtml 2.0 will be interpreted by 99% of browsers (as xhtml 1.0 I think), I'll use target as attribute. Actually, I prefer to do a little incorrectness instead of using JS rubbish :-P

56

(23 replies, posted in Programming)

It will be on xhtml 2.0 . Furthermore, if I can do something without Javascript, I fell more happy ^____^

PS: please post any question on the proper thread, I wouldn't split the discussion :-)

http://punbb.org/forums/viewtopic.php?p … 32#p101432

Download:
http://www.punres.org/files.php?pid=444

Description:
With this MOD, a link posted in the forum will be opened in a new window if clicked, but only if it points outside the forum.

Tested on PunBB 1.2.15 and PunBB 1.2.17

Changelog:

- version 2.0.0
changes to MOD:
-- all your domain links will be not opened in new windows
new:
-- little image next to new window links
-- also homepages of users and punBB.org link will be opened in new windows
changes to punBB:
-- long urls will be truncated if > 70 chars instead of 55
-- transitional doctype (because of target attribute)

#####################################################################################
##
##        Mod title:  External links in new windows
## 
##     Document aim:  Instructions for a FRESH INSTALL of this Mod 
##                    (there's no previous versions already installed)
##                    For update instructions, look in "update" dir of Mod package.
##
##      Mod version:  2.0.0
##   Works on PunBB:  1.2.15
##     Release date:  2007-10-08
##           Author:  Lucas Malor ( http://pazziaumana.blogspot.com/ )
##
##      Description:  With this MOD, a link posted in the forum will be opened in a
##                    new window if clicked, but only if it points outside the forum.
## 
##   Affected files:  include/parser.php
##   Included files:  upload/*
##
##       Affects DB:  No
##
##            Notes:  preg_xquote() function from a comment on php.net:
##                    http://php.net/manual/function.preg-quote.php#38519
##                    Thanks to MattF for the idea to pick out new window links.
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
#####################################################################################

Download:
http://www.punres.org/files.php?pid=444

58

(23 replies, posted in Programming)

Thanks :-)

If someone is interested in my MOD, here is:

http://punbb.org/forums/viewtopic.php?p … 32#p101432

59

(23 replies, posted in Programming)

Which is the php variable in punBB that contains the base forum url?

I want to use it in parser.php to add ' target="blank" ' for external links.

This MOD is very interesting... but for my forum I would only some very simple tags, as B, U, I, URL, IMG, COLOR, CODE, QUOTE, LIST, S, CENTER, SIZE.

If I'll install your MOD, I can disable unwanted tags in admin panel, or I must remove some parts of the code?

Only two little problems:

- the post is submitted also if the attached file is not uploaded because not allowed, and no alert message is displayed

- if an attachment is deleted, remains a 0 byte file, also if orphans are deleted and tables are cleaned with the plugin tools

62

(14 replies, posted in PunBB 1.2 discussion)

Mah, your choice........

63

(14 replies, posted in PunBB 1.2 discussion)

I report also I tried to post a quote with another quote and a code nested in it, and the forum returns me error 500:

http://lucasmalor.altervista.org/php5/f … c.php?id=1

64

(14 replies, posted in PunBB 1.2 discussion)

Well, I installed it. I think we could call it a pre-alpha ;-)

The work is very good. I want only to report some problems I encountered:

- The redirect page overflows a bit (I tested it with an 800x600 resolution)

- there's not a way to disable the online status indicator?

- In the new admin panel there's two new options:

[x] Show poster location, register date, post count, e-mail and URL in posts.

[x] Show user post count in posts, profile and userlist.

It's not a bit confusing? I think it's better and more customizable to do something like this:

Show these profile info in posts:
 [x] Location
 [x] Register date
 [x] Post count
 [x] E-mail
 [x] Website

[_] Show post count nowhere

PS: despite the fact all styles are in list, only Oxygen works. It's because the other styles are not already coded, or not?

65

(14 replies, posted in PunBB 1.2 discussion)

Mmmmmmmhhhh...... Alpha? Nightly? What is it??? :-P

66

(14 replies, posted in PunBB 1.2 discussion)

You can view it and download it as zip at the development section:

http://dev.punbb.org/browser/branches/punbb-1.3-dev

I think it could be "publicized" a little more :-) Many test users could return more feedback, as other opensource projects (I'm thinking about Firefox)

67

(14 replies, posted in PunBB 1.2 discussion)

Tobi wrote:

Therefore I more or less stopped developing plugins for 1.2, which turned out to be a mistake.... wink

Your Ajax plugins? I found them very useful, it's a pity. I'll try anyway to install them.

Anyway, I think I can't wait. I'll try to install the beta 1.3 :-)

Excuse me, the last two questions: it's planned also a list of subscribed topics in control panel, and a default name for guests?

PS: do you suggest me to wait the release of PunBB 1.3 , or to apply the MODs for the moment?

Thanks for all :-)

Lucas Malor wrote:

Another question, it's planned (or exists a mod that do) the upload of an avatar from an url and not from locale?

Mhhh.... Nothing? I would know the same thing also for SIZE, LIST and CENTER bbcodes... someone knows something about? :-)

71

(0 replies, posted in PunBB 1.2 discussion)

I've tested some little modifies in punBB css in order to improve the legibility also for low screen resolution.

I simply: 1) added an horizontal scroll at the end of a quote or a message, if the contents is a long string without spaces (as an url), 2) extended the beginning line of a signature to 100% , 3) put the number of lines in the signature editing <textarea > to the max numbers of lines allowed.


In include/parser.php:

replace:

        $text = str_replace('[quote]', '</p><blockquote><div class="incqbox"><p>', $text);
        $text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(array(\'[\', \'\\"\'), array(\'[\', \'"\'), \'$2\')." ".$lang_common[\'wrote\'].":</h4><p>"', $text);
        $text = preg_replace('#\[\/quote\]\s*#', '</p></div></blockquote><p>', $text);

with:

        $text = str_replace('[quote]', '</p><blockquote><div class="incqbox"><p><div class="quotecontents">', $text);
        $text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(array(\'[\', \'\\"\'), array(\'[\', \'"\'), \'$2\')." ".$lang_common[\'wrote\'].":</h4><p><div class=\"quotecontents\">"', $text);
        $text = preg_replace('#\[\/quote\]\s*#', '</div></p></div></blockquote><p>', $text);

In profile.php :

replace:

<textarea name="signature" rows="4" cols="65"><?php echo pun_htmlspecialchars($user['signature']) ?></textarea><br /></label>

with:

<textarea name="signature" rows="<?php if ($pun_config['p_sig_lines'] !== '0') {echo $pun_config['p_sig_lines'];} else {echo '4';} ?>" cols="65"><?php echo pun_htmlspecialchars($user['signature']) ?></textarea><br /></label>

In style/imports/base.css :

replace:

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

with:

DIV.blockpost DIV.box, DIV.postleft {OVERFLOW: hidden}
div.postsignature, div.postmsg { overflow: auto; }
div.postsignature { padding-bottom: 4px; }

replace:

DIV.postmsg {WIDTH:100%}

with:

div.postmsg { width:100%; padding-bottom: 4px; }

after:

DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden}

add:

div.quotecontents { overflow: auto; padding-bottom: 4px; }

replace:

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    WIDTH: 200px;

with:

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    width: 100%;

72

(14 replies, posted in PunBB 1.2 discussion)

Smartys wrote:

3. Is useless if adapted on a wider scale, since the hash can be precalculated by the bot.

This is a good remark.... I have a little idea:

instead of using an MD5 hash, you could use MD4, MD5, RIPEMD, SHA-0, SHA-1, RIPEMD-160, RadioGatún etc... and the hash function used by forum is choosed randomly by server every X hours, or (better) after every access to register.php

What do you think about?

73

(14 replies, posted in PunBB 1.2 discussion)

I don't know if these MODs are also discussed, or them behaviours are planned to be integrated in a future. Anyway, I'll signal them, because I think they could be quite useful. I hope to have some feedback :-)

1) MySQL Full Text Search:

http://www.punres.org/viewtopic.php?id=1677

The creator assures the indexing method for searches is faster and more accurate.

2) PunRewrite:

http://www.punres.org/viewtopic.php?id=836

The creator assures the mod improves the rank of the forum in search engines.

3) Unique Registrtion Hash:

http://www.punres.org/viewtopic.php?id=3870

The registration link is unique for each visitor, to avoid spam bots.

Smartys wrote:

3. Again, 1.3 has that option

Good, I'll certainly upgrade :-)

I hope the "automod" tool is locale and not online... I remember bad experience of slowness with phpBB, modding something with its bad tool... :-(

Another question, it's planned (or exists a mod that do) the upload of an avatar from an url and not from locale?

For the cookie, I think I'll put the hands in the code if I'll have time, because I don't like this solution... :-/

The Wicked Flea wrote:

there are no cookie settings a user can change in their profile.

You are wrong, the option is "Save username and password between visits" :-)

Furthermore, I noticed I can't login without enabling cookies. This could be a problem, because very much people block all cookies :-/

( PS: for the point 3? There's not a way to enable/disable per-user auto-subscription? )