Log in

View Full Version : Signatures Gallery Hack


all-the-vb
06-11-2004, 10:00 PM
hello everyone :rolleyes:

hack name: Signatures Gallery Hack
vB version: 3.0.1

How the hack works:
It works like a signatures gallery

Features:
1) You can see all signatures instead of going through every member profile to see his signature. So without this hack, if you want to see all signatures then you need to spend hundreds of years, while with this hack you can see them in one page.

2) Members can vote for any signature they like, and number of votes will be beside every signature.

3) You can specify number of signatures that'll be displayed in the page.

4) You have the choice to display the image in the signature, or to be as an address only.

5) You can allow/disallow visitors to vote.

6)You can allow visitors to vote as many as you specify.

7) Detect other features ;)


Note!: all vbcode codes will be enabled automatically.
Except php: code: qute:
since it may distort the page.

if you use this hack don't forgot click https://vborg.vbsupport.ru/ (http://vbulleting.org/forum/vborg_miscacions.php?do=installhack&threadid=66086)

all-the-vb
06-12-2004, 12:54 AM
screen in sig.php :squareeyed:

https://vborg.vbsupport.ru/attachment.php?attachmentid=13495

all-the-vb
06-12-2004, 12:56 AM
screen on admin >>
Signatures Gallery setting

insanctus
06-12-2004, 12:57 AM
Cool idea.... Although would not be used on my site, still nice.

shelaby
06-12-2004, 02:56 PM
Nice Hack, but it doesnt work on my test german board.
I doesnt see any signatures an I get

Warning: Division by zero in d:\apache group1\apache\htdocs\upload\includes\functions.php on line 1707

In my functions.php on line 1707 is this:
$totalpages = ceil($results / $perpage);

cirisme
06-12-2004, 03:15 PM
There are some problems with this hack...

First, the page navigation is screwy. Also, why is eregi_replace being used instead of the (faster) preg functions? In fact, why not just use vB's bbcode parser... much easier that way.

There are some security and performance issues, too. Like, this:

$query =$DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user");
if($DB_site->num_rows($query) > 0)
{
$do = '1';
}

Doing this loads up the enite userbase into memory... not nice. Try this instead:

$query = $DB_site->query_first('SELECT count(*) AS count FROM ' . TABLE_PREFIX . 'user');

if($query['count'] > 0) {
$do = '1';
}

Of course this doesn't address why this is necessary in the first place, since this query will ALWAYS set $do to 1, since there is always at least one user in the database. Best to just remove that altogether, imo.

There is also this:

$query =$DB_site->query("SELECT sigrate FROM " . TABLE_PREFIX . "user");
while($r =$DB_site->fetch_array($query))
{
$sign = $r[sigrate];
}
$nvote = $sign.' '.Addslashes($v);

Which is just as inefficient as the above query and I can't for the life of me figure out what it is trying to do, maybe I'm just missing it....

Finally, $query =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET sigrate=sigrate+1 where userid='$v'");

Really needs to be

$query =$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET sigrate=sigrate+1 where userid='" . intval($v) . "'");

for obvious reasons. I just spent the last half hour fixing this stuff so I thought you might want to incorporate the changes. ;)

Cool idea, though. :)

GamerJunk.net
06-12-2004, 08:19 PM
Cool idea, I'll definatley use this on my site.

all-the-vb
06-13-2004, 10:28 AM
insanctus & RasMasta
thank you

shelaby
use this link:
sig.php?&page=1&pp=2

cirisme
thank you for tell me
thank you for tell me
and you tell alright.

you can see i use query_first
but in the code i take this in other my program and i do that in fast.
AND
$nvote = $sign.' '.Addslashes($v);
because i got idea to show how
rate this user.

to reply in english i want 1 hour :ermm: ,sorry for my english

shelaby
06-13-2004, 05:25 PM
Thank you for you help.
But now a have others problems. If I click vote the php load "sig.php" and not "sig.php?&page=1&pp=2".
I doesnt see the navbar, but in the template sigrate is the navbar loading, but i didnt see her.
And how I could all votings set of siro, that the users can vote new.

Sorry for my terrible engisch :nervous:
VLG Shelaby

BoNfiRe
06-13-2004, 05:49 PM
having a few problems with the template it's well see for yourself here (http://forums.tlgn.com/sig.php?&page=1&pp=20).

I have been messing but not sure why it's doing that. Also i'm getting the following error when I go to mysite.com/forum/sig.php
Division by zero in /home/forums/includes/functions.php on line 1707

B

shelaby
06-13-2004, 06:17 PM
If I click vote the php load "sig.php" and not "sig.php?&page=1&pp=2".


I have in the sig.php the URL "$url="sig.php";" change into this "$url="sig.php?&page=1&pp=2";" Now its working! :squareeyed:

But how I could reset the votings and why I didnt see the Navbar?

@Bonfire

use this link:
sig.php?&page=1&pp=2

all-the-vb
06-13-2004, 08:33 PM
shelaby

i see the navbar its workig but in
total member have Signatures > perpage

BoNfiRe
06-14-2004, 07:59 AM
@Bonfire

I have allready read this post, and the readme and made the changes sig.php?&page=1&pp=xx and I still get the error, and this doesn't really help my template lol

kolorom
06-15-2004, 08:11 PM
Invalid SQL: ALTER TABLE user ADD `sigrate` VARCHAR(100) NOT NULL
mysql error: Duplicate column name 'sigrate'

What i must to do help please I edit sig.php but cannot install 8(

BoNfiRe
06-15-2004, 10:57 PM
I think that means that the table ADD allready has the field 'sigrate' in it either u installed something that uses that field allready or have u run the installer twice ?

kolorom
06-16-2004, 04:29 AM
Maybe but when i first install i have that problem from begining 8(

Can you give me only SQL source for add to mysql database becose in setup script i really nothing understand 8( so bad ...

msimplay
06-16-2004, 06:23 AM
the hacks a good idea but it doesn't seem to convert the forums bbcode properly
people had the center tag in it and it didn't convert into bbcode
instead i saw the tags