vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Lightbox/ThickBox works with Inline Editing (https://vborg.vbsupport.ru/showthread.php?t=126501)

redgoals22 09-12-2006 10:00 PM

Lightbox/ThickBox works with Inline Editing
 
Hey all,

Just thought id release this mod which is a fix to the previous lightboxes on vb that break the:

inline quick-edit feature
multi quote

Also the prev lightboxes on here were abit heavy on the size front. this one weighs in at 27kb, and i think it looks nicer anyway.

Demo: Here

Step 1: Download the file attached and upload its contents to your forum root or wherever you want (just remember the path)

Step 2: Modify the template headinclude and add this to the bottom,

Code:

<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">
<link rel="stylesheet" href="css/thickbox.css" type="text/css" />
</if>

Step 3: Modify the template postbit/postbit_legacy and add this to the very top,

Code:

<if condition="$show['thumbnailattachment']">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
</if>

Step 4: Modify the template postbit_attachmentthumbnail and add this to the a href tag,

Code:

rel="gallery-thumbs" class="thickbox"
this may work on previous versions of vb but dont quote me on that as its untested on prev versions.

click install if you find this useful :rolleyes:

nJoy.

..........

Update: The CSS file in the package was an old one and it was clashing with postbit_legacy, please use the new css file in the package on the right.

Update 2: This is the final update of this hack, i have removed the scrolling annoyance for larger images, they will display fully on the page. If you want the new update use the second attachment on the right.

soletrader 09-13-2006 01:04 PM

I have a problem with the hack... it till take me to the loading page but will not show any image. Any suggestions? Thank you

redgoals22 09-13-2006 01:15 PM

what is the website?

soletrader 09-13-2006 01:27 PM

www.TradersLaboratory.com

try loggin in with username redgoals22, pass: redgoals22

visit: http://www.traderslaboratory.com/for...2.html#post788

Thanks

redgoals22 09-13-2006 01:36 PM

Quote:

Originally Posted by soletrader
www.TradersLaboratory.com

try loggin in with username redgoals22, pass: redgoals22

visit: http://www.traderslaboratory.com/for...2.html#post788

Thanks

2 problems.

1. the attachment link is pointing to an invalid file http://www.traderslaboratory.com/for...6overnight.jpg
2. you copied the code wrong at step 4,

change:
gallery-thumbs="" class="thickbox"

to:
rel="gallery-thumbs" class="thickbox"

soletrader 09-13-2006 01:40 PM

Edited

redgoals22 09-13-2006 01:42 PM

Quote:

Originally Posted by soletrader
That is the code I used:




Anything wrong with this coding? Thanks

do it like this at step4

<a rel="gallery-thumbs" class="thickbox" href=

soletrader 09-13-2006 01:48 PM

Thank you very much redgoal.... I managed to get it to work.

Great hack :)

First to install!

redgoals22 09-13-2006 01:49 PM

Quote:

Originally Posted by soletrader
New code but still not working.

seems to be working fine here.. have u refreshed ur page?

ps: can u remove the code above in ur 2posts its stretching ma thread , thanks :)

soletrader 09-13-2006 01:52 PM

Is there anyway to expand the lightbox to fit the actual image size?

redgoals22 09-13-2006 01:55 PM

Quote:

Originally Posted by soletrader
Is there anyway to expand the lightbox to fit the actual image size?

i dont quite understand, when you click the link for the attachment the lightbox will open up the image to its fullsize or are you looking for something different?

soletrader 09-13-2006 02:17 PM

My mistake.. i thought the lightbox forced the images into a certain size.

redgoals22 09-13-2006 03:14 PM

heres another version of the same script, but it will allow for larger sized attachments to be displayed full-size on the page

if u find it useful click install :rolleyes:

edit: slight problem with the attachment it has been updated.
edit2: apologies for the attachment, it contained an old css file which was clashing with postbit_legacy, please use the new attached package

soletrader 09-13-2006 04:36 PM

Thanks redgoals. Great hack!

nix 09-13-2006 06:44 PM

had to uninstall. It was messing up the style of postbitlegacy. If I take out the headinclude edit everything is back to normal.

redgoals22 09-13-2006 07:01 PM

Quote:

Originally Posted by nix
had to uninstall. It was messing up the style of postbitlegacy. If I take out the headinclude edit everything is back to normal.

it could be the css file, try the one attached to see if it works

nix 09-13-2006 07:12 PM

yea that fixed it.

Benj 09-13-2006 07:54 PM

mmmm am i missing something. ive set Thumbnail Creation to yes but my attached images are still coming up as links?

soletrader 09-13-2006 07:59 PM

Should I use the new css file as well?

redgoals22 09-13-2006 08:00 PM

Quote:

Originally Posted by Benj
mmmm am i missing something. ive set Thumbnail Creation to yes but my attached images are still coming up as links?

whats the website?

redgoals22 09-13-2006 08:04 PM

Quote:

Originally Posted by soletrader
Should I use the new css file as well?

yes it could cause problems by clashing with postbit_legacy if u decide to use postbit_legacy in the future

Benj 09-13-2006 08:42 PM

Quote:

Originally Posted by redgoals22
whats the website?

just pmed you

redgoals22 09-13-2006 09:04 PM

Quote:

Originally Posted by Benj
just pmed you

u havent got thumbnails enabled, so change step4 and modify the template postbit_attachment and add the code below to the a href tag

Code:

<a rel="gallery-thumbs" class="thickbox" href="attachment.php....
At step3 modify the code to read

Code:

<if condition="$show['imageattachment']">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
</if>


ronoxQ 09-14-2006 12:22 AM

Sweet! Somebody finally made a jQuery mod for vB! *hugs*

I'll install once you get the bugs ironed out.

Benj 09-14-2006 07:54 AM

Quote:

Originally Posted by redgoals22
u havent got thumbnails enabled, so change step4 and modify the template postbit_attachment and add the code below to the a href tag

Code:

<a rel="gallery-thumbs" class="thickbox" href="attachment.php....
At step3 modify the code to read

Code:

<if condition="$show['imageattachment']">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
</if>



i know that thats why i asked what settings i need to change to make thumbnails appear. i have made the changes. its made no difference supprisingly because thumbnails are not showing even know thumbnail creation is on "YES" that why i asked is there something or some setting im missing .....

redgoals22 09-14-2006 09:24 AM

Quote:

Originally Posted by Benj
i know that thats why i asked what settings i need to change to make thumbnails appear. i have made the changes. its made no difference supprisingly because thumbnails are not showing even know thumbnail creation is on "YES" that why i asked is there something or some setting im missing .....

did u just enable thumbnail creation? if so vbulletin may not have generated thumbnails for your old attachments, try uploading a new attachment and see if a thumb is generated... if it doesnt you havent got gd library installed in php

Benj 09-14-2006 11:06 AM

mmmm its on yes! and it just shows the link

my php info shows i have gd
Quote:

gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

redgoals22 09-14-2006 11:59 AM

Quote:

Originally Posted by Benj
mmmm its on yes! and it just shows the link

my php info shows i have gd

did u try to upload a new attachment and see if a thumb is generated?

Mr_Devlin 09-14-2006 04:01 PM

Quote:

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
you need to edit this code to match your upload folder. In general you will use the clientscript folder for the Javascript-Uploads. So change the loaction in the code to:
Quote:

<script type="text/javascript" src="clientscript/jquery.js"></script>
<script type="text/javascript" src="clientscript/thickbox.js"></script>
Maybe you have to upload all files to your special style folders too when using different styles and change the code to match your settings.

The thickbox.css should be uploaded to forum root!

Kanustep 09-14-2006 04:15 PM

A little bug/error, if the image is large (in vertical) than the screen, if you want to see the full image you can't. The image will follow you and you will not be able to see the edges or close button for example.

Mr_Devlin 09-14-2006 04:45 PM

Quote:

Originally Posted by Kanustep
A little bug/error, if the image is large (in vertical) than the screen, if you want to see the full image you can't. The image will follow you and you will not be able to see the edges or close button for example.

No, it works when using the newest files posted in thread. Take care to modify the codes to match your settings!

Kanustep 09-14-2006 05:30 PM

And where I can change it?

soletrader 09-14-2006 06:19 PM

I have installed geeks article system and seem to encounter one problem. The lightbox does not work with attachments placed inside the article hack.

Would you know how I can fix this problem? thank you

|oR|Greg 09-14-2006 06:44 PM

redgoals22:

I would love to be able to do this to my vBPicGallery... I tried a few things but it didn't work. I'm sure it's simple for you to do, any help would be appreciated.

redgoals22 09-14-2006 08:42 PM

Quote:

Originally Posted by Mr_Devlin
you need to edit this code to match your upload folder. In general you will use the clientscript folder for the Javascript-Uploads. So change the loaction in the code to:


Maybe you have to upload all files to your special style folders too when using different styles and change the code to match your settings.

The thickbox.css should be uploaded to forum root!

peepz can put the files wherever they want as long as they reference them properly

redgoals22 09-14-2006 08:45 PM

Quote:

Originally Posted by |oR|Greg
redgoals22:

I would love to be able to do this to my vBPicGallery... I tried a few things but it didn't work. I'm sure it's simple for you to do, any help would be appreciated.

ive only really tried this with standard vbulletin, but im sure it can be intergrated with any other system. try removing the conditionals in step3 and step4 to see if it works, then work your way from that.

redgoals22 09-14-2006 08:48 PM

Quote:

Originally Posted by soletrader
I have installed geeks article system and seem to encounter one problem. The lightbox does not work with attachments placed inside the article hack.

Would you know how I can fix this problem? thank you

as my prev post, try removing the conditionals from step3 and step4 to see if works, if it does then try and work out what conditional would be needed (if any)

redgoals22 09-14-2006 08:48 PM

Quote:

Originally Posted by Kanustep
And where I can change it?

https://vborg.vbsupport.ru/showpost....0&postcount=13

Benj 09-14-2006 10:47 PM

Quote:

Originally Posted by redgoals22
did u try to upload a new attachment and see if a thumb is generated?

yeah :(

Kanustep 09-15-2006 10:30 AM

Quote:

Originally Posted by redgoals22


That's is what I have downloaded and still don't have a fixed position.

The hack take too much time to load some images. I try to compress the Javascript but don't work with compression. Is possible to make it more fast?


All times are GMT. The time now is 05:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01728 seconds
  • Memory Usage 1,836KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete