[RC1] Prime Links - Classify Locals & Target Externals

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

stokerpiller wrote:
primehalo wrote:
stokerpiller wrote:Hello

I am working on a mod that shows images included with the IMG BBcode in a popup.
Because these images is external links, I cant make it work with Prime links.
Instead og opening a popup, it opens in a new window.

Is there any way to avoid this?
There should be. What are you doing to open the image in a popup?
I am using the Highslide JS and a single edit in includes/bbcode.php:

Code: Select all

	'img'		=> '<a class="highslide" href="$1" onclick="return hs.expand(this)"><img src="$1" style="max-height:210px;" alt="' . $user->lang['IMAGE'] . '" /></a>',
Strange, seems like that should work fine. My onclick code should be appended to the end of any existing onclick code, and since yours returns, my onclick code shouldn't get executed. Are you testing with the latest version of my MOD? Do you have USE_TARGET_ATTRIBUTE set to true or false?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by stokerpiller »

primehalo wrote: Strange, seems like that should work fine. My onclick code should be appended to the end of any existing onclick code, and since yours returns, my onclick code shouldn't get executed. Are you testing with the latest version of my MOD? Do you have USE_TARGET_ATTRIBUTE set to true or false?
Dude, I wasn't aware of Your mod updates. :oops:
I used version 1.0.1 and USE_TARGET_ATTRIBUTE set to false.

Now I use version 1.0.5 and it works just fine now.
Thanks for Your notice about the update.
I never had any errors with this mod and that is the reason that I never searched for an update.

Great :mrgreen:
I am done with phpBB
MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by MrC »

Prime, latest version is 1.0.5. Start post shows 1.0.3, can you please update the startpost?
User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

MrC wrote:Prime, latest version is 1.0.5. Start post shows 1.0.3, can you please update the startpost?
I often forget about that :oops:
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
benyboi
Registered User
Posts: 203
Joined: Thu Mar 01, 2007 6:50 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by benyboi »

Anyway to disable this if the user is a guest? I tried editing the functions_content.php page with no luck.

Thanks.
User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

benyboi wrote:Anyway to disable this if the user is a guest? I tried editing the functions_content.php page with no luck.

Thanks.
Sure, just don't have it call the function if the user is not logged in.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
benyboi
Registered User
Posts: 203
Joined: Thu Mar 01, 2007 6:50 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by benyboi »

Ah thanks. Found a better way of doing what i actually wanted, in prime_links.php i just did this:

Code: Select all

	if($user->data['user_id'] == 1){
		define('ANONYMIZE_EXTERNAL_LINKS', '');
	}else{
		define('ANONYMIZE_EXTERNAL_LINKS', 'http://site.com/leave.php?');
	}
I didnt want to actually disable it (sorry for not saying it that way), rather remove the prefix if they arent logged in.
gajotnt
Registered User
Posts: 19
Joined: Sun Mar 02, 2008 5:12 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by gajotnt »

Hello, i have gallery 3.0.0 installed on my forum and i installed Prime Links (Great btw :D) but im having a problem when users put their photos in posts using the bbcode

Code: Select all

[album]1[/album]
all i get is this:

image_id: 1

with this link: http://gallery/image_page.php?image_id=1

should be http://www.pbterceira.com/gallery/image ... image_id=1

I really dont want to remove prime links, :/ how do i resolve this?
Thanks

Edit:
i also get this debug code on the top of the page:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 82: parse_url(http:////gallery/image_page.php?image_id=1) [function.parse-url]: Unable to parse URL
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3416: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3418: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3419: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3420: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)

User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

gajotnt wrote:Hello, i have gallery 3.0.0 installed on my forum and i installed Prime Links (Great btw :D) but im having a problem when users put their photos in posts using the bbcode

Code: Select all

[album]1[/album]
all i get is this:

image_id: 1

with this link: http://gallery/image_page.php?image_id=1

should be http://www.pbterceira.com/gallery/image ... image_id=1

I really dont want to remove prime links, :/ how do i resolve this?
Thanks

Edit:
i also get this debug code on the top of the page:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/prime_links.php on line 82: parse_url(http:////gallery/image_page.php?image_id=1) [function.parse-url]: Unable to parse URL
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3416: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3418: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3419: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3420: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)

Try changing this:

Code: Select all

            if ($remove_subdomains !== false)  
to this:

Code: Select all

            if ($remove_subdomains !== false && strpos($url, '//') !== false)  
And it would help if you could provide a link to an example post on your forum.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
gajotnt
Registered User
Posts: 19
Joined: Sun Mar 02, 2008 5:12 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by gajotnt »

Still getting the error :|


heres the link to the post thats causing the error:
http://www.pbterceira.com/viewtopic.php ... 117#p18771
User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

gajotnt wrote:Still getting the error :|


heres the link to the post thats causing the error:
http://www.pbterceira.com/viewtopic.php ... 117#p18771
Looks like the url being sent to the function is malformed (http:////gallery/image_page.php?image_id=1). What does the url appear as if my MOD is disabled/removed?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
gajotnt
Registered User
Posts: 19
Joined: Sun Mar 02, 2008 5:12 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by gajotnt »

User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

Yeah, I understand that's what it's supposed to be, but I need to see what it actually is.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
gajotnt
Registered User
Posts: 19
Joined: Sun Mar 02, 2008 5:12 pm

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by gajotnt »

Sorry its supposed to show has a picture

Like one of these thumbnails:
http://www.pbterceira.com/gallery/album.php?album_id=8

and then links to the picture itself
http://www.pbterceira.com/gallery/image ... image_id=1
User avatar
primehalo
Former Team Member
Posts: 2898
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Links - Classify Locals & Target Externals

Post by primehalo »

gajotnt wrote:Sorry its supposed to show has a picture

Like one of these thumbnails:
http://www.pbterceira.com/gallery/album.php?album_id=8

and then links to the picture itself
http://www.pbterceira.com/gallery/image ... image_id=1
Neither of those are a viewtopic.php page. I need to see the viewtopic.php page that contains the link to the gallery as it shows up without my MOD.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
Locked

Return to “[3.0.x] MODs in Development”