PDA

View Full Version : Jake's guide to a "presentable" clickable smilies feature!



Jake Bunce
Thu 5th Apr '01, 11:12pm
I don't know about you guys but I like the old "new thread" and "new reply" templates better. All the javascript is nice but it seems a bit cluttered. So I have spent the last couple hours just tweaking with the clickable smilies feature, and I am quite pleased with the result. This was done on my vB forums running version 2.0 beta 4.1.

The below links are pics of how my "new thread" and "new reply" templates look (forgive the color depth of the gif standard :p ):
http://www.mac-gamer.com/storage/vbsmilies/smilies1.gif
http://www.mac-gamer.com/storage/vbsmilies/smilies2.gif

Here's what I did:

(under the "vB Code Templates")
1. Open the vbcode_buttons template. Delete everything after the first "paragraph" of code that ends with "</style>". Only do this step if you don't want the vB Code row to appear in the "new thread" and "new reply" layouts. Personally, I like it better without all the size, font, and color options as it creates too much clutter. The top "paragraph" of this template contains the necessary javascript for the clickable smilies to even work. The rest is just the code for the vB Code row.

2. Open the vbcode_smilies template and delete everything in it. Then put "$vbcode_smilies_getmore" into the template, excluding the quotes. This gets rid of the table that displays the clickable smilies right in the "new thread" and "new reply" layouts.

3. Open the vbcode_smilies_getmore template and delete everything in it. Then put "<b><a href="javascript:opensmiliewindow(347,280,'$session[sessionhash]')">Clickable Smilies</a></b>" into the template, excluding the exterior quotes. You may want to adjust the "347,280" so the dimensions of the pop up window better fit your smilies table.

(under the "New Posting Templates")
4. Open the newreply template. Scroll down to where you see "$vbcode_smilies". This is the line that calls the vbcode_smilies templates that we just modified. Remove that line.

5. Scroll up in that same template to where you see:

"
See Forum Rules (above) for<br>
more information about what<br>
codes you are allowed to use<br>
in your posts.</smallfont></p></td>
"

Simply modify the last line above and add an couple extra lines underneath so it looks like this:

"
See Forum Rules (above) for<br>
more information about what<br>
codes you are allowed to use<br>
in your posts.<br><br>

$vbcode_smilies

</smallfont></p></td>
"

I like to keep the code visually appealing. If you want to you can just paste the following code right after the "." after "posts" and it will do the same thing:

"
<br><br>$vbcode_smilies
"

6. Do the same thing to the newthread template.

Now when you click on the "Clickable Smilies" link it pops up a new window that displays ALL of your smilies. The functionality is identical to the default set up.

John Harrison
Sat 7th Apr '01, 11:45am
Cheers
This give everyone another choice. :)

boobless
Sat 7th Apr '01, 3:44pm
does this also work on beta 3? causei can't seem to get the 'clickable smilies' link to show up...ah welll its no biggie.

jojo85
Sat 7th Apr '01, 5:26pm
Nice one thx!

Jake Bunce
Sat 7th Apr '01, 6:24pm
I doubt this would work in beta 3 (without serious modifications) since the javascript and accompanying clickable smilies feature wasn't included until beta 4 came out.

boobless
Mon 9th Apr '01, 4:01pm
but what if you already installed the clickable smilie hack?

Jake Bunce
Mon 9th Apr '01, 7:42pm
I couldn't say for sure on that. I've never messed with the clickable smilies hack. If it was me, I would go with vB's implementation of the clickable smilies instead of a hacked version. This way you have a supported implementation that can be molded by modifying the templates. Are you running beta 4?