OK, I know, this has been discussed earlier...

Searched for "new window", "external links" etc and found things like

Open links in new tab/window

(including my own post on the subject, new-window links in a standards-compliant world wink )

Open links in a new window ("hack")

New Window Links Option for Users (extension)

etc etc

However, what I want to do now is: Open links to other sites in a new window.

1) I know it is the function "handle_url_tag" in /include/parser.php I have to modify, but how?

I want to compare the url to $pun_config['o_base_url'] , and then add the attribute rel="external" if it is an external link. (NB! All urls outside the forum subdomain are considered to be "external", i.e. http://example.com is an external link too, if o_base_url is http://forum.example.com.)

2) To change rel="external" into target="_blank" I use a javascript function.

In what pages do I have to include the .js file containing the script? The js function is needed in viewtopic.php, that is quite obvious, and in edit.php too (preview). Any other places?

Why I use rel="external" + javascript: Because a) I think it is prettier than adding onclick="window.open(this.href); return false;" and b) I want to do more things than just force the link to open in a new tab/window, e.g. add some info to the title attribute etc.

2

(4 replies, posted in Archive)

Orden "Age Turning" måste väl ses i sitt sammanhang; om $lang_calendar['Age'] används som rubrik i en tabell som visar folk som fyller år aktuell dag, dvs är tänkt att utläsas "Age turning... ...33 ...45 ...78" osv, blir väl lämplig svensk rubrik "Fyller idag..."?

3

(11 replies, posted in Archive)

Frank H wrote:

forum är svenska, sedan 1739

Eller tillochmed sedan 1600-talet:
http://g3.spraakdata.gu.se/saob/show.ph … 18483.html

Allt efter Gustav Vasa räknar jag dock som moderna fördärvligheter. wink

Fast istf "moderna" borde jag förstås skriva "sentida"...

4

(3 replies, posted in PunBB 1.2 troubleshooting)

Just wondering; why are html attributes width & height used, and not css properties in a style sheet somewhere?

Update: And I think that vertical-align: text-bottom should be added to that style sheet too.
See http://punbb.org/forums/viewtopic.php?id=9205

5

(3 replies, posted in Archive)

Eller något av förslagen här: http://punbb.org/forums/viewtopic.php?id=6872

6

(21 replies, posted in General discussion)

Rickard wrote:

... a link to a website where I can duplicate the problem?

http://msdn.microsoft.com/library/default.asp wink

7

(21 replies, posted in General discussion)

One weird thing: When used in a frameset, the extension doesn't work, i.e. the menu text is Open "" and a blank page is opened?

8

(6 replies, posted in PunBB 1.2 bug reports)

Glued?

9

(13 replies, posted in Archive)

Ytterligare ett stavfel, i common.php, rad 77, 'Registerad' skall vara 'Registrerad'

Change preg_replace('/[^\w]/'... to preg_replace('/[\W_]/'... ?

11

(2 replies, posted in Archive)

Där det står <pun_title> i /include/template/main.tpl ?

12

(5 replies, posted in PunBB 1.2 troubleshooting)

See this thread: http://punbb.org/forums/viewtopic.php?id=2988#p42596

13

(21 replies, posted in General discussion)

Rickard wrote:

The latest stable 2.4 version of the Linux kernel is 2.4.31.

And the latest (stable?) version of IE is 6.0.2900.2180 ;-)

14

(21 replies, posted in General discussion)

Isn't the number 9 in 1.2.9 the revision number, ie when/if a minor bug is fixed, the next version will be 1.2.10 (not something like 1.2.9 rev5555)?

15

(19 replies, posted in PunBB 1.2 discussion)

No (PHP version 4.4.0)

16

(1 replies, posted in Archive)

1. Om det inte finns något alternativ för detta under Administration gissar jag att du skulle kunna "fuska" genom att byta ut "SELECT u.id, u.username..." i userlist.php till "SELECT u.id, u.realname AS username...". Då visas riktiga namnen istället i listan. Blir väl lite meckigt om du dessutom vill ändra på alla andra ställen username används (tex viewtopic.php etc). Bättre att låta användarnamnet vara lika med det riktiga namnet?

2. Admin -> User groups -> Edit, Set user title == No?

Maybe you will find what you need here: RTL adjusted style sheets

18

(1 replies, posted in PunBB 1.2 discussion)

Am I the only one thinking that something like...

.postmsg IMG {vertical-align: text-bottom;}

...should be added to style/imports/base.css, to make the smileys more "earth-bound"?
(Highlight this text, with a smiley included here: smile , to see what I mean.)

19

(4 replies, posted in Archive)

Om klockan på servern fortfarande går fel, trots påstötningar till webbhost, bör man väl kunna sätta o_server_timezone till ett decimaltal, i stil med 1.166 eller 0.834, för att korrigera 10 minuters avvikelse? Eller så fungerar det inte alls, och någon del av admin-gränssnittet bryter samman helt... hmm Allra bästa lösningen - och egentligen den enda acceptabla - måste ju vara att få serverklockan att gå rätt.

20

(20 replies, posted in General discussion)

I think Crimson Editor has a built-in ftp client.

However, FileZilla is my favourite ftp program.

(I assume you are using Windows)

21

(12 replies, posted in PunBB 1.2 discussion)

Connorhd wrote:

a xhtml valid (well kinda but not really) hack http://punres.org/doku.php?id=how-tos:o … new_window

A better way to open links in new windows: New-Window Links in a Standards-Compliant World

If you want, you can add "anchor.title += ' - External link, opens in a new window';" to the script. You can also add an icon next to the link with "anchor.style.backgroundImage = some url;" (changing the paddingRight or paddingLeft property at the same time is a good idea, otherwise the icon will appear behind the text). If you want to use different icons for different document types (html, pdf, word etc), read the type attribute of the link before inserting the backgroundImage (switch(anchor.getAttribute('type'){ ... }).

22

(11 replies, posted in Archive)

chrizz wrote:

Varför måste man översätta det?

Därför att man är språkpurist, eller rättare sagt språkrensare. En så'n som översätter online till ansluten, forum till tummelplats osv. wink

Någon som har ett förslag för copyright förresten? Förlagsrätt känns lite trubbigt.

Is poster_id set to 1 for each related post when (before?) a user is deleted?

What about an "unmanaged" delete, i.e. if I delete a user through (for example) phpmyadmin? In that case I guess the "left join ... is null" query above will be useful?

24

(11 replies, posted in Archive)

Tror att det lutar åt "Forumskript: PunBB" eller "Körs med hjälp av PunBB"

Not sure if this will work (have no "orphaned" posts in my db)...

To find posts where users don't exist:

SELECT p.id
FROM posts p
LEFT JOIN users u
ON p.poster_id = u.id
WHERE u.id IS NULL

Then set poster_id for these rows to some new user id, etc etc?