Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Signature Image Size Limiter Details »»
Signature Image Size Limiter
Version: 1.0.2, by Chris M Chris M is offline
Developer Last Online: Feb 2013 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 06-14-2005 Last Update: 10-21-2005 Installs: 316
Uses Plugins
 
No support by the author.

[high]Installation Instructions[/high]

Step 1: Upload the .xml file to the Product Manager
Step 2: Alter the plugin code variables to reflect your signature image limits in height and width
Step 2: Click [high]INSTALL[/high]

[high]Credits[/high]
Zero Tolerance - For helping with the regex and troubleshooting my annoying problems

[high]Updates[/high]
1.0.1 - Nothing major, just removed some code that is not needed

To remove this without re-uploading the plugin, find in your plugin code:
PHP Code:
print_r($imginfo); 
and remove it - I put this in there for testing purposes and forgot to remove it

1.0.2 - This is just a bug fix update

Find in the plugin code:
PHP Code:
$this->registry->options['allowdynimg'
replace with:
PHP Code:
$vbulletin->options['allowdynimg'
As always, no need to upload the new plugin if you apply the fix directly to your plugin code

Chris

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 07-06-2005, 11:26 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Keeper
Exactly where do you add an "Error Message" phrase? I've looked in the phrases manager and can't find any category for Error Messages to add the phrase into.
There should be a phrasegroup called "Error Messages" beneath or above (I forget) the "Front-end Redirect" phrasegroup...

If you upgraded from 3.0.x you may have it named as "Front-end Error Messages" as the upgrade didn't (not sure about the Beta 3 one ) update the phrasegroup name

Satan
Reply With Quote
  #33  
Old 07-07-2005, 03:52 PM
Alrasam Alrasam is offline
 
Join Date: Jan 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #34  
Old 07-08-2005, 10:32 AM
BuRNZau BuRNZau is offline
 
Join Date: Mar 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great! thanks.
Reply With Quote
  #35  
Old 07-10-2005, 02:44 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it be possible to place the error in to vBulletin's $errors[] array in profile.php instead of printing the error in a separate standard_error page? I guess I'm a perfectionist, but I used to have it this way with 3.0.7 and I'm still struggling with the plugin system myself..
Reply With Quote
  #36  
Old 07-10-2005, 03:51 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
Would it be possible to place the error in to vBulletin's $errors[] array in profile.php instead of printing the error in a separate standard_error page? I guess I'm a perfectionist, but I used to have it this way with 3.0.7 and I'm still struggling with the plugin system myself..
It's worth a try

Try replacing, in the plugin:
PHP Code:
eval(standard_error(fetch_error('signaturetoobig'))); 
with:
PHP Code:
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig'$maxsigwidth$maxsigheight); 
Then alter your phrase to something like:
Quote:
Your signature image size is too large. The maximum dimensions are $maxsigwidth by $maxsigheight.
Dunno if it will work - Should do but I haven't had enough time to check out the fetch_error array or how it functions

Satan
Reply With Quote
  #37  
Old 07-10-2005, 05:21 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately it didn't work, and was pretty close to what I'd tried already..

This is the function fetch_error (in includes/functions.php):
Code:
// #############################################################################
/**
* Fetches an error phrase from the database and inserts values for its embedded variables
*
* @param	string	Varname of error phrase
* @param	mixed	Value of 1st variable
* @param	mixed	Value of 2nd variable
* @param	mixed	Value of Nth variable
*
* @return	string	The parsed phrase text
*/
function fetch_error()
{
	$args = func_get_args();

	// Allow an array of phrase and variables to be passed in as arg0 (for some internal functions)
	if (is_array($args[0]))
	{
		$args = $args[0];
	}

	if (!function_exists('fetch_phrase'))
	{
		require_once(DIR . '/includes/functions_misc.php');
	}

	$args[0] = fetch_phrase($args[0], PHRASETYPEID_ERROR, '', false);

	if (sizeof($args) > 1)
	{
		return call_user_func_array('construct_phrase', $args);
	}
	else
	{
		return $args[0];
	}
}
This is the function of the array, $errors (in profile.php):
Code:
		if (is_array($errors))
		{
			$errorlist = '';
			foreach ($errors AS $key => $errormessage)
			{
				eval('$errorlist .= "' . fetch_template('newpost_errormessage') . '";');
			}
			$show['errors'] = true;
		}
I could easily do it editing the source file, but I'd like to try and get my head around this darned Plugin system with hooks.. Hopefully I'm not the only one struggling with it? :nervous:
Reply With Quote
  #38  
Old 07-10-2005, 05:40 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
Unfortunately it didn't work, and was pretty close to what I'd tried already..

This is the function fetch_error (in includes/functions.php):
Code:
// #############################################################################
/**
* Fetches an error phrase from the database and inserts values for its embedded variables
*
* @param	string	Varname of error phrase
* @param	mixed	Value of 1st variable
* @param	mixed	Value of 2nd variable
* @param	mixed	Value of Nth variable
*
* @return	string	The parsed phrase text
*/
function fetch_error()
{
	$args = func_get_args();

	// Allow an array of phrase and variables to be passed in as arg0 (for some internal functions)
	if (is_array($args[0]))
	{
		$args = $args[0];
	}

	if (!function_exists('fetch_phrase'))
	{
		require_once(DIR . '/includes/functions_misc.php');
	}

	$args[0] = fetch_phrase($args[0], PHRASETYPEID_ERROR, '', false);

	if (sizeof($args) > 1)
	{
		return call_user_func_array('construct_phrase', $args);
	}
	else
	{
		return $args[0];
	}
}
This is the function of the array, $errors (in profile.php):
Code:
		if (is_array($errors))
		{
			$errorlist = '';
			foreach ($errors AS $key => $errormessage)
			{
				eval('$errorlist .= "' . fetch_template('newpost_errormessage') . '";');
			}
			$show['errors'] = true;
		}
I could easily do it editing the source file, but I'd like to try and get my head around this darned Plugin system with hooks.. Hopefully I'm not the only one struggling with it? :nervous:
Yes with the source code it should be easy to modify, and in theory it should work with the plugin :ermm:

Satan
Reply With Quote
  #39  
Old 07-10-2005, 09:00 PM
jesus likes pie jesus likes pie is offline
 
Join Date: Apr 2005
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is an ownage hack defianed


[high]* jesus likes pie clicks installed
[/high]


......hey....the /me hack works and we're runnign beta 3! ERWIN HOW DO I GET /ME FOR MY BETA?!
Reply With Quote
  #40  
Old 07-10-2005, 10:40 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin.org is running on of the 3.0.x releases, not a 3.5.0 Alpha, Beta, Gamma, RC or Gold release

Satan
Reply With Quote
  #41  
Old 07-12-2005, 01:27 AM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

* installs * great work ... hmmm, have you met your nemesis, heavengod?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:28 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10284 seconds
  • Memory Usage 2,323KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (5)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete