vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   HTML in Postbit per Usergroup (https://vborg.vbsupport.ru/showthread.php?t=51700)

filburt1 04-15-2003 10:00 PM

HTML in Postbit per Usergroup
 
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):

N9ne 04-16-2003 08:13 PM

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?
Quote:

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

Quote:

Today at 03:40 PM AlexanderT said this in Post #5
filburt1, I love your hacks! Going to install now!

PS:

Maybe you can clarify this better?



Ok. This is the code..
PHP 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,attachment.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?

msu 04-17-2003 08:26 AM

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

Quote:

04-16-03 at 11:06 PM AlexanderT said this in Post #10
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

scri 07-09-2003 09:40 AM

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):
PHP Code:

  global $showdeficon,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip

After that
add:

    if (!empty(
$post['postbithtml']))
    {
        
$username $post['username'];
        eval(
"\$post['username'] = \"" addslashes($post['postbithtml']) .
            
"\";");
    } 


I Put this

PHP Code:

$showdeficon,$displayemails,$enablepms,$allowsignatures,$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?


All times are GMT. The time now is 06:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01251 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete