[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!
Scam Warning
Locked
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 »

I am glad You got it to work GoBieN :)

I think You should open a support ticket about this problem in the support forum: http://www.phpbb.com/community/viewforum.php?f=46
I am done with phpBB
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 »

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]
So the only difference is the xxxxx.th.jpg filename. Now witth he highslide mod this results in a highslide frame with just the thumbnail in it and the link to the big version doesn't work.

I wanted to solve this adding a check in includes/bbcode.php (or perhaps in highslide.js).
I want to check if the URL to the image has the pattern xxxxx.th.jpg in it i want the highslide to use the xxxxx.jpg for the frame (so the big version).

I was testing this out myself and came up with this in the section in bbcode.php where we adjust the IMG code to add highslide in the array.

Code: Select all

'img'		=> (strpos($1,".th.jpg",) === false) ? '<a class="highslide" href="$1" onclick="return hs.expand(this)"><img src="$1" style="max-height:210px;" alt="' . $user->lang['IMAGE'] . '" /></a><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>' : '<a class="highslide" href="' . str_replace(".th.jpg",".jpg",$1) . '" onclick="return hs.expand(this)"><img src="$1" style="max-height:210px;" alt="' . $user->lang['IMAGE'] . '" /></a><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>',
It is basically an short if else notation with condition

Code: Select all

(strpos($1,".th.jpg",) === false)
that should check if the string $1 has .th.jpg inside and if true adjust the $1 that is send to the highslide javascript function call.

Code: Select all

str_replace(".th.jpg",".jpg",$1)
To bad it doesn't work.I think it's not allowed to use php code inside the short if/else notation.

Anyone have an idea to get this working, i''m not sure if i would be able to process this outside the array call.
Thanks for the help
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

Unfortunately I cant help You, but I hope somebody else can.

Anayway, I have the same problem as You.
I removed the bbcode.php edit and did this BBCode instead: http://www.phpbb.com/community/viewtopi ... 5#p4733605
Then I manually deleted this Img BBCode in prosilver/templates/posting_buttons.html:

Code: Select all

<!-- IF S_BBCODE_IMG -->
		<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
	<!-- ENDIF -->
Now the imageskack mod will still work as well of images inserted with the custom BBCode.
The downside is that it will not affect other images inserted with the Img BBCode. It will only affect images inserted with the new BBCode.
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 stokerpiller,

Thank you for pointin gme to this thread.I used the test forum and it looks good. But one question. When using a lightbox version the complete background can be set in a transparent dark colour. Is this with this mod also possible? This is needed to get a good vieuw from the photo's placed without the forum visable (yeah I know some people can be picky about things ;) )

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

Howto to get Lightbox effect on the Highslide MOD

Post by stokerpiller »

Hello ToXiQ

Sure You can :D
I have made a demo for You: http://www.stokershoppen.dk/highslidede ... um.php?f=5

When this mod is installed You need to do following to get the Lightbox effect:
Open Your stylesheet. For Prosilver we use colours.css and for Subsilver2 we use stylesheet.css
Find som of the code added by this Mod, Find:

Code: Select all

/* These must be the last of the Highslide rules */
.highslide-display-block {
    display: block;
}
Before add:

Code: Select all

.highslide-dimming {
	background: black;
	position: absolute;
}
Yes, You can change the color to something else :)

Open the included highslide-full.js
Find:

Code: Select all

dimmingOpacity: 0, // Lightbox style dimming background
Replace with:

Code: Select all

dimmingOpacity: 0.85, // Lightbox style dimming background
Save and upload files. Purge cache and, if necassary, refresh the theme.
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 »

wow thats been done quicly. Now I must implement it :) TY
User avatar
Origin30
Registered User
Posts: 122
Joined: Wed Sep 19, 2007 1:41 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by Origin30 »

Added the above code, refreshed, but still shows the same. Do I need to add any lightbox code?
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 »

Hi Origin30

Have You also uploaded the changed highslide-full.js file?
Purge cache?

Link to a topic where this MOD is used please.
If You dont want to post it in public, just send it by PM
I am done with phpBB
User avatar
Origin30
Registered User
Posts: 122
Joined: Wed Sep 19, 2007 1:41 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by Origin30 »

Thanks for a super fast reply stokerpiller, I've just re-checked it and it's working a treat now (maybe my cookies)

Thanks, a superb add-on to use.
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 »

No problem Origin30
I am glad You like it :mrgreen:
I am done with phpBB
moustafamin
Registered User
Posts: 230
Joined: Thu Aug 30, 2007 8:10 am

Re: [RC] HighSlide Attachment & IMG MOD 1.0.1

Post by moustafamin »

stokerpiller wrote:
moustafamin wrote:is it compatitble with hoteditor?
I see no problems with compability, but it isn't testet with hoteditor.
I think you should test it... cause it's not working for me, and there's no image resizing image mod works for hoteditor
PeterNet
Registered User
Posts: 9
Joined: Sun Mar 02, 2008 9:46 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by PeterNet »

Open: styles/prosilver/theme/colours.css
Find
Tip: This may be a partial find and not the whole line.
Code: Select All

Code: Select all

AT THE BOTTOM, ON A NEW LINE ADD

But "AT THE BOTTOM, ON A NEW LINE ADD" is not in colours.css! :-(
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 »

PeterNet wrote:Open: styles/prosilver/theme/colours.css
Find
Tip: This may be a partial find and not the whole line.
Code: Select All

Code: Select all

AT THE BOTTOM, ON A NEW LINE ADD

But "AT THE BOTTOM, ON A NEW LINE ADD" is not in colours.css! :-(
Lol it means, at the end of the file press enter so you start a new line and paste the code ;)
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.1

Post by stokerpiller »

moustafamin wrote:
stokerpiller wrote:
moustafamin wrote:is it compatitble with hoteditor?
I see no problems with compability, but it isn't testet with hoteditor.
I think you should test it... cause it's not working for me, and there's no image resizing image mod works for hoteditor
Hi moustafamin

I am not going to test it on hoteditor, sorry.
I hope You find a fix for it.

PeterNet wrote:Open: styles/prosilver/theme/colours.css
Find
Tip: This may be a partial find and not the whole line.
Code: Select All

Code: Select all

AT THE BOTTOM, ON A NEW LINE ADD

But "AT THE BOTTOM, ON A NEW LINE ADD" is not in colours.css! :-(
Hi PeterNet

It is correct what GoBieN is writing.
Don't worry, You are not the only one that misunderstod that one ;)
I am done with phpBB
PeterNet
Registered User
Posts: 9
Joined: Sun Mar 02, 2008 9:46 pm

Re: [RC] HighSlide Attachment & IMG MOD 1.0.5

Post by PeterNet »

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
Locked

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