PDA

View Full Version : The "Make Stickies Bold / Prefix Remove" Hack


John
03-10-2003, 10:00 PM
-/\-/\-/\-/\-/\-/\-/\-/\-/\-/\-
Make Stickies Bold Hack
By Shaolyen
email: John@eovie.com
msn: John@eovie.com
-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-


Introduction
----------------------------
Ok, just a quick one as per the request here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=49935
Nothing special I'm afraid - it simply gets rid of the "Sticky:"
prefix and makes the thread title bold instead.

It has its uses - I've been driven mad by the number of times
I've been asked what a "Sticky" is, at least now they see the bold
text and know it's an important thread.

Sticky behavior is unchanged (they still stay at the top, lol)
----------------------------

A big thanks to Link14716 for pointing out my stupidity!

It's fairly simple, I can't see there being many problems with this one. Tested on vB 2.3.0, fresh install.

Link14716
03-11-2003, 10:19 AM
Why not do this? :D
if ($thread[sticky] == 1) {
$thread[title] = "<b>$thread[title]</b>";
}
:)

John
03-11-2003, 10:22 AM
lol, good point - I'll update instructions.

I always go the long way round ;)

assassingod
03-11-2003, 12:30 PM
Cool hack!

This is a little addition.
You can specify a colour in the Admin CP (vB Options -> Forumdisplay) for stickies (i.e red), and use this code instead:

Then all you have to do is change the colour via admin CP to change its color:D

WoodiE
03-11-2003, 01:32 PM
I'm running 2.2.8 and this works perfectly! Though i did try assassingod's hack and it not only made it bold, but changed the post icon to the text also. :\

No worries, thank you very much Shaolyen!

-WoodiE

Shimmy
03-11-2003, 02:58 PM
worked great on 2.3.0

Thanks

Mr L
03-11-2003, 04:30 PM
Thanks for this cool, but small mod!!!

I am no PHP expert at all, but how would it be possible to place a small post-it icon before the thread that is sticky. I have taken the liberty of attaching a gif, if anyone can do this.

Thanks!

assassingod
03-11-2003, 04:46 PM
You'd use this:

Link14716
03-11-2003, 09:51 PM
Or better yet...
if ($thread[sticky] == 1) {
$thread[title] = "<b>$thread[title]</b>";
$thread[typeprefix]=$stickythreadprefix.$thread[typeprefix];
}

And add the <img> HTML code into the Sticky Prefix in the Admin CP. If you just want the image and not the bolded title, revert the changes this hack makes and then add the HTML into the Sticky Prefix in the Admin CP. :)

Mr L
03-11-2003, 10:04 PM
Thanks Assassingod, just what I needed! :D

John
03-11-2003, 10:26 PM
There are loads of things you could do with the sticky title.

The hardest part of making a hack like this is finding the code to edit!

Gary King
04-26-2003, 01:01 PM
The simple way to do it could be to just make the Sticky prefix: <b>

But of course it won't have a closing tag, but hey, it saves time :p

jamslam
05-05-2003, 10:18 PM
Here's just a small addon if you wish to have the sticky prefix with a colored/bold/italic thread title...

In forumdisplay.php find

if ($thread[sticky] == 1) {
$thread[typeprefix]=$stickythreadprefix.$thread[typeprefix];
}


replace it with...

if ($thread[sticky] == 1) {
$thread[typeprefix]=$thread[typeprefix].$stickythreadprefix;
$thread[title] = "<font color=red>$thread[title]</font>";
}


Just in case you were wondering how to do it. You can of course put anything instead of the <font color=red>

remember to use \" for quotes!

gmarik
05-17-2003, 08:13 PM
Hey, I wanted to ask you - can I have a prefix to choose from a drop down box, so it add's it to the thread? Can you post the little piece of code here too?

Thanks, Marco

M.C.
05-21-2003, 12:45 AM
and small addition! If you want show special icon for sticky thread just do that:

in forumdisplay.php find:

if ($foruminfo[allowicons] and $thread[pollid]!=0) {
$thread[icon]='<img src="{imagesfolder }/poll.gif" alt="Poll" width="15" height="15" border="0">';
}


and below add:

if ($foruminfo[allowicons] and $thread[sticky] == 1) {
$thread[icon]='<img src="="{imagesfolder }/icons/icon4.gif" alt="Sticky" width="15" height="15" border="0">';
}


Don`t foget remove space after {imagefolder }! You can change icon for other if you want ;)

Luck

P.S. my fist kind of hack ;)

SBlueman
07-29-2007, 08:06 PM
Is there anything like this for 3.6.5 and above?