[MODDB] HighSlide Attachment MOD

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!
Anti-Spam Guide
Locked
User avatar
GoBieN
Registered User
Posts: 546
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by GoBieN »

GoBieN wrote:Quick question.
I have the slight problem that some users use the [ IMG ] tag with an imageshack thumbnail that links to the big image.
The BBcode is then something like this:
Image

Code: Select all

[URL=http://img84.imageshack.us/img84/7637/caminodesantiago461il8.jpg][IMG]https://camo.phpbb.com/0f80cff94d897870dacc97098a4c16459134436d/687474703a2f2f696d6738342e696d616765736861636b2e75732f696d6738342f373633372f63616d696e6f646573616e746961676f343631696c382e74682e6a7067[/IMG][/URL]
....

I got it to work ;)
The imageshack thumbnails work now, the highslide takes the big version for pop-up ;)

Here is how:

In includes/bbcode.php
FIND:

Code: Select all

if (!defined('IN_PHPBB'))
{
	exit;
}
AFTER ADD:

Code: Select all

// HIGHSLIDE IMAGE MOD Function to convert strings with .th.jpg inside to .jpg
function highstan($var1)
{
	if (strpos($var1,".th.jpg") === false)
	{
		//do nothing
	}
	else
	{
		$var1 = str_replace(".th.jpg",".jpg",$var1);
	}
	return $var1;
}
FIND:

Code: Select all

						$message = preg_replace($preg['search'], $preg['replace'], $message);
BEFORE ADD:

Code: Select all

						$message= highstan($message);
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

PeterNet wrote:Hmm. In localhost it work ok, but on server it is not work.

Localhost:
http://www.postimage.org/aV2o35dA-ad75b ... 77a975.jpg
It is ok.

Server:
http://www.postimage.org/aV2o2sji-ad75b ... 77a975.jpg
Here it seizure.

Wherewich it is?
Sorry for my bat english, I´m from Czech Republic:-P
Hi PeterNet

It is hard to tell what the problem is.
I need access to at topic at Your board where attachments is used.
You can send me a PM with a link if You dont want it in public.
I am done with phpBB
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

GoBieN wrote:
GoBieN wrote:Quick question.
I have the slight problem that some users use the [ IMG ] tag with an imageshack thumbnail that links to the big image.
The BBcode is then something like this:
Image

Code: Select all

[URL=http://img84.imageshack.us/img84/7637/caminodesantiago461il8.jpg][IMG]https://camo.phpbb.com/0f80cff94d897870dacc97098a4c16459134436d/687474703a2f2f696d6738342e696d616765736861636b2e75732f696d6738342f373633372f63616d696e6f646573616e746961676f343631696c382e74682e6a7067[/IMG][/URL]
....

I got it to work ;)
The imageshack thumbnails work now, the highslide takes the big version for pop-up ;)

Here is how:

In includes/bbcode.php
FIND:

Code: Select all

if (!defined('IN_PHPBB'))
{
	exit;
}
AFTER ADD:

Code: Select all

// HIGHSLIDE IMAGE MOD Function to convert strings with .th.jpg inside to .jpg
function highstan($var1)
{
	if (strpos($var1,".th.jpg") === false)
	{
		//do nothing
	}
	else
	{
		$var1 = str_replace(".th.jpg",".jpg",$var1);
	}
	return $var1;
}
FIND:

Code: Select all

						$message = preg_replace($preg['search'], $preg['replace'], $message);
BEFORE ADD:

Code: Select all

						$message= highstan($message);
Thanks for the Info GoBieN :)
I will make a new demo for this soon.
It is very usefull because a lot of users are using an external image server.
I am done with phpBB
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

Hello GoBieN

I have set up a demo for Your addon: http://stokershoppen.dk/highslidedemo/v ... p?f=8&t=19

It works very nice with imageshack.us
But it doesn't work with other image servers.

However this is very usefull for imageshack users.
Thanks :)
I am done with phpBB
ToXiQ
Registered User
Posts: 69
Joined: Mon Jun 05, 2006 4:54 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by ToXiQ »

Hello Stoker,

I am using the Black_Pearl variant ( We changed a lot in it our self) and I got it working with placing the highllight map into the template map. But I want that all photo's are not affected when they have a size from 800px widht or height 800px is that possible? I found the 210 setting but changing that one is not enough.

regards Walter

ps

there is now a white rounded corner arround the pictures who are popuped :) can we change that color into gray?
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

Hello ToXiQ

You have to take a look at the attachment.html edit
It defines a height which You can remove or change.
You also have to look at Your attachment settings in ACP. Thoose settings decide the size of the thumbnail.

I am not sure that it is possible to change the color of the white corners, but You can give it a go.
The edits in overall_header.html:

Code: Select all

<script type="text/javascript" src="highslide/highslide-full.js"></script>
<script type="text/javascript">
	// remove the registerOverlay call to disable the controlbar
	hs.registerOverlay(
    	{
    		thumbnailId: null,
    		overlayId: 'controlbar',
    		position: 'top right',
    		hideOnMouseOut: true
		}
	);

    hs.graphicsDir = 'highslide/graphics/';
    hs.outlineType = 'rounded-white';
</script>
Find:

Code: Select all

hs.outlineType = 'rounded-white';
Change to:

Code: Select all

hs.outlineType = 'rounded-grey';
I am gessing here :)

If You want the glowing effect that I have en my black pearl demo: http://www.stokershoppen.dk/highslidede ... 0&p=22#p22
you should change it to:

Code: Select all

hs.outlineType = 'outer-glow';
Then You just need to do some css changes to match the color You want.
You can take a look at my stylesheet and se how I did it: http://www.stokershoppen.dk/highslidede ... esheet.css
I am done with phpBB
ToXiQ
Registered User
Posts: 69
Joined: Mon Jun 05, 2006 4:54 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by ToXiQ »

Thank you Stoker for the quick reply :) I forgot to mention that I didn't used the attachment part but the img tag. I see below your demo some other (un) documented secrets ? I see file name and downlaod times / viemed xx times. How can we set that?

So many questions :)

regards Walter
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

Hello ToXiQ

Then I am not sure wat You want?
What size do You want the thumbnail to be when using the img bbcode?
I see file name and downlaod times / viemed xx times. How can we set that?
This is only used with attachments. Will not work with the img bbcode.
I am done with phpBB
CodeDynamics
Registered User
Posts: 8
Joined: Mon Jan 14, 2008 11:25 am

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by CodeDynamics »

Hi
I've got a problem with the custom bbcode from here
http://www.phpbb.com/community/viewtopi ... 5#p4733605
because if the image is insertet it has the correct dimensions, but it won't slide up instead it opens in a new window.

can anyone help??
User avatar
GoBieN
Registered User
Posts: 546
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by GoBieN »

Stokerpiller,

the code you have posted on your add-on forum is not correct, like it states there it will do nothing !
replace .jpg with .jpg

Use this code:

Code: Select all

// Function to convert strings with .th.jpg inside to .jpg
function highstan($var1)
{
	//Imageshack.us
	if (!(strpos($var1,".th.jpg") === false))
	{
		$var1 = str_replace(".th.jpg",".jpg",$var1);
	}
	return $var1;
}
I think you missed the point of the code.
The only use the code has is when a user posts the imageshack image in this form:

Code: Select all

[url=http://img84.imageshack.us/img84/7637/caminodesantiago461il8.jpg][img]https://camo.phpbb.com/0f80cff94d897870dacc97098a4c16459134436d/687474703a2f2f696d6738342e696d616765736861636b2e75732f696d6738342f373633372f63616d696e6f646573616e746961676f343631696c382e74682e6a7067[/img][/url]
Image
This is an thumbnail image that links to the big version. Since the link is replaced with the highslide pop-up code, you cannot reach the big version. My code edit, removes the .th. from the image location, so that it displays the big version !

I tried to see if it would work with the other services you brought up, but they all link to a page, not the big image itself.
ToXiQ
Registered User
Posts: 69
Joined: Mon Jun 05, 2006 4:54 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by ToXiQ »

stokerpiller wrote:Hello ToXiQ

Then I am not sure wat You want?
What size do You want the thumbnail to be when using the img bbcode?
I do not want bigger photo's then 800px from whateverside in the forum.

regards Walter
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

Hello GoBieN

No, I am not missing anything.
But there is a bug in my codebox?!?
It just wont show

Code: Select all

.th.jpg
You could see it if You edit or quote the post
Dohh, that error offcourse appears because of the codechange of Your addon.
I bet You cant insert it at Your forum too?

I will remove the instructions and link to Your post here instead.
I am done with phpBB
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

ToXiQ wrote:
stokerpiller wrote:Hello ToXiQ

Then I am not sure wat You want?
What size do You want the thumbnail to be when using the img bbcode?
I do not want bigger photo's then 800px from whateverside in the forum.

regards Walter
Okay, change this:

Code: Select all

style="max-height:210px;"
to:

Code: Select all

style="max-width:800px; max-height:800px;"
I am done with phpBB
molgan
Registered User
Posts: 86
Joined: Tue Dec 18, 2007 5:41 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by molgan »

Great mod, but I have a little problem

I can´t get bbcode images to work right, they just open in a new window
uploaded pictures works
I put up a demo board, and then I got it to work, so Imust hav missed something ?

If i right click on my webpage I can see this

Code: Select all

[b]Linked image [/b]
<div class="content"><a class="highslide" href="http://www.blablabl.com/.test.jpg" onclick="this.target='_blank';" rel="nofollow"><img src="http://www.blablabl.com/.test.jpg" style="max-height:210px;" alt="Bild" /></a></div>

[b]Uploaded image[/b]
<div class="content">test<div class="inline-attachment">	<a href="./download/file.php?id=1261&mode=view/fender_0961101.jpg" id="" class="highslide" onclick="return hs.expand(this, {captionId: './download/file.php?id=1261&mode=view', align: 'center'})"><img src="./download/file.php?id=1261&t=1" height="210" alt="fender_0961101.jpg" title="Click to enlarge" /></a><div class='highslide-caption' id='./download/file.php?id=1261&mode=view'>fender_0961101.jpg (50.08 KB) [ Inte visad än ]</div>
		<div id="controlbar" class="highslide-overlay controlbar">

		<a href="#" class="previous" onclick="return hs.previous(this)" title="Previous"></a>
		<a href="#" class="next" onclick="return hs.next(this)" title="Next"></a>
		<a href="#" class="highslide-move" onclick="return false" title="Move"></a>
		<a href="#" class="close" onclick="return hs.close(this)" title="Close"></a></div>
		<dd> fender_0961101.jpg [ 50.08 KB | Inte visad än ]</dd>
		<br />
</div></div>
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by stokerpiller »

Hello molgan

If attachments works and the Img BBCode doesn't, there can be 2 reasons.
1. You didn't do the includes/bbcode.php edit
2. You have an "out of date" version of the Prime Links Mod. I had the same problem and updated to the newest version which solved the problem.
I am done with phpBB
Locked

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