Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 08-23-2001, 09:03 AM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
please post that or a reference into the Hack Releases forum,
thx for your work,
-Tom
Reply With Quote
  #12  
Old 09-17-2001, 04:55 PM
Reno of Shinra's Avatar
Reno of Shinra Reno of Shinra is offline
 
Join Date: Oct 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK... I want to make it so that all my admins have glowing usernames in threads while everyone else doesn't.

Now... the question is...
What am I doing wrong? I've tried this and I still don't get glowing admins.
I know I can make everyone glow... but... aggh.

This is under ### start buildpostbit ###
function getpostbit($post)
in board/admin/functions.php
vB ver 2.0.3

PHP Code:
    // global options
    
global $showdeficon,$showonline,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;
    
// begin glowing admin attempt
    
$post[specialusername] = $post[username];

    
$usergroupid=$bbuserinfo['usergroupid'];
    if (
$usergroupid == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; }

// end attempt 
I'm really scratching my head here... do I need to use someother variable or something to get the poster's usergroupid?

I am a PHP newbie... but I saw $usergroupid=$bbuserinfo['usergroupid']; used further down in functions.php and figured it should work...

But I guess not.

Any suggestions?
Reply With Quote
  #13  
Old 09-17-2001, 05:50 PM
dirgotronix dirgotronix is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks to me like $bbuserinfo isn't defined in that section (see the global line for what variables are usable)

at least, that's my best guess.
Reply With Quote
  #14  
Old 09-17-2001, 05:52 PM
dirgotronix dirgotronix is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, and you're using an admin function, that I assume is only for the Admin CP. try showthread.php, member.php, or functions.php. Where are you trying to make it glow? In threads, the memberlist, user info...?
Reply With Quote
  #15  
Old 09-17-2001, 06:01 PM
Reno of Shinra's Avatar
Reno of Shinra Reno of Shinra is offline
 
Join Date: Oct 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was just basing this off the above version which uses postcounts...

I set where the glow effect is displayed through my templates... that isn't related to this.

The function is supposed to set the $post[specialusername] to $post[username] plus html formatting...

I KNOW it work, because if I remove the conditional and just say
PHP Code:
$post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"
then ALL usernames glow.

That's not a problem.

My problem is that the if statement that checks the usergroupid does not work.

That's the ONLY thing that needs fixing...

As I asked... do i need a different variable in there or something?

$bbuserinfo is declared a few lines above where I pasted code from...
PHP Code:
// ###################### Start buildpostbit #######################
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

    // user
    
global $bbuserinfo,$ignore;
    
// showthread
    
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;
    
// global options
    
global $showdeficon,$showonline,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;
    
// begin glowing admin attempt
    
$post[specialusername] = $post[username];

    
$usergroupid=$bbuserinfo['usergroupid'];
    if (
$usergroupid == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; }

// end attempt 
Reply With Quote
  #16  
Old 09-17-2001, 10:24 PM
Soul Lord XL
Guest
 
Posts: n/a
Default

I dont have a

############## Start buildpostbit ############

In admin / functions.php and i am running 2.01, any suggestions?
Reply With Quote
  #17  
Old 09-17-2001, 10:35 PM
Kier Kier is offline
 
Join Date: Oct 2001
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Soul Lord XL
I dont have a

############## Start buildpostbit ############

In admin / functions.php and i am running 2.01, any suggestions?
Yes, upgrade to 2.0.3... it's available free to all licenced members.
Reply With Quote
  #18  
Old 09-18-2001, 01:16 AM
Soul Lord XL
Guest
 
Posts: n/a
Default

ahh ok, will do!
Reply With Quote
  #19  
Old 11-09-2001, 01:10 PM
Baratator's Avatar
Baratator Baratator is offline
 
Join Date: Nov 2001
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Reno of Shinra
I was just basing this off the above version which uses postcounts...

I set where the glow effect is displayed through my templates... that isn't related to this.

The function is supposed to set the $post[specialusername] to $post[username] plus html formatting...

I KNOW it work, because if I remove the conditional and just say
PHP Code:
$post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"
then ALL usernames glow.

That's not a problem.

My problem is that the if statement that checks the usergroupid does not work.

That's the ONLY thing that needs fixing...

As I asked... do i need a different variable in there or something?

$bbuserinfo is declared a few lines above where I pasted code from...
PHP Code:
// ###################### Start buildpostbit #######################
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

    // user
    
global $bbuserinfo,$ignore;
    
// showthread
    
global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;
    
// global options
    
global $showdeficon,$showonline,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;
    
// begin glowing admin attempt
    
$post[specialusername] = $post[username];

    
$usergroupid=$bbuserinfo['usergroupid'];
    if (
$usergroupid == 5) { $post[specialusername] = "<table style=\"filter:glow(color=orange, strength=4)\"><tr><td>$post[username]</td></tr></table>"; }

// end attempt 
same problem : if i don't put the condition it works but fo all the users... now how can we make it work only for the admins
Reply With Quote
  #20  
Old 11-09-2001, 05:33 PM
dirgotronix dirgotronix is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I toyed with the variables that show in postbit, and here's the one I found:

$userinfo[usergroupid]

That displays the number of the usergroup. Try that instead of $bbuserinfo[usergroupid].
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 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.04464 seconds
  • Memory Usage 2,280KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (8)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete