vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Auto Resize large images in an IMG tag (https://vborg.vbsupport.ru/showthread.php?t=125500)

Nathan2006 11-28-2006 12:40 AM

EDIT: Sorted it :)

mr.gamesbay 11-30-2006 03:13 PM

update!

I have tested this Hack with a 3.6.4 Board and this Hack work without any problems :)

ninjamaster 12-01-2006 09:29 PM

thanks :)

Greggg 12-11-2006 09:30 AM

Good job !!!

Thanks !!!

Goat Boy 12-11-2006 11:08 AM

Quote:

Originally Posted by mr.gamesbay (Post 1128771)
update!

I have tested this Hack with a 3.6.4 Board and this Hack work without any problems :)

Loaded it on 3.6.4 about a week ago and it work flawlessly.

Great Job !

Jarllax 12-13-2006 08:51 AM

Thanks much, works great!

iran.gs 12-13-2006 03:10 PM

I installed it but it wont resize :( i used urs before it worked but on my other skins but not on this skin.

maybe i put this in a wrong spot

.vbimgcodelimit {
cursor: pointer;
border: dotted 1px black;
}

where should i add this before or after all the codes ?

this is all the codes plz take a look


Quote:

/* ***** styling for 'big' usernames on postbit etc. ***** */
.bigusername { font-size: 14pt; }

/* ***** small padding on 'thead' elements ***** */
td.thead, div.thead { padding: 4px; }

/* ***** basic styles for multi-page nav elements */
.pagenav a { text-decoration: none; }
.pagenav td { padding: 2px 4px 2px 4px; }

/* ***** define margin and font-size for elements inside panels ***** */
.fieldset { margin-bottom: 6px; }
.fieldset, .fieldset td, .fieldset p, .fieldset li { font-size: 11px; }

/* ***** don't change the following ***** */
form { display: inline; }
label { cursor: default; }
.normal { font-weight: normal; }
.inlineimg { vertical-align: middle; }

.vbimgcodelimit {
cursor: pointer;
border: dotted 1px black;
}

Goat Boy 12-13-2006 03:19 PM

Did you insert the line
Code:

<script type="text/javascript" src="clientscript/resizevbimg.js"></script>
in all the headinclude templates for each style?

iran.gs 12-13-2006 03:23 PM

yes i did that also

Quote:

<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />
<meta name="generator" content="vBulletin $vboptions[templateversion]" />
<if condition="$show['threadinfo']">
<meta name="keywords" content="$threadinfo[title], $vboptions[keywords]" />
<meta name="description" content="<if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase>-</if>$threadinfo[title] $foruminfo[title_clean]" />
<else />
<if condition="$show['foruminfo']">
<meta name="keywords" content="$foruminfo[title_clean], $vboptions[keywords]" />
<meta name="description" content="<if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase>-</if>$foruminfo[description_clean]" />
<else />
<meta name="keywords" content="$vboptions[keywords]" />
<meta name="description" content="$vboptions[description]" />
</if>
</if>

<!-- CSS Stylesheet -->
$style[css]
<if condition="is_browser('opera') AND !is_browser('opera', '8.0.1')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<!-- / CSS Stylesheet -->
<script type="text/javascript" src="clientscript/resizevbimg.js"></script>
<script type="text/javascript">
<!--
var SESSIONURL = "$session[sessionurl_js]";
var IMGDIR_MISC = "$stylevar[imgdir_misc]";
var vb_disable_ajax = parseInt("$vboptions[disable_ajax]", 10);
// -->
</script>

<script type="text/javascript" src="clientscript/vbulletin_global.js?v=$vboptions[simpleversion]"></script>
<if condition="$show['popups']"><script type="text/javascript" src="clientscript/vbulletin_menu.js?v=$vboptions[simpleversion]"></script></if>
<if condition="$vboptions['externalrss']">
<link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] RSS Feed" href="external.php?type=RSS2" />
<if condition="$show['foruminfo'] OR $show['threadinfo']">
<link rel="alternate" type="application/rss+xml" title="$vboptions[bbtitle] - $foruminfo[title_clean] - RSS Feed" href="external.php?type=RSS2&amp;forumids=$forumin fo[forumid]" />
</if>
</if>

Brew 01-02-2007 12:44 AM

One thing I noticed is that when you edit a post with this the image isn't resized when you're finished.

Great hack though...In a gaming site this would be a great addition!

KURTZ 01-08-2007 01:52 AM

actually i use the IMAGE RESIZER without any trouble :)

anyway thx for sharing ;)

kenfuzed 01-16-2007 03:44 PM

Works great on my 3.6.4 board, THANKS!

redspider 01-17-2007 03:01 AM

thank you I love it .

giotmuadong 02-07-2007 01:22 AM

work well, thanks :)
thanks for this perfect hack
work like a champ
you rock

6piston 02-08-2007 11:06 AM

hi GREAT MOD

is there a way of changing the size of the rezised images?
say from the current size (what size does it resize to anwyay? 500px wide?)
to say 200px wide or 300px wide?

Thanks!!!!
Tom

donaldgkimball 02-08-2007 02:38 PM

Quote:

Originally Posted by 6piston (Post 1177458)
hi GREAT MOD

is there a way of changing the size of the rezised images?
say from the current size (what size does it resize to anwyay? 500px wide?)
to say 200px wide or 300px wide?

Thanks!!!!
Tom

Yes, Just go ahead and edit the part of the .js file to whatever size you need it.


This is a great feature. Thanks

harlita 03-18-2007 07:33 AM

the last step wasn't necessary for it to work on my 3.6.5 board.

excellent hack. thanks!

dragonlove 03-29-2007 11:28 AM

Hmm, I don't know what happened with my forum . I checked the installation many times, but it still didn't work, does it require something?

(I'm running it on my PC using php5.2.1 and mysql5.0.33 (apache2) and vbulletin 3.6.5)

thank you for your support

Ekshi 03-29-2007 03:19 PM

Thank you man nice mod.

alfaowner 04-15-2007 10:27 PM

Didnt work for me either on 3.6.4, no errors, just didnt resize my images???

cunder 04-25-2007 12:08 PM

Hello

Thank you man nice mod

But I use these mod vS-Hide.Hack.Resurrection.Expanded_2.8.1_by.Psionic.V ision

When someone presses on my site on the thanked button the pics reresize my images!

is there a way of changing wen someone press the thanks button en te pics don't stay resize !!!

thanks

BadgerDog 04-27-2007 04:06 PM

Can I edit the PHP file with just notepad, or do I need something specific for these file types?

Thank you...

Regards,
Badger

Edit: NM, I downloaded a freeware PHP editor just in case, which seemed to work fine... :)

BadgerDog 04-27-2007 04:52 PM

Quote:

Originally Posted by g0rdy (Post 1071643)
Works with vBadvanced too:

mod the adv_portal template

find
Code:

<body>
replace
Code:

<body onload="$onload;vbImageResize()">
such an important mod never understood why it is never included on any bb software

I have VBadvanced installed, but I didn't need to do this to make it work in v3.6.4? I just followed the author's instructions and it works fine, except of course, after displaying an edited post. The original large pic shows up there until you "submit" the edit and refresh the screen.

Should I be modding the "adv_portal template" as well, even though it seems to be working?

Nice mod and something like this should be included in original version.

Thanks

Regards,
Badger

wengi 04-30-2007 12:07 PM

Installed and working gr8 on 3.6.5

Regards
Wengi

kildjean 05-04-2007 12:54 AM

I have a suggestion, which I think it would be great...

You know when you click on the image that it pops up in a different window? You should make an addon to the script so it uses the Lightbox.js script to pop that image instead than a different window.

I'd love to see this implemented because it would make this script yet much cooler...

What do you think?

Kil

PS. I have this installed in 3.6.5 and it works just fine.

Lemac 05-10-2007 03:16 PM

Very Good!

ashraf_gawdat 05-11-2007 12:54 PM

Quote:

Originally Posted by janslu (Post 1070228)
mr.gamesbay,
you've made a terrific job. I am importing a large forum from smf to VB and I got tons of extremely large files that ruin my fluid xhtml page. Your hack saves me :)

There's just one thing that I think should be changed. It is illegal to declare more than one object with the same id on the same page. I think you should've used class for declaration:

1. for includes/class_bbcode.php:
Code:

return '<img src="' .  $link . '" border="0" alt="" class="vBCodeIMG" />';
2. and one change in line #11 of resizevbimg.js:
Code:

if (docImg[i].width > vbimgcodeWidthMax && docImg.className == 'vBCodeIMG') {
What do you think?

I agree with this as it is not standard to have multiple id's in the same document. To install this hack with standards taken into consideration you may make the changes janslu mentioned above, but you must another 2 changes:

1. In line #13 of resizevbimg.js find
Code:

[i]docImg.className = vbimgcodeClassName;
and remove it completely. Or you can just comment it by adding // (double slash) before the mentioned line.

[i]2. In Styles & Templates > Style Manager > Main CSS > Additional CSS Definitions
instead of adding
Code:

.vbimgcodelimit {
        cursor: pointer;
        border: dotted 1px black;
}

add
Code:

.vBCodeIMG {
        cursor: pointer;
        border: dotted 1px black;
}

And that's it.

Any way it is a good hack and I installed it.

ashraf_gawdat 05-11-2007 02:04 PM

To make modifications in less templates, Additional CSS Definitions template may not be modified at all. Instead, the same effect can be made using javascript.

In file resizevbimg.js:

find
Code:

docImg[i].onclick = vbImagecodeWinOpen;
After it add:
Code:

docImg[i].style.cursor = 'pointer';
docImg[i].style.cursor = 'hand';
docImg[i].style.border = 'dotted 1px black';

The same effect of editing the CSS in Additional CSS Definitions template will be done.

Using 2 cursor values (pointer & hand) instead of (pointer) only to be cross browser, as (pointer) value is valid only for NS6/ IE6.

Samy 05-20-2007 09:04 AM

In a version 3.6.7 the line modified in a file class_bbcode.php is: ~ line1937

cvn 05-31-2007 03:24 AM

Works on 3.6.7
Not work with Safari.

Thank you very much for your nice hack!

Click Installed now.

StuartDH 05-31-2007 05:09 PM

Can't seem to get it to work on 3.6.7PL1

I've got vbseo and vbadvanced installed, done everything in the insallation, added the body code for vbadvanced and tried the latest changes but nothing seems to get resized.

source code on the pages looks OK, but images are still large - http://www.wildaboutbritain.co.uk/fo...red-belly.html

BBI-Ross 06-02-2007 03:36 PM

Works fine here with 3.6.7PL1.

Cheers.

WarDoGG 06-06-2007 06:58 PM

thanks.. great mod ! works like a charm..

Zighinno 06-18-2007 03:00 PM

Thanks ;)

radarhunter 06-20-2007 06:41 AM

hey can u make this work with the Vbadvanced also ???

i mean to resize images on those is this possible ??????

eobie 06-20-2007 04:46 PM

installed and working like a charm

redslush 06-22-2007 09:00 PM

I would interest to know how to get this working for images displayed through a vbadvanced module.

Thanks

redslush 06-22-2007 09:03 PM

NM my previous request. I found it. works like a charm

CrAEckY 06-24-2007 01:41 AM

Well done! Great work! ;)

NoDRaC 07-02-2007 03:02 PM

good hack thanks


All times are GMT. The time now is 03:08 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.01492 seconds
  • Memory Usage 1,824KB
  • 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
  • (10)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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