PDA

View Full Version : Hyphen Hack


FleaBag
21 Jun 2002, 14:08
Well here it is, my 2nd hack - Hyphen Hack! It only took about half an hour to make, it's very simple but very useful [well, at least I think it is ;)].

What's it do?

If you want to replace the hyphen [ the - symbol ] in the <title> tag of your vBulletin styles [the part that appears at the top of your browser, for example on the forumhome it's "YourForum - powered by vBulletin"], with other characters such as for example :: [which is what my vB uses] then this hack may be useful for you! Normally, doing this is a long process, you have to edit 49 [that's how many I counted, I might have missed a couple] templates, and if you changed your mind or revamped your site, you'd have to go and do them all again. This hack lets you edit them all by using 1 template.

What does it do to my forums?

Edits 1 file [root/global.php].
Adds 1 new template [hyphenhack].
Edits 49 templates.

How do I install it?

First of all you need to have vBHacker (http://www.vbulletin.org/forum/showthread.php?s=&threadid=36378) uploaded to your admin folder. Once you have that, upload the hyphenhack.hack.php file to your admin folder, and install it by using vBHacker.
That's all there is to it!

NOTE: If you have edited your <title> tags previously, some parts of this hack my fail to install automatically, and you will have to add the $hyphenhack variable in replacement of the - character yourself.

How do I use it?

Your hyphen replacement is stored in a custom template called 'hyphenhack'. By default, your hyphen will be replaced by ::, to change this, edit your hyphenhack template [CP > Templates > Modify] and put in whatever characters you like. You can also add the $hyphenhack variable to any template in which you would like to use the hyphen replacement.

Anything else?

Support is limited to this thread.
Thanks to everyone at vBulletin.org who have helped me with my hacking to date, especially FireFly who steps in whenever I mess things up!
If you install this hack, please comment and click Install.

Thanks very much, enjoy! Happy hacking! ;)

Takara
21 Jun 2002, 18:05
Originally posted by GamerForums
Normally, doing this is a long process, you have to edit 49 [that's how many I counted, I might have missed a couple]


There is 52 specifically, hehe. Aswell, if you wanted you could go to the admin cp, templates -> search.. and fill it in to replace the string "$bbtitle -" with "$bbtitle <your dash here>" without quotes of course, then click find/replace. That is, if you dont have vbhacker installed.

I dunno if its just me, but I wouldnt ever let a script do the replacing of my code. I dont trust it not to screw up something I alredy modified, hehe <^_^;;;

FleaBag
21 Jun 2002, 18:20
Any ideas which ones I missed? :p Ya know, I NEVER ever noticed that Search function before. But anyway, you're right - you can do it like that, but with this people don't have to risk messing something up, they can change it by changing one template, and they can add it to any other area of their site. I used to think the same about vBHacker, then I found a hack that only had a hack.php file - tried it, and never looked back since! :)

Chris M
21 Jun 2002, 20:13
Nice...:)

Satan

FleaBag
21 Jun 2002, 20:43
:D

Lovaboye
22 Jun 2002, 00:19
can we have a pic?

FleaBag
22 Jun 2002, 10:19
There isn't really anything I can give you a pic of, is there?

Mystic Gohan
18 Jul 2002, 19:10
Very Nice I will install on my forums

FleaBag
19 Jul 2002, 00:51
Glad you like it. :)

FleaBag
25 Feb 2003, 04:30
And working on all versions through to 2.3.0.

Silenced Soul
25 Feb 2003, 04:59
not a bad hack, and nice work, but, I've got no use for it whatsoever...

FleaBag
25 Feb 2003, 05:30
Yeah that's the thing with such a select hack, useful to a few but useless to many!

mx3
08 Mar 2003, 04:02
cool, i might install if i ever have to...lol