View Full Version : HTML in Postbit per Usergroup
filburt1
04-15-2003, 10:00 PM
This hack lets you format usernames in postbits (in showthread only) with whatever HTML you want, depending on each poster's usergroup.
Note that if you have any significant tags around the username in your postbit already, you should remove them for this to be fully effective.
filburt1
04-16-2003, 07:36 PM
Admin CP:
filburt1
04-16-2003, 07:36 PM
Viewing posts (notice how many name is bold and italics like I specified because I'm an admin):
Good idea, I did something similar, but on a per style per usergroup basis :).
AlexanderT
04-16-2003, 08:40 PM
filburt1, I love your hacks! Going to install now!
PS:
Maybe you can clarify this better?
After that (but still within quotes), add:
Chris M
04-16-2003, 08:52 PM
Nice:)
Satan
colicab-d
04-16-2003, 09:39 PM
nice one .. this is getting installed
theres some great stuff coming from camp filburt :D
filburt1
04-16-2003, 09:41 PM
If you'll follow a certain thread in my announcements forum then you'll know how all of these little new hacks will be used in my forums soon ;)
joeboo
04-16-2003, 10:02 PM
oh ho.. this is a great addition :)
AlexanderT
04-16-2003, 10:06 PM
Hmm I installed it - but I see one problem.
$username is not only used in the postbit. When I change it, I can easily screw up other parts; especially those, that contain $username in their alt="..." descriptions (alt doesnt like html code inside).
For instance, try this one:
<span style="FILTER: Glow(Color=#ffcc66, Strength=8); width:200px;font-size:16pt;">$username</span>
I think we should use another, unique, variable for the postbit part, like $usernamepp or so.
filburt1, any ideas?
colicab-d
04-16-2003, 10:24 PM
it also conflicts with your user comment system :p
in the admin/usergroup.php file
Logik
04-16-2003, 11:28 PM
I noticed this to. Just change the variable. If Filburt dont mind :)
Logik
04-16-2003, 11:34 PM
Today at 03:40 PM AlexanderT said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=383079#post383079)
filburt1, I love your hacks! Going to install now!
PS:
Maybe you can clarify this better?
Ok. This is the code..
$posts=$DB_site->query("
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attach ment.visible AS attachmentvisible,attachment.counter
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
See where it says 'avatardateline'. Well add that specific code in there, make sure its before the ')'.
blackice912
04-17-2003, 12:20 AM
Hum, how would I go about installing this with that user comments system installed?
it looks great ,especially it was from filburt1 :laugh:
but it will be more graet if you can modify the hack to
be able using html in each username :)
i mean differnet users from one usergroup
regards
AlexanderT
04-21-2003, 12:17 AM
04-16-03 at 11:06 PM AlexanderT said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=383118#post383118)
Hmm I installed it - but I see one problem.
$username is not only used in the postbit. When I change it, I can easily screw up other parts; especially those, that contain $username in their alt="..." descriptions (alt doesnt like html code inside).
For instance, try this one:
<span style="FILTER: Glow(Color=#ffcc66, Strength=8); width:200px;font-size:16pt;">$username</span>
I think we should use another, unique, variable for the postbit part, like $usernamepp or so.
filburt1, any ideas?
No fix suggestions for that? (If using another variable for the username postbit part, as i mentioned, how would I actually do that?)
Dean C
04-21-2003, 12:12 PM
Hmmm how i miss these hacks is beyond me :(
- miSt
is it possible to modify this so that people can have html in their sig depending on their user group?
Dean C
07-09-2003, 09:44 AM
Search and ye shall find :) ^^
Murderer
07-15-2003, 01:38 PM
I get an error when I do what you said to do here:
In admin/functions.php, find (not entire line):
global $showdeficon,$displayemails,$enablepms,$allowsigna tures,$wordwrap,$dateformat,$timeformat,$logip
After that, add:
if (!empty($post['postbithtml']))
{
$username = $post['username'];
eval("\$post['username'] = \"" . addslashes($post['postbithtml']) .
"\";");
}
I Put this
$showdeficon,$displayemails,$enablepms,$allowsigna tures,$wordwrap,$dateformat,$timeformat,$logip if (!empty($post['postbithtml']))
{
$username = $post['username'];
eval("\$post['username'] = \"" . addslashes($post['postbithtml']) .
"\";");
}
and I get a mySQL error on my page on line 113 in functions.php
...
what am I doing wrong? Can someone please update me? how should I put that format?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.