PDA

View Full Version : Postbit Icon change and thread color


SwalyAaron
05-30-2013, 10:45 AM
Found this hook for the thread color change but honestly don't know where it would go

This is for changing the color of thread title
if ($thread['postuserid'] == 1) {$thread['threadtitle'] = '<span style="color: #8B0000;">' . $thread['threadtitle'] . '</span>';}
Vb3.8


And now I'm trying to make it so when ever user 1 posts in a thread, or usergroup doesn't matter. The postbit icon changes to one that I chose. I know this is possible and would like a solution =].


Lastly (related to the thread title change) how do I change the "latest post by "username"" color if posted by an admin, a userid, or a specific usergroup.

SwalyAaron
06-08-2013, 08:22 PM
Anyone figure this out? =]

SwalyAaron
06-17-2013, 05:01 AM
==]

kh99
06-17-2013, 10:04 AM
What hook are you using for the code you posted?

exel
06-18-2013, 06:51 PM
Try threadbit_display, that should do it.

I would recommend you do it via templates, though.
It's easy.

SwalyAaron
06-19-2013, 08:58 PM
What hook are you using for the code you posted?
Trying to figure out which hook to use, I found this in a thread but did not mention a hook :s
Try threadbit_display, that should do it.

I would recommend you do it via templates, though.
It's easy.
Awesome the hook worked, even manged to change username.


Now I'm trying to make it display the color in forum homepage :S and trying to get the Postbit icon to change automatically when user id = 1 posts in a thread

SwalyAaron
06-24-2013, 09:40 PM
=]]

SwalyAaron
06-29-2013, 07:03 AM
=]]

SwalyAaron
07-07-2013, 07:58 PM
=]]

exel
07-09-2013, 05:45 PM
What exactly are you trying to do?

SwalyAaron
07-09-2013, 10:13 PM
I made a postbit icon that says "DEV", I want it to be used automatically when I post a thread so it stands out from other threads, I also want it to be changed to that when ever I post on a thread so it stands out as a "DEV" posted on it. Also trying to get this recolored:

I want "Scorch" and "Hello" to be recolored to BLUE ONLY if its a Dev post, I used the plugin above to do it for sections like here:

And this is the postbit icon that I want changed automatically:

exel
07-10-2013, 08:08 AM
For the dev icon, you can probably do something like..

threadbit_display again.

if ($thread['postuserid'] == 1) {

$thread[threadiconpath] = "images/misc/DEVICON.PNG";

}

^ Confirmed it works just fine.

--------------- Added 1373488952 at 1373488952 ---------------

As for your forumhome edit request, there's no hook before the calling of lastpostby

So you might look into: https://vborg.vbsupport.ru/showthread.php?t=148653&highlight=color

As that adds a hook before it, all you'd have to do is edit the php code.

SwalyAaron
07-10-2013, 10:22 PM
For the dev icon, you can probably do something like..

threadbit_display again.

if ($thread['postuserid'] == 1) {

$thread[threadiconpath] = "images/misc/DEVICON.PNG";

}

^ Confirmed it works just fine.

--------------- Added 1373488952 at 1373488952 ---------------

As for your forumhome edit request, there's no hook before the calling of lastpostby

So you might look into: https://vborg.vbsupport.ru/showthread.php?t=148653&highlight=color

As that adds a hook before it, all you'd have to do is edit the php code.

The thread icon:
It's working perfectly when I make a thread, thank you so much for that. But I also want it to change on ANY thread that I post on (really just to notify that I have posted on said thread)

The forumhome recoloring:
Now that I have a hook, what would my code be? I tried running this:

if ($thread['postuserid'] == 1) {$thread['lastposter'] = '<span style="color: #0099FF;">' . $thread['lastposter'] . '</span>';}


The product itself works its adding HTML mark up but I want it to be a blue color not my HTML mark up and I only want it to work for USER ID = 1, I'm trying to mess with the PHP I will try and reply before you do if I find anything that will work.

exel
07-11-2013, 03:01 AM
For the thread icon, try doing..

if ($thread['postuserid'] == 1 || $thread[lastposter] == 1) {

$thread[threadiconpath] = "images/misc/DEVICON.PNG";

}

As for the other mod, find the plugin colorname

And replace all with:

if($lastpostinfo['lastposter'] == YOURUSERNAME) {

$lastpostinfo['lastposter'] = '<span style="color:#8B0000;">".$lastpostinfo['lastposter']."</span>';

}

SwalyAaron
07-11-2013, 04:21 AM
It still doesn't change, its not showing any errors but I don't see what its doing

Color username plugin error when enabled :
Parse error: syntax error, unexpected T_STRING in /home/vanquish/public_html/forums/includes/functions_forumlist.php(268) : eval()'d code on line 3

exel
07-11-2013, 06:48 AM
Erm, if you want to PM me an admin account on your site with settings, template and plugin permissions, I can have a look. Kind of working blinded here. :p

SwalyAaron
07-11-2013, 08:58 AM
Sure will work it out with you tomorrow, will give you an account to work on

exel
07-11-2013, 07:02 PM
Sure will work it out with you tomorrow, will give you an account to work on

Sounds good.

SwalyAaron
07-24-2013, 07:36 AM
Incredible thank you