Log in

View Full Version : [My 1st Hack] Smilies Panel


Wayne2k1.com
02-20-2002, 10:00 PM
Soooo...

First of all, I must admit I'm a PHP-newbie...and the installation of this hack is REALLY tricky, but the results are OK, and I think it's worth while :D

Here's my hack. It creates a link just under the usual smilies panel and allows to have a huge amount of smilies, and to order them in folders.

1. Pre-Requisites

You must have this two hacks installed:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=24033
https://vborg.vbsupport.ru/showthread.php?s=&threadid=25888

2. Description of Files in .ZIP

smiliepanel.php - To copy in your root dir.
vbcode.js.txt - A few lines to ADD at bottom of your vbcode.js
blanksmile.gif - A "fake" smile to add in your /images/smilies dir
adv_smilie_*.txt - The templates you have to create
vbcode_smilies_getmore - The template as I have on my vbull.


3. How to install

a. Edit smiliepanel.php

Just after this comment

<!-- Editable Code
Write down the name of the Folder and the link
as in this example:

<a href="smiliepanel.php?smiliepage=2">First Page</a>

IMPORTANT: use "?smiliepage=1" only if linking the index -->

You'll find

<a href="smiliepanel.php?smiliepage=2">First Page</a>

Replace "First Page" with whatever you want to call the first "folder" of your panel.

Do the same thing with

<a href="smiliepanel.php?smiliepage=3">Second Page</a>

and so on. If you have (probably you have :) ) more than 2 folders, just copy&paste the code from line 27 to line 62, as many times as the folders you have.

Then, look for the line

<!-- Smilie Folder #1 -->

and read the instructions above. Just make sure to respect the syntax for the "<a href".

b. Add the lines of code you find in "vbcode.js.txt" at bottom of your vbcode.js

c. Create the templates

adv_smilie_head
adv_smilie_page
adv_smilie_firstalt
adv_smilie_secondalt
adv_smilie_foot
adv_smilie_table
adv_smilie_close

and copy in them the content of the .TXT files.

d. Replace your "vbcode_smilies_getmore" template with the one you find in the .ZIP file.

e. Now...this is the only way I found to do that, and the way it was useful for me, if one of you has something better, pls help :D

Upload the "blanksmile.gif" to your smilies directory. Then go to the admin panel, and add the smile, without giving it replacement text and text.
Then, move the "blank" smile to the last position.

I have 36 smilies installed on my board, and with the "blank" one they become 37.

Then I went to "vBulletin Options", and set "Clickable Smilies Total" to 36. (That means it has always to be your number of smiles, minus one).

f. Upload vbcode.js and smiliepanel.php


That's it.

Comments and suggestions are REALLY appreciated.

:)

WebMasterAJ
02-21-2002, 03:51 PM
Hey, I'll install the hack, but first, do you have any previews or something so I can see how it looks and get a better idea of how it works.

Thanks!

Wayne2k1.com
02-21-2002, 04:32 PM
Sure!

Here's the bottom of the "old" smilies panel

http://www.wayne2k1.com/contents/hack/scr1.jpg

Here's the main page of the panel

http://www.wayne2k1.com/contents/hack/scr2.jpg

And finally a "folder" of smilies

http://www.wayne2k1.com/contents/hack/scr3.jpg

:D

Lesane
02-21-2002, 05:23 PM
Great 'tricky' hack, very nice. Thanks. :up:

cditty
02-22-2002, 02:47 AM
Am I correct in understanding that you have to actually edit the smiliepanel.php file and add ALL the smilies by hand?

Also, where does one get the rightarrow.gif from?

Chris

Wayne2k1.com
02-22-2002, 05:40 AM
Originally posted by cditty
Am I correct in understanding that you have to actually edit the smiliepanel.php file and add ALL the smilies by hand?

Also, where does one get the rightarrow.gif from?

Chris

Yes, that's right.

Whoops...here it is...I'll add it to the .ZIP file asap.

Tnx. :D

cditty
02-23-2002, 02:05 PM
Another question....If we have to manually add each smilie to the template, then why do we need to have the Change the display order of smilies hack? I'm curious.

Chris

Dalius
02-24-2002, 12:18 AM
Hey, can we have it go straight to the Panel instead of clicking on a link to go their?

Wayne2k1.com
02-24-2002, 09:19 AM
Originally posted by cditty
Another question....If we have to manually add each smilie to the template, then why do we need to have the Change the display order of smilies hack? I'm curious.

Chris

Well...basically because I didn't know how to do it...

I'll try to explain.

If you have...for example, 10 smilies INSIDE vbulletin (the ones you add from the admin panel), you won't have the "Get More" text below the panel, right?

Since my hack replaces the "Get More" link under the main smiles panel, you have to add a blank smile to the database, then put it in the LAST place (that's why you need to change the order) and then go to Options --> Clickable Smilies Total --> and change it to the number of your smilies MINUS one...the blank one.

I know it's REALLY tricky, but it's the only way I thought of it :p

Wayne2k1.com
02-24-2002, 09:22 AM
Originally posted by Dalius
Hey, can we have it go straight to the Panel instead of clicking on a link to go their?

Uhmm...

I guess not. Unless you build a "postbit" template including frames, but in this case I guess the javascript won't work.

Erwin
03-01-2002, 11:55 AM
The problem with this hack is that you need the [img] tag enabled. What if you have it disabled? Also, it doesn't integrate with smilies already in the database. Otherwise it looks like a good way to have categories for smilies.

rm -rf /.
03-05-2002, 07:47 AM
As you said: the installation is difficult, but the result is really good.

Thanks :D

tru
03-09-2002, 06:34 PM
nice hack

JulianD
04-07-2002, 11:40 PM
Very nice hack. Thanks

Host Directory
02-10-2003, 10:49 PM
Any demo for this hack or forum system using it?

Wayne2k1.com
02-11-2003, 05:05 AM
Yep... this is a community which I worked for a while...

http://forum.igz.it

I'm moving mine... the panel works fine anyway :D

[ I just don't remember well... but I'm afraid you'll have to register in order to access the "new thread" page, as there are no unregistered-access forums ]

Host Directory
02-11-2003, 05:55 PM
Yes it looks cool, thanks for your quick reply.

Host Directory
02-17-2003, 06:18 PM
If i wanted 3 folders called , Angry , Confused and Cool.

Would i be right in thinking that i would have to create an extra template called adv_smilie_third alt and edit the code like this?


<!-- Smilie Folder Index -->

<?
if ($smiliepage==1) {

eval("dooutput(\"".gettemplate("adv_smilie_head")."\");");
eval("dooutput(\"".gettemplate("adv_smilie_firstalt")."\");");

?>

<!-- Editable Code
Write down the name of the Folder and the link
as in this example:

<a href="smiliepanel.php?smiliepage=2">First Page</a>

IMPORTANT: use "?smiliepage=1" only if linking the index -->

<a href="smiliepanel.php?smiliepage=2">Angry</a>


<!-- /Editable Code -->
</font></td>
</tr>

<?
eval("dooutput(\"".gettemplate("adv_smilie_secondalt")."\");");
?>

<!-- Editable Code
Write down the name of the Folder and the link
as in this example:

<a href="smiliepanel.php?smiliepage=2">Second Page</a>

IMPORTANT: use "?smiliepage=1" only if linking the index -->

<a href="smiliepanel.php?smiliepage=3">Confused</a>

<?
eval("dooutput(\"".gettemplate("adv_smilie_thirdalt")."\");");
?>

<!-- Editable Code
Write down the name of the Folder and the link
as in this example:

<a href="smiliepanel.php?smiliepage=2">Third Page</a>

IMPORTANT: use "?smiliepage=1" only if linking the index -->

<a href="smiliepanel.php?smiliepage=4">Cool</a>

<!-- /Editable Code -->

Host Directory
03-04-2003, 09:49 PM
I have now installed the hack www.hostcompanies.com/forums on vb 2.2.9.

I have heard that one of the prequisit hacks required for this may not work on 2.30 - can anyone confirm this?

Can someone confirm this working on 2.30 - i am looking to upgrade but it really dont want to loose this hack as it took so long to add all the smilies - in fact i still have more smillies to add.

Host Directory
04-07-2004, 02:42 PM
Does anyone know if this hack works in vb3 gold?

I am about to upgrade to vb3 gold and i would like to keep this hack.

Wayne2k1.com
04-07-2004, 04:04 PM
Jeez... I dunno :)

I'm kinda busy working nowadays, but I will try to look at some vB 3 code and post something.

Deal? :)

Host Directory
04-07-2004, 04:31 PM
That would be cool... i would really like to keep this hack. I will be updating the vb3 probably later today or early tommorow.
I doubt it will still work because i get the impression that vb3 has a lot of changes in the code.

Wayne2k1.com
04-07-2004, 05:37 PM
i get the impression that vb3 has a lot of changes in the code.

Definitely :)

Next week, anyway, I think I can start working on it :)

(btw... I installed 3.0 on my board --> www.wayne2k1.com )

Host Directory
04-15-2004, 01:14 AM
Hi Wayne... i had an absoloute nightmare upgrading to vb3, my forums were offline for several days. I finally got them back online but had to revert to a backup sql a couple days before the last one. I think you may have got caught in the timeline... so may have to sign up for my forums again - www.hostcompanies.com/forums .

I still got to do a bit of work ... upload some old graphics and fix some style problems but the forums are back up.

Id love to be able to get smilie panel working on vb3 and if your still interested in porting it over- i had a great idea.

How about... adding a graphic to the quick reply box and when someone clicks on it, it opens the smilie panel . That wouldn't be too hard to do. One thing i always notice is that its anoying you can't use smilies in the quick reply box but your smilie panel would be perfect for that.

What do you think? Good idea?