PM Popup won't show
#21
clear your cache and try again.
#22
Tikitiki Wrote:clear your cache and try again.

I have done, it's still the same :/
#23
Hmm.. Can you send me another PM please.
[Need Smilies? Get Me Smileys!
#24
Christian Wrote:Hmm.. Can you send me another PM please.

Sure, all done.
#25
Hmm. I just applied my code- with CraKteR's bug fix -on my test board and it works. This is weird. Confused
[Need Smilies? Get Me Smileys!
#26
Christian Wrote:Hmm. I just applied my code- with CraKteR's bug fix -on my test board and it works. This is weird. Confused

Shall I just reinstall the whole thing?
#27
I don't think that's necessary, the problem with with this Image resizer plugin...
[Need Smilies? Get Me Smileys!
#28
I think for such a small problem, that it really isn't necessary to reinstall the whole thing. Do you have javascript enabled?

And if I understood correctly, this will work differently in 1.4
#29
As established already, this is a bug or limitation of the Image resizer plugin. Here is a quick and dirty solution I came up with; It appears to work. Remember to revert your functions.php with a fresh copy.

In the plugin file(inc/plugins/imageresizer.php).

Find:
function imageresizer_page($page)
{
	global $mybb;
	// var_dump($mybb);
	if ($mybb->settings['image_resizer_active'] == "yes")
	{
		$page = str_replace('</head>', imageresizer_javascript().'</head>', $page);
		$page = preg_replace('#<body(.*?)>#', '<body onload="resize_images()"$1>', $page);
	}
	
	return $page;
}

Replace with:
function imageresizer_page($page)
{
	global $mybb, $loadpmpopup;
	// var_dump($mybb);
	if ($mybb->settings['image_resizer_active'] == "yes")
	{
		$page = str_replace('</head>', imageresizer_javascript().'</head>', $page);
		$page = preg_replace('#<body(.*?)>#', '<body onload="resize_images()"$1>', $page);
		// Fix for PM popup.
		if($loadpmpopup)
		{
			if(my_substr($_SERVER['PHP_SELF'], -strlen("private.php")) != "private.php")
			{
				$page = str_replace(" onload=\"Javascript:MyBB.newPM()\"", "", $page);
				$page = str_replace("<body onload=\"resize_images()\"", "<body onload=\"resize_images(); Javascript:MyBB.newPM()\"", $page);
			}
		}
	}
	
	return $page;
}

Christian
[Need Smilies? Get Me Smileys!
#30
Christian Wrote:As established already, this is a bug or limitation of the Image resizer plugin. Here is a quick and dirty solution I came up with; It appears to work. Remember to revert your functions.php with a fresh copy.

In the plugin file(inc/plugins/imageresizer.php).

Find:
function imageresizer_page($page)
{
	global $mybb;
	// var_dump($mybb);
	if ($mybb->settings['image_resizer_active'] == "yes")
	{
		$page = str_replace('</head>', imageresizer_javascript().'</head>', $page);
		$page = preg_replace('#<body(.*?)>#', '<body onload="resize_images()"$1>', $page);
	}
	
	return $page;
}

Replace with:
function imageresizer_page($page)
{
	global $mybb, $loadpmpopup;
	// var_dump($mybb);
	if ($mybb->settings['image_resizer_active'] == "yes")
	{
		$page = str_replace('</head>', imageresizer_javascript().'</head>', $page);
		$page = preg_replace('#<body(.*?)>#', '<body onload="resize_images()"$1>', $page);
		// Fix for PM popup.
		if($loadpmpopup)
		{
			if(my_substr($_SERVER['PHP_SELF'], -strlen("private.php")) != "private.php")
			{
				$page = str_replace(" onload=\"Javascript:MyBB.newPM()\"", "", $page);
				$page = str_replace("<body onload=\"resize_images()\"", "<body onload=\"resize_images(); Javascript:MyBB.newPM()\"", $page);
			}
		}
	}
	
	return $page;

Christian

Thanks, works great now!

By the way, you missed a } after return $page Wink


Forum Jump:


Users browsing this thread: 1 Guest(s)