Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2002, 06:39 PM
Shokkka's Avatar
Shokkka Shokkka is offline
 
Join Date: Jun 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default post name idea... help me out

Well, im the Admin of these forums Im at

When I psot it shows my boring dull name, and I wanna make it change to an image.

now this is my idea I think i got the PHP part right, just bear with me cause im new to php but this should show the image for my name if the $post[username] is identicle to my name on the forums which is "Shokka"

heres the code

PHP Code:
//special name image
if($post[username] == Shokka)  {
    print(
"<img src="IMAGE URL">");

now the only problem is, what file would this go in AND would it show my name in text and then the image?

Just an idea hehe

Tell me what you think, and please dont steal the idea lol :lick:

L8r
~Shokka
Reply With Quote
  #2  
Old 06-16-2002, 07:34 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably all the file to do with posting and/or threads...

So :

forumdisplay.php
newthread.php
newreply.php
online.php
showthread.php
memberlist.php

Satan
Reply With Quote
  #3  
Old 06-16-2002, 08:33 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to edit functions.php
the getpostbit section.

but don't use this code:
PHP Code:
print("<img src="IMAGE URL">"); 
it'll destroy the design.

instead use this code:
$post[image]="<img src='Imageurl'>";
just put the $post[image] into your postbittemplate
if you want to change your username to an image write instead
$post[image]="<img src='Imageurl'>";
this:
$post[username]="<img src='Imageurl'>";


also its not good to use the username here:
if($post[username] == Shokka)

change it to your userid, so if you change your name you need not change your code:
if($post[userid] == xx)
Reply With Quote
  #4  
Old 06-16-2002, 09:09 PM
Shokkka's Avatar
Shokkka Shokkka is offline
 
Join Date: Jun 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its only gonna be for admins. but i thought of it this way

PHP Code:
if ($post[userid] == "filewithuserids") {
     print(
"images/$post[userid].gif")

something like that.
Reply With Quote
  #5  
Old 06-17-2002, 12:11 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if if it should be for all admins, thats very easy to do:

in admin/functions.php go to section getpostbit, and before this lines:
PHP Code:
// do posts from ignored users
    
if (!$ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 
add this lines:
PHP Code:
if ($post[usergroupid] == 6) {
     
$post[username]="<img src='images/".$post[userid].".gif'>";} 
Reply With Quote
  #6  
Old 06-17-2002, 08:47 PM
Shokkka's Avatar
Shokkka Shokkka is offline
 
Join Date: Jun 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and it will show an image for the admin user name?
Reply With Quote
  #7  
Old 06-17-2002, 08:50 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes it will.
but don't forget to create an image for every admin you have
Reply With Quote
  #8  
Old 06-17-2002, 08:50 PM
Shokkka's Avatar
Shokkka Shokkka is offline
 
Join Date: Jun 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh ya and BTW, shouldnt it check if the user has an image first so incase it doesnt show nothing
Reply With Quote
  #9  
Old 06-17-2002, 08:54 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why do you think i have asked this question:
"if it should be for all admins, thats very easy to do:"


change the if clause to
$post[usergroupid] == 6 && $post[userid]!=xy
and add so much ids, which don't have a picture
as i think you haven'T soo much admins this would be easier than mak long coding to find out if file exists and so on ^^
Reply With Quote
  #10  
Old 06-17-2002, 08:58 PM
Shokkka's Avatar
Shokkka Shokkka is offline
 
Join Date: Jun 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no no no i meant, like if the admin doesnt have his/her image made yet, then instead of showing a dead link picture, it will check to see if the picture is there, and if its not, it will just display the name thats what i meant lol
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 04:28 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04165 seconds
  • Memory Usage 2,255KB
  • 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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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
  • (10)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