MyBB Community Forums

Full Version: [Release 1.4/1.6] Fit on Page (Update: v2.3 Released)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
(2010-12-15, 07:47 AM)- G33K - Wrote: [ -> ]Thats what I'm trying to tell you, the code I asked you to put in the proportal head isn't showing up so it seems you haven't put it in the right template. If proportal creates a golbal template then thats where the edit needs to go. If its still not clear or doesn't work then PM me admin account details and I'll take a look.
PM Sent...I tried different temps to no avail.

http://www.7173mustangs.com/portal.php
I also tossed a large photo up in a test post...

PS..the only way I got anything to work is by putting the code into: global templates> pro_portal_announcement but there is no <head> and it applies a broken resize to every image on the screen including my ad banner.
(2010-12-15, 11:31 AM)RocketFoot Wrote: [ -> ]
(2010-12-15, 07:47 AM)- G33K - Wrote: [ -> ]Thats what I'm trying to tell you, the code I asked you to put in the proportal head isn't showing up so it seems you haven't put it in the right template. If proportal creates a golbal template then thats where the edit needs to go. If its still not clear or doesn't work then PM me admin account details and I'll take a look.
PM Sent...I tried different temps to no avail.

http://www.7173mustangs.com/portal.php
I also tossed a large photo up in a test post...

PS..the only way I got anything to work is by putting the code into: global templates> pro_portal_announcement but there is no <head> and it applies a broken resize to every image on the screen including my ad banner.

Resolved via PM
Thanks G33K! Everything is working perfectly now! Cool
(2010-12-14, 10:39 PM)- G33K - Wrote: [ -> ]
(2010-12-14, 09:22 PM)RocketFoot Wrote: [ -> ]I've got my issue with the XThreads forum worked out but I need to apply Fit On Page to my ProPortal...I hope someone out there can help me out! Cool

Glad you got it working for XThreads.
I don't have proportal installed so I can only give you pointers at this time, if it doesn't work, let me know so I can investigate it further.

For the pro portal try this:

In the proportal template, before </head> insert this:

<script type="text/javascript" src="jscripts/fitonpage.js?ver=230"></script>
<script type="text/javascript">
<!--
	var fitonpage_on = "{$mybb->settings['g33k_fitonpage_enabled']}";
	var fitonpage_resize = "{$mybb->settings['g33k_fitonpage_resize']}";
	var fitonpage_fluid = "{$mybb->settings['g33k_fitonpage_fluid']}";
	var fitonpage_topbar_resized = "{$lang->fitonpage_topbar_resized}";
	var fitonpage_topbar_full = "{$lang->fitonpage_topbar_full}";
	var fitonpage_topbar_text_class = "{$mybb->settings['g33k_fitonpage_topbar_text_class']}";
	var fitonpage_topbar_bground = "{$mybb->settings['g33k_fitonpage_topbar_bground']}";
	var fitonpage_topbar_icon = "{$mybb->settings['g33k_fitonpage_topbar_icon']}";
	var fitonpage_location = "portal";
-->
</script>

(2010-12-14, 07:51 PM)Dale Wrote: [ -> ]Great plugin.
I'm looking to disable the option to open the image to the original size after it has been resized as where when you hover the image your able to click on it.
Which line(s) in which templates need removed?

Thanks
Dale

(2010-12-14, 08:10 PM)Gene53 Wrote: [ -> ]
(2010-12-14, 07:51 PM)Dale Wrote: [ -> ]Great plugin.
I'm looking to disable the option to open the image to the original size after it has been resized as where when you hover the image your able to click on it.
Which line(s) in which templates need removed?

Thanks
Dale

I'd also like to do the same. I find that clicking on the pic for it to open in a new window is quite sufficient.

Cheers,
Gene

Around Line 119 in the fitonpage.js file
Comment out or remove the line begining with:
$('fop_topbar'+count).observe('click', function(event){

That line extends down all the way to line 155 so either remove the whole block, comment out each line with // or comment out the entire block by putting /* at the begining of line 119 and */ and the end of line 155

EDIT: You'll then have to edit the language so as to remove the part about clicking the bar to show full size Wink

Thanks G33K that worked ! I appreciate all your help. I had to extend the comment out to line 159 to get rid of the pop to save to your hard drive.
Quote:/* $('fop_topbar'+count).observe('click', function(event){
if(resize_img.width == resize_width)
{
fop_topbar.style.width = topbar_orig_width+'px';
fop_img.style.width = orig_width+'px';
resize_img.style.width = orig_width+'px';
if($('quick_reply_form') && use_xmlhttprequest == 1 && fitonpage_location == "showthread")
{
$('posts').stopObserving('DOMNodeInserted', fitonpage.QRdoResize);
}
fitonpage_topbar_full_wh = fitonpage_topbar_full.sub('%OSIZE%', orig_width+'x'+orig_height);
fitonpage_topbar_full_wh = fitonpage_topbar_full_wh.sub('%RSIZE%', resize_width+'x'+resize_height);
fop_topbar.update(fitonpage_topbar_full_wh);
if($('quick_reply_form') && use_xmlhttprequest == 1 && fitonpage_location == "showthread")
{
$('posts').observe('DOMNodeInserted', fitonpage.QRdoResize);
}
}
else
{
fop_topbar.style.width = topbar_width+'px';
fop_img.style.width = resize_width+'px';
resize_img.style.width = resize_width+'px';
if($('quick_reply_form') && use_xmlhttprequest == 1 && fitonpage_location == "showthread")
{
$('posts').stopObserving('DOMNodeInserted', fitonpage.QRdoResize);
}
fitonpage_topbar_resized_wh = fitonpage_topbar_resized.sub('%RSIZE%', resize_width+'x'+resize_height);
fitonpage_topbar_resized_wh = fitonpage_topbar_resized_wh.sub('%OSIZE%', orig_width+'x'+orig_height);
fitonpage_topbar_resized_wh = fitonpage_topbar_resized_wh.sub('%PERCENT%', resize_percent+'%');
fop_topbar.update(fitonpage_topbar_resized_wh);
if($('quick_reply_form') && use_xmlhttprequest == 1 && fitonpage_location == "showthread")
{
$('posts').observe('DOMNodeInserted', fitonpage.QRdoResize);
}
}
});
$('fop_img'+count).observe('click', function(event){
MyBB.popupWindow(resize_img.src, '', 800, 600);
});
*/
}
}
}
});
if($('quick_reply_form') && use_xmlhttprequest == 1 && fitonpage_location == "showthread")
{
$('posts').observe('DOMNodeInserted', fitonpage.QRdoResize);
}
}
};
Event.observe(window, 'load', fitonpage.init);

2 more questions . First is , when you right click the photo after resize in the post, you can save it to your hard drive at the original size eg:1024x683px that it was uploaded at. Why does it not save at the resized that the script resized it to? .

Second,,How do we get rid of the mouse hover hand that shows when you go over top of the photo with your mouse.

Thanks
Dale

- G33K - Wrote:comment out the entire block by putting /* at the beginning of line 119 and */ and the end of line 155

Thanks, worked like a charm.

Cheers,
Gene

p.s. I also modified the language file.
(2010-12-15, 05:24 PM)Dale Wrote: [ -> ]2 more questions . First is , when you right click the photo after resize in the post, you can save it to your hard drive at the original size eg:1024x683px that it was uploaded at. Why does it not save at the resized that the script resized it to? .

Second,,How do we get rid of the mouse hover hand that shows when you go over top of the photo with your mouse.

Thanks
Dale
For the first part: The picture is not resized per say, it is just constricted by the jscript calculating and assigning a width to it to shrink it. The original picture is always the same there. If you would like the pictures to actually get resized then you need to use the image resizer with GD plugin.

For the second, Line 113/114 of the jscript file, remove
$('fop_topbar'+count).style.cursor = 'pointer';
$('fop_img'+count).style.cursor = 'pointer';

(2010-12-15, 06:56 PM)Gene53 Wrote: [ -> ]
- G33K - Wrote:comment out the entire block by putting /* at the beginning of line 119 and */ and the end of line 155

Thanks, worked like a charm.

Cheers,
Gene

p.s. I also modified the language file.

Glad it worked out for you
Is there a way to exclude certain codes?

It worked fine until I used BuySellAds.com advertisement codes. Even the advertisement images are shrinked. When I used Google AdSense and adBrite I had no problems.

I will keep searching for the solution while waiting for the response. Thank you in advance!
(2010-12-16, 12:02 AM)- G33K - Wrote: [ -> ]
(2010-12-15, 05:24 PM)Dale Wrote: [ -> ]2 more questions . First is , when you right click the photo after resize in the post, you can save it to your hard drive at the original size eg:1024x683px that it was uploaded at. Why does it not save at the resized that the script resized it to? .

Second,,How do we get rid of the mouse hover hand that shows when you go over top of the photo with your mouse.

Thanks
Dale
For the first part: The picture is not resized per say, it is just constricted by the jscript calculating and assigning a width to it to shrink it. The original picture is always the same there. If you would like the pictures to actually get resized then you need to use the image resizer with GD plugin.

For the second, Line 113/114 of the jscript file, remove
$('fop_topbar'+count).style.cursor = 'pointer';
$('fop_img'+count).style.cursor = 'pointer';

Thanks G33K for the great support on this issue, much appreciated!.

Dale
(2010-12-16, 05:07 PM)torchsonghq Wrote: [ -> ]Is there a way to exclude certain codes?

It worked fine until I used BuySellAds.com advertisement codes. Even the advertisement images are shrinked. When I used Google AdSense and adBrite I had no problems.

I will keep searching for the solution while waiting for the response. Thank you in advance!

Any image that is getting resized that you don't want getting resized add class="no_fop" to it.
Or if in posts then insert the image using [imgnoresize][/imgnoresize]
G33K,

Do you have a line of code that you can insert to disable right click to save the image?

Thanks
Dale
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37