vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   post name idea... help me out (https://vborg.vbsupport.ru/showthread.php?t=39937)

Shokkka 06-16-2002 05:39 PM

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

Chris M 06-16-2002 06:34 PM

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

Xenon 06-16-2002 07:33 PM

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)

Shokkka 06-16-2002 08:09 PM

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.

Xenon 06-17-2002 11:11 AM

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'>";} 


Shokkka 06-17-2002 07:47 PM

and it will show an image for the admin user name?

Xenon 06-17-2002 07:50 PM

yes it will.
but don't forget to create an image for every admin you have :)

Shokkka 06-17-2002 07:50 PM

oh ya and BTW, shouldnt it check if the user has an image first ;) so incase it doesnt show nothing :p

Xenon 06-17-2002 07:54 PM

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 ^^

Shokkka 06-17-2002 07:58 PM

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 :p thats what i meant lol


All times are GMT. The time now is 07:27 PM.

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.01554 seconds
  • Memory Usage 1,741KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete