PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2005-04-05 19:08:08

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

New Window Links Option for Users 1.0

Code:

##
##
##        Mod title:  New Window Links Option for Users
##
##      Mod version:  1.0
##   WOrks on PunBB:  1.2.*
##     Release date:  2005-02-20
##           Author:  Michael Lanman (justgiz@justgizzmo.com)
##
##      Description:  This will add a new option for users. Will links in
##                    posts be parsed to open in a new window or not?
##
##   Affected files:  profile.php
##                    parser.php
##                    lang/profile.php
##
##       Affects DB:  Yes
##
##             Note:  When adding to the end of the language file, make sure
##                    the previous line has a comma(,) at the end of it.
##
##       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 here


Gizzmo

Offline

 

#2 2005-09-05 00:25:26

x1zt
New member
Registered: 2005-09-04
Posts: 2

Re: New Window Links Option for Users 1.0

Is it possible to add so users can choose internal forumlinks in same window, external links in a new window?

Offline

 

#3 2005-09-05 04:04:19

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

not with this mod, this mod opens EVERY link made in posts in a new window or not


Gizzmo

Offline

 

#4 2005-09-05 18:42:23

x1zt
New member
Registered: 2005-09-04
Posts: 2

Re: New Window Links Option for Users 1.0

I know, just wanted to know if there is a possibility that you will add this feature.

Offline

 

#5 2005-09-14 22:45:44

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

to get only external links to open in new windows. change the $target varible to this:

Code:

$target = ($pun_user['new_window_link']=='1')? (!strstr($full_url, $pun_config['o_base_url']))? ' onclick="window.open(this.href); return false;"' :NULL : NULL;

i havent tested it hard but im sure it will work


Gizzmo

Offline

 

#6 2005-09-21 00:09:45

-J-
Member
Registered: 2005-05-24
Posts: 27

Re: New Window Links Option for Users 1.0

Is this plugin working with punBB 1.2.7 ?

Offline

 

#7 2005-09-21 03:04:55

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

1) its not a plugin, 2) yes it works for 1.2.7 just update the install file


Gizzmo

Offline

 

#8 2005-09-21 12:20:05

-J-
Member
Registered: 2005-05-24
Posts: 27

Re: New Window Links Option for Users 1.0

Thanks for developping such a usefull mod smile

Offline

 

#9 2005-09-24 00:57:22

qman
New member
Registered: 2005-08-22
Posts: 7

Re: New Window Links Option for Users 1.0

How to enhance this to work on the Website link underneath the avatar? Thank you.

Offline

 

#10 2005-09-26 13:40:09

-J-
Member
Registered: 2005-05-24
Posts: 27

Re: New Window Links Option for Users 1.0

Hi Gizzmo,

is there a way to open all links in a new window by default (for a new user)?
Thanks

J

Offline

 

#11 2005-09-27 11:34:43

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

just change the default value from 0 to 1 in the SQL database


Gizzmo

Offline

 

#12 2005-09-27 11:51:43

-J-
Member
Registered: 2005-05-24
Posts: 27

Re: New Window Links Option for Users 1.0

Fantastic thanks!

Offline

 

#13 2005-11-07 19:50:53

bjebb
New member
Registered: 2005-11-07
Posts: 1

Re: New Window Links Option for Users 1.0

Parse error: parse error, unexpected T_STRING, expecting ')' in <forumpath>/install_mod.php on line 19

What might be wrong?

Offline

 

#14 2005-11-08 02:16:49

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

did you happen to edit the install_mod.php file, like to edit the version number so you can install on the new version?


Gizzmo

Offline

 

#15 2005-11-09 11:27:01

Panda
Member
From: Lithuania
Registered: 2005-11-09
Posts: 17

Re: New Window Links Option for Users 1.0

Hi. Thank you for really useful mod.
I installed this mod, but now near some topics there appeared little dots. What that could be?

Offline

 

#16 2005-11-09 11:44:41

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

thoes little dots mean you have posted in the topic before, and its not a result of this mod.


Gizzmo

Offline

 

#17 2005-11-09 12:45:04

Panda
Member
From: Lithuania
Registered: 2005-11-09
Posts: 17

Re: New Window Links Option for Users 1.0

Thanks for an answer. It's just - they appeared after this mod's instalation. Maybe I didn't upgrade something... big_smile

Offline

 

#18 2005-11-10 02:10:56

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: New Window Links Option for Users 1.0

you probly changed it in the admin options and just forgot you did it


Gizzmo

Offline

 

#19 2005-12-06 13:48:04

Panda
Member
From: Lithuania
Registered: 2005-11-09
Posts: 17

Re: New Window Links Option for Users 1.0

Shit - I upgraded forum to 1.2.10 and it doesn't support this mod sad

Offline

 

#20 2005-12-06 14:23:51

Mark
Moderator
From: North West England
Registered: 2005-06-06
Posts: 1165

Re: New Window Links Option for Users 1.0

Panda wrote:

Shit - I upgraded forum to 1.2.10 and it doesn't support this mod sad

which part isnt supported?
it should work for all 1.2 versions.


Cant find something you want? try searching
Also try the wiki

Offline

 

#21 2005-12-06 14:31:07

Panda
Member
From: Lithuania
Registered: 2005-11-09
Posts: 17

Re: New Window Links Option for Users 1.0

When I ran install_mod.php it was written that this version doesn't support the mod.

Offline

 

#22 2005-12-07 12:27:28

Panda
Member
From: Lithuania
Registered: 2005-11-09
Posts: 17

Re: New Window Links Option for Users 1.0

Could anybody answer: if I write in manually in install_mod.php version 1.2.10, will it work OK?

Offline

 

#23 2005-12-07 13:37:06

Pandark
Member
From: France
Registered: 2005-08-28
Posts: 57
Website

Re: New Window Links Option for Users 1.0

Panda wrote:

Could anybody answer: if I write in manually in install_mod.php version 1.2.10, will it work OK?

The script will run if you does it.. wink


.        .._ -Pandark- _..        .
         Serial Dreamer

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.