Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #91  
Old 03-27-2005, 01:59 AM
djwins djwins is offline
 
Join Date: Jan 2005
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

perfect timing...i just switched to VB today!
Reply With Quote
  #92  
Old 03-27-2005, 05:35 PM
alexi alexi is offline
 
Join Date: Feb 2002
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't wait to see this released...
Reply With Quote
  #93  
Old 03-28-2005, 04:40 AM
Darmak Darmak is offline
 
Join Date: Jun 2004
Location: M?xico
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by why-not
So what do you think, (1) or (2)
Option 2

Yep, yep =D :squareeyed:
Reply With Quote
  #94  
Old 03-28-2005, 06:49 AM
kyzen's Avatar
kyzen kyzen is offline
 
Join Date: Nov 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL, I just got this PM over at vbulletin.com:

Quote:
Originally Posted by Steve Machol
Could you please view the vBulletin Forum Rules about signatures and modify yours so it follows the posted rules:



Quote:
Signature Limits



All signatures should not exceed the following size limits, and you can't have both text and images

For text signatures: 4 lines normal size, 8 lines small size and up to 90 chars per line. Font sizes above 2 are not allowed. (Blank lines count as lines.)
For images in signatures: 1 image up to 300 pixels wide, 125 pixels tall and 20k in size
Animated images in sigs are not allowed
Thanks,

Steve
So I replied:

Quote:
Originally Posted by kyzen
Those rules are pretty cool and all... but if you guys would just hurry up and incorporate this https://vborg.vbsupport.ru/showthread.php?t=61239 then you wouldn't have to police it Just food for thought Steve
Reply With Quote
  #95  
Old 03-28-2005, 07:51 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kyzen
LOL, I just got this PM over at vbulletin.com:
So I replied:
LOL what a way to get noticed :devious:
Reply With Quote
  #96  
Old 03-28-2005, 12:48 PM
Julie's Avatar
Julie Julie is offline
 
Join Date: Mar 2005
Location: Oslo, Norway
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been looking for something like this myself, so a HUGE thanks to Sonia for coding this Can't wait to see this released either!
Reply With Quote
  #97  
Old 03-28-2005, 03:49 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Everyone...

Thanks for the input on the database question, I will use (2) as the way of doing the edit!

One other question!

image = height / width!

Lets say a image 200 pixles in width!

My question...

What should I use as a rule to convert ( number of pixels = 1 character)

What I mean...

Say a smilies is 15X15, height/width, and the font size is 10 pixles

So if I divided ( 15 / 10 ) then that smilie would = 1.5 characters!

So that is my question... (what should be the divider? 10 or maybe the size between the minimum and maximum allowed)!

I'll give you a idea of why I am asking!

After a signature has been validated, there is a chance that a line will have image(s) and text together....

Like so.....

this was a very sunny day [image]100X400[/image] and I enjoyed it very much! [image]100X400[/image]

The maximum line length is 120!

The example line above is ( 55 characters + ( 400/10 = 40) + (400/10 =40)

So it ends up being 135 characters, (15) over the limit, so if that happens, we do this!

reverse the string if we have more than one image, then line break it. The result!

this was a very sunny day [image]100X400[/image] and I enjoyed it very much!
[image]100X400[/image]


This way signatures never push the forum into a scroll view! Note this is a option that you can turn on or off...

Here is the function that does this!

Code:
/* this is only called to do line breaks on images with text (admin option) */

function sig_last_process ( $str, $uo )
{
	/* get each line */

	$lines = preg_split ( '#\r?\n#', $str );

	/* get the smilies they are waiting for us, static */

	$sc = sig_smilies ();

	/* the maximum line length */

	$line = $uo['line'];

	/* all the images in this signature in a nice array */

	$each = $uo['img'];

	/* loop de loop, easy stuff (lines loop) */

	for ( $i = 0; $i < sizeof ( $lines ); $i++ )
	{
		/* set are values, reset them for each line */

		$lc = 0;
		$it = 0;
		$hold = array ();
		$temp = $lines[$i];

		/* check if we find a image in this line */

		for ( $j = 0; $j < sizeof ( $each ); $j++ )
		{
			if ( ( $is = substr_count ( $lines[$i], $each[$j][0] ) ) > 0 )
			{
				/* found a image convert from pixels to characters */

				$it += ceil ( ( ( $is * $each[$j][2] ) / 10 ) );

				/* remove the image and all of it's bbcode or html if it's on */

				$temp = preg_replace ( '!\[.*' . $each[$j][0] . '\[\/.*\]|\<.*' . $each[$j][0] . '.*>!is', '', $temp );

				/* load the remember array with this image. (used to do the line break loop) */

				$hold[] = $each[$j][0];

				/* loop the smilies and count them as we go */

				for ( $k = 0; $k < sizeof ( $sc['text'] ); $k++ )
				{
					if ( ( $ts = substr_count ( $temp, $sc['text'][$i] ) ) > 0 )
					{
						/* found a smile get it's height/width and convert it to total characters */

						// I am going to kill this, and just add the sizes to the smiliescache

						$ss = getimagesize ( './' . $sc['code'][$sc['text'][$i]][0] );

						$lc +=  ceil ( ( ( $ss[0] * $ts ) / 10 ) );

						/* remove this smilie so it does not count into the character count */

						$temp = sig_remove_smilie ( $temp, $sc['text'][$i] );

					}
				}
			}
		}

		/* done with this line, do we have a image? */

		if ( ! empty ( $it ) )
		{
			/* we need to remove URL bbcode so it does not play into the character count */

			$temp = preg_replace ( '!\[url=.*\]|\[\/url\]|\<a.*\>|\<\/a\>!is', '', $temp );

			/* the total character in this line (images converted to characters, and real characters left in the line */

			$total = ( strlen ( $temp ) + $it + $lc );

			/* loop the line add the line break where it is needed */

			if ( $total > $line )
			{
				for ( $l = 0; $l < sizeof ( $hold ); $l++ )
				{
					$lines[$i] = preg_replace ( "!(\[.*" . $hold[$l] . "\[\/.*\]|\<.*" . $hold[$l] . ".*\<\/a\>)!is", "\r\n\\1", $lines[$i] );
				}
			}
		}
	}

	/* all done, give the signature back to the update user signature function */

	// another signature that passed the test, !!YA!!

	return ( implode ( "\r\n", $lines ) );
}

demo will finally be up tomorrow morning, beta release for sure sometime tomorrow!


Sonia
Reply With Quote
  #98  
Old 03-28-2005, 09:45 PM
Protoman's Avatar
Protoman Protoman is offline
 
Join Date: Jan 2005
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sounds like you solved your own problem.
Reply With Quote
  #99  
Old 03-31-2005, 03:44 PM
BPnet's Avatar
BPnet BPnet is offline
 
Join Date: Mar 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of this being released soon? It looks like you just about got it nailed down several days ago. Thanks for coding this much-needed hack!
Reply With Quote
  #100  
Old 03-31-2005, 08:13 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BPnet
Any chance of this being released soon? It looks like you just about got it nailed down several days ago. Thanks for coding this much-needed hack!
I final have the public demo up... (you can try it!)

http://forum.ya-right.com/index.php?

you need to create an account to demo the control, no validation needed!


I will be releasing it on Sunday, I just need to finish a few minor things (more phrases) for the extra stuff I added and the (help system / Forum Facts) needs to be updated to add the information for the new options!


I think I may have went a little over board, but total control you will have!!!


c, ya...

Sonia
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:51 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.14542 seconds
  • Memory Usage 2,270KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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