vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Usercp Signature Preview (https://vborg.vbsupport.ru/showthread.php?t=40402)

Kinox 06-27-2002 10:00 PM

Usercp Signature Preview
 
vbhacker v1.0.2 file

*Usercp Signature*

- Limit limitations on register new user
- Limit limitations on usercp after user register
- Preview sig in usercp
- Limit lines in sig
- Limit images in sig
- Limit width
- Limit height

Enjoy

NOTE:
Limit width/height only works on .gif, .jpg, .jpeg, and so on... not on .txt, .php, .cgi, .html and so on... if user might use them in [img ] [/img ] tag...

Limits to limit extensions will come in future...

UPDATED October 3
Added signature.mass.delete.php - Add that to your /admin, and run it only if you want all signatures deleted, it will erase all signatures in your database if you want limits to be set on existing registered users...

LATEST VERSION DOWNLOAD:
https://vborg.vbsupport.ru/attachmen...&postid=266936
-------------------------------------------------------------------------
Check out http://nekio.com.
Check out http://hololith.com - my personal website.

Kinox 06-28-2002 02:09 PM

UPDATED 10/03/02

Sparkz 06-28-2002 02:13 PM

Please include textfiles of your hacks too...

Kinox 06-28-2002 02:31 PM

screen2

Lesane 06-28-2002 02:43 PM

Your instructions says:

PHP Code:

+-------------------------------------------------------------------------------------------------+
Create a new template named "hl_signature_usercp" with this:                                    |
+-------------------------------------------------------------------------------------------------+
&
lt;table cellpadding="0&quotcellspacing="0&quotborder="0&quotbgcolor="#0A293E"  width="100%" align="center"><tr><td>
<table cellpadding="4&quotcellspacing="1&quotborder="0"  width="100%">
&
lt;tr id="cat">
    &
lt;td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="5" nowrap><normalfont color="#000000"><b>Signature Preview</b></normalfont></td>
</tr>
&
lt;tr>
    &
lt;td bgcolor="#1C5780" valign="top"><smallfont>
$previewsignature
</smallfont>
&
lt;/td>
&
lt;/tr>
&
lt;/table>
&
lt;/td></tr></table>
+-------------------------------------------------------------------------------------------------+ 

;)

It's more &alt & & quot then real code :D

Velocd 06-28-2002 02:54 PM

Great hack Kinox! I love the signature limits on it. :)

The only suggestion I can make, a general miss by many hackers, is to make sure you include any custom templates into the $templatesused=''; list to prevent extra queries.

Velocd 06-28-2002 03:17 PM

Hmm..well, I just really installed it right now and I'm a bit confused on why you do this:
Code:

$userinfo=$DB_site-&(gt;query_first(&*quot;
    SELECT signature
    FROM user
          WHERE userid=$bbuserid
          LIMIT 1
          ");

You have &*quot (wo/asterik) codes in here and it's screwing up the thing, is there a reason you inserted this?

Chris M 06-28-2002 03:21 PM

He probably tried to do it with some sort of Web Dev package...

Satan

Velocd 06-28-2002 03:25 PM

That's my guess, it's alittle annoying to fix though...I'll try to post some instructions up without these HTML thingies..

Chris M 06-28-2002 03:27 PM

Cool thanks:)

Satan

Velocd 06-28-2002 03:30 PM

His VBHacker file is also quite corrupted towards the end, when you generate a text file that is. although it is minus the html codes..

Velocd 06-28-2002 03:59 PM

Ok! Here is a "working" version (attached). I'm not sure why the code was so screwed up, luckily in both the vbhacker and text he attached above the queries were not screwed up..interestingly enough...hopefully he didn't do this on purpose :lick:

Floris 06-28-2002 06:40 PM

hey
this is nice
fnx for sharing :)

Chris M 06-28-2002 07:05 PM

Lol...

Thanks Velo:)

Satan

bonnmac 06-28-2002 09:11 PM

Works Great! Thank you.

Keta 06-29-2002 12:46 AM

<---installing now...this should of been done a long time ago... lol

Kinox 06-29-2002 04:01 AM

yeah I seem to forget that...

Quote:

Originally posted by Velocd
Great hack Kinox! I love the signature limits on it. :)

The only suggestion I can make, a general miss by many hackers, is to make sure you include any custom templates into the $templatesused=''; list to prevent extra queries.


Mathiau 06-29-2002 04:52 AM

great work, will try to put this in now!

Bugz 06-29-2002 05:42 AM

+-------------------------------------------------------------------------------------------------+
Create a new template named hl_signature_usercp
+-------------------------------------------------------------------------------------------------+
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr id="cat">
<td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="5" nowrap><normalfont color="#000000"><b>Signature Preview</b></normalfont></td>
</tr>
<tr>
<td bgcolor="#1C5780" valign="top"><smallfont>
$previewsignature
</smallfont>
</td>
</tr>
</table>
</td></tr></table>
+-------------------------------------------------------------------------------------------------+

and

+-------------------------------------------------------------------------------------------------+
Create a new template named hl_signature_usercpno
+-------------------------------------------------------------------------------------------------+
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr id="cat">
<td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="5" nowrap><normalfont color="#000000"><b>Signature Preview</b></normalfont></td>
</tr>
<tr>
<td bgcolor="#1C5780" valign="top"><smallfont>
You have no signature at the moment.
</smallfont>
</td>
</tr>
</table>
</td></tr></table>
+-------------------------------------------------------------------------------------------------+

have it linking to vb.org what sould that be ?

Smoothie 06-29-2002 06:00 AM

Quote:

Originally posted by Velocd
Great hack Kinox! I love the signature limits on it. :)

The only suggestion I can make, a general miss by many hackers, is to make sure you include any custom templates into the $templatesused=''; list to prevent extra queries.

Can you tell me what to add and where? Need to reduce as many queries as possible. :)

Smoothie 06-29-2002 06:04 AM

BTW, excellent hack! And Velocd, thanks for the translation. :)

tkeil69575 06-29-2002 06:11 AM

Hi Kinox,
great hack, thank you!

I installed it this morning and the preview is working fine, but the limit checking of images and number of lines isnt. Any ideas what might be wrong.

i did create the error templates and the cp is showing up the limit settings, but its just not taking effect.

tina

ps. and yes i've double checked member.php

Kinox 06-29-2002 06:23 AM

look at the files in the ....+fix+.rar

<tr id="cat">
<td bgcolor="{ categorybackcolor }" colspan="5" nowrap><normalfont color="{ categoryfontcolor }"><b>Signature Preview</b></normalfont></td>
</tr>

Quote:

Originally posted by Bugz
have it linking to vb.org what sould that be ?

Kinox 06-29-2002 06:26 AM

it works, I have tested it on vb 2.2.6...

please DL

..+fix+.rar

it has all the files needed, that includes .txt file... v1.1

Quote:

Originally posted by tkeil69575
Hi Kinox,
great hack, thank you!

I installed it this morning and the preview is working fine, but the limit checking of images and number of lines isnt. Any ideas what might be wrong.

i did create the error templates and the cp is showing up the limit settings, but its just not taking effect.

tina

ps. and yes i've double checked member.php


Smoothie 06-29-2002 06:33 AM

Could you possibly zip that file? I can't open rar files.

ForKmaN 06-29-2002 06:38 AM

Yeha me either, I tried to open the rar but it was corrupt, zip would be nice please :)

Kinox 06-29-2002 06:43 AM

zip

Kinox 06-29-2002 06:46 AM

<font size="3">BTW dont use "Velocd" file, its wrong</font>

Smoothie 06-29-2002 06:56 AM

Quote:

Originally posted by Kinox
BTW dont use "Velocd" file, its wrong
I did, whats wrong with it?

Kinox 06-29-2002 07:05 AM

templates, file changes, mysql seems to look fine...

Quote:

Originally posted by Smoothie
I did, whats wrong with it?

Smoothie 06-29-2002 07:22 AM

ok, cool. It works fine too :) Your 2 templates had the replacement variables, his didn't.

Bugz 06-30-2002 07:08 AM

Quote:

Originally posted by Kinox
look at the files in the ....+fix+.rar

<tr id="cat">
<td bgcolor="{ categorybackcolor }" colspan="5" nowrap><normalfont color="{ categoryfontcolor }"><b>Signature Preview</b></normalfont></td>
</tr>



ok cool works perfect on 2.2.6



it'd be cool for this to be in 3.0

*:Clicks Install:*

Smoothie 06-30-2002 03:24 PM

I'm getting this error, but only from this user:
PHP Code:

Invalid SQL
    
SELECT signature
    FROM user
       WHERE userid
=
       
LIMIT 1
       
mysql error
You have an error in your SQL syntax near 'LIMIT 1
       ' 
at line 5

mysql error number
1064 


Kinox 06-30-2002 03:46 PM

its not my code... threre is no

PHP Code:

    SELECT signature
    FROM user 

querie...

Smoothie 06-30-2002 03:55 PM

I see it right in your install file:
In usercp.php, replace this code:
PHP Code:

// main page: 

With this code:
PHP Code:

// main page:

// ############################### start signature preview ###############################
// ?hololith.com (NanoEntity)
$userinfo=$DB_site->query_first("
    SELECT signature
    FROM user
       WHERE userid=
$bbuserid
       LIMIT 1
       "
);

if (
$allowsmilies==1) {
    
$smiliesonoff=$ontext;
} else {
    
$smiliesonoff=$offtext;
}

if (
$userinfo[signature]) {
       
// format signature
    
$signature=htmlspecialchars($userinfo[signature]);
    
$previewsignature=bbcodeparse($signature,0,$allowsmilies);

    
// display signature
    
eval("\$siglist = \"".gettemplate("hl_signature_usercp")."\";");
} else {
    
// no signature, display
    
eval("\$siglist = \"".gettemplate("hl_signature_usercpno")."\";");



Kinox 07-01-2002 06:09 AM

oh hehe, forgot... was 12am when I made that post, I was tired...

I will update the zip in few min...

ForKmaN 07-01-2002 06:22 AM

did you update it yet? :)

Kinox 07-01-2002 06:31 AM

yes its updated now, v1.2

post #1

Bugz 07-01-2002 08:01 AM

i dont get it..

whats updated ?.

i have no problems with it. is there anyway you could have a upgrade .txt ?

Kinox 07-01-2002 08:09 AM

I removed from usercp.php

$userinfo querie
and allowsmilies

and changed some vars in
PHP Code:

// ############################### start signature preview ############################### 

+ updated html code to hl_signature_usercp, and hl_signature_usercpno

so it looks like in the screenshot


All times are GMT. The time now is 04:57 AM.

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.01412 seconds
  • Memory Usage 1,843KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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