PDA

View Full Version : Custom Button


Hwulex
07-11-2002, 10:00 PM
_/?\_/?\_/?\_/?\_/?\_/?\_/?\_/?\_/?\_

Custom Button Hack
Version 1.2

By Hwulex
[Hwulex@Hwulex.com]

?\_/?\_/?\_/?\_/?\_/?\_/?\_/?\_/?\_/?


History
======
I've made this hack because, although we all have signatures to put a custom tag on our posts, I often use a short name sig on a lot of my posts as well.
Typing [ b]w00[ /b] was becoming tedious after a while, and I thought it would be good to have a quick-key shortcut to do it for me.

The Custom button can be used by clicking it, or the shortcut key [Alt+m]. It will insert the text to your message the same as a smilie is, at the end of the message. To change your custom text, goto your UserCP -> Options, down the bottom.


Contents
========
Contained in the .zip file are two images, and instructions.txt (this file)
- instructions.txt -> Instructions for hack installation
- usercp.jpg -> Shows what your User CP will look like after installation
- reply.jpg -> Shows how the hack is used on the forum


Use
====
Tested on vBulletin 2.2.6

Files to modify:
- vbcodelanguage.js
- private.php
- calendar.php
- member.php
- newthread.php
- newreply.php
- editpost.php
- admin/functions.php

Templates to modify:
- vbcode_buttons
- modifyoptions
- modifyoptions_stylecell

Estimated Install Time: 6 minutes


NB: If you do install this hack, please replya here, your comments are appreciated. Please also click on the INSTALL button. You will receive updates in your e-mail whenever I add new features to it. Also post a reply with your comments, they are appreciated.


Updates
========
[1.1] Added instructions for calendar.php
[1.2] Added instructions for private.php


Please clear your cache and download the new file attatched!

Hwulex
07-12-2002, 04:19 PM
Demo screenshots of the hack:

Hwulex
07-12-2002, 04:20 PM
Second image:

Velocd
07-12-2002, 05:06 PM
Talk about extreme laziness ^_^
Looks interesting, if I can find any use to it..

John
07-12-2002, 05:34 PM
* JohnWarwick dances

Looking good, I'll install it later on :)

VeRT3X
07-12-2002, 07:18 PM
knowing that my users dont use the reply, damn quick reply there is no need for it, nice idea though :)

Neo
07-12-2002, 08:59 PM
NICE ONE BROTHER!!!!!

Boofo
07-13-2002, 02:48 AM
How about a drop down box so you can have multiple items in it? :)

SaintDog
07-13-2002, 04:44 AM
Very nice, I quickly grow tire of doing the same thing in other forums (call me lazy).

Good Job!

- SaintDog

PET
07-13-2002, 06:37 AM
This is very greate ! 10q Hwulex

Hwulex
07-13-2002, 10:45 AM
UPDATED!

Hi guys. Just to let you know Custom Button is now version 1.1. I've added support for the Calendar. Before, if you look went to post an event on the calendar there's a missing argument error, and the button doesn't work. This is fixed in v1.1.

Regards.



Originally posted by Boofo
How about a drop down box so you can have multiple items in it? :)

Hi Boofo.
That's a possibility, thanks for the suggestion. I'm currently looking at also making it multi-line, but it doesn't seem to like it because of the inserting using JS.

Boofo
07-13-2002, 10:52 AM
Great! I'll be looking forward to it. :) Also, if you made a drop down box, you really wouldn't need multi-line. They can use as many lines from there as they need. :)

Originally posted by Hwulex
Hi Boofo.
That's a possibility, thanks for the suggestion. I'm currently looking at also making it multi-line, but it doesn't seem to like it because of the inserting using JS.

ULTIMATESSJ
07-13-2002, 11:27 AM
great hack, good for the lazy ones

/me clicks install

Hwulex
07-13-2002, 11:59 AM
Sorry about this, but I've updated again to 1.2, now includes instructions for private.php because it didn't work with the PM system.

Regards.

StealthAnime
07-13-2002, 12:17 PM
very nice hack!. now i dont need to type 'Greetz - myname' all the time i just hit a buttom :D

great work :)

PET
07-13-2002, 03:54 PM
Boofo itea is cool ! Now this hack is greater ! :)

Dean C
07-13-2002, 04:41 PM
this is a fantastic idea... i will probably install this later :D

Boofo
07-17-2002, 05:19 PM
I'm getting the following error when ever I go to edit my signature.

Warning: Missing argument 1 for getcodebuttons() in /home/boofo/public_html/forum/admin/functions.php on line 2360

That line contains this code below:


Line 2359 // ###################### Get Code Buttons #######################
Line 2360 function getcodebuttons ($cbutton) {
Line 2361 global $vbcodemode,$vbcode_smilies;

I'm also getting this error when I click on the submit button to save the signature.

Warning: Cannot add header information - headers already sent by (output started at /home/boofo/public_html/forum/admin/functions.php:2360) in /home/boofo/public_html/forum/sedit.php on line 168

And then the page just goes white.

I am using the sig editor hack by tubedogg. Any ideas why this might be happening?

Hwulex
07-17-2002, 07:44 PM
Not sure on the sig editor hack. But at a guess, does it use the vB Code buttons?

If it does, there lies the problem.

Where his hack calls:
$vbcode_buttons = getcodebuttons();

Replace with:

$cbutton = $bbuserinfo[cbutton];
$vbcode_buttons = getcodebuttons($cbutton);
And you should be ok (I hope).

If that's not it, give me another shout and I'll take a look at tubedoggs hack and work out what's up :)

Boofo
07-18-2002, 04:12 AM
Hwulex,

Please check the link out below. I didn't want to double post this here, too, to clutter up the thread. The fix stopped the error, but now I am having major problems with it. Please let me know if there is anything we can do to fix this. :)

https://vborg.vbsupport.ru/showthread.php?postid=273740#post273740