vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Signature Image Size Limiter (https://vborg.vbsupport.ru/showthread.php?t=83146)

Chris M 07-06-2005 11:26 AM

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 :p) update the phrasegroup name ;)

Satan

Alrasam 07-07-2005 03:52 PM

Thank you:)

BuRNZau 07-08-2005 10:32 AM

Works great! thanks. :)

Oblivion Knight 07-10-2005 02:44 PM

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.. :(

Chris M 07-10-2005 03:51 PM

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 :p

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 :p

Satan

Oblivion Knight 07-10-2005 05:21 PM

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:

Chris M 07-10-2005 05:40 PM

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

jesus likes pie 07-10-2005 09:00 PM

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?! :(

Chris M 07-10-2005 10:40 PM

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

Satan

yinyang 07-12-2005 01:27 AM

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


All times are GMT. The time now is 01:35 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.01181 seconds
  • Memory Usage 1,763KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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