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)
-   -   customtitle in forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=42226)

fahad 08-12-2002 10:00 PM

customtitle in forumdisplay
 
1 - forumdisplay.php

Find
PHP Code:

eval("\$thread[gotonew] = \"".gettemplate('forumdisplay_gotonew')."\";"); 

after that add

PHP Code:

$showtitle $DB_site->query_first("SELECT user.username,user.userid,user.usertitle,user.customtitle FROM user WHERE userid=$thread[postuserid]");
$showtitlecurrent $showtitle[usertitle]; 

save file

2 - EDIT template forumdisplaybit
after
PHP Code:

$thread[postedby

add
PHP Code:

<br><smallfont>$showtitlecurrent</smallfont

arabic demo:FFF.FM

C U http://www.fff.fm/vb/images/smilies/thumb.gif

mewgood 08-13-2002 04:26 AM

Hm.. I dont know how to read that language so I dunno whats the difference..

fahad 08-13-2002 04:28 AM

???? forumdisplay.php
???? ??
eval("\$thread[gotonew] = \"".gettemplate('forumdisplay_gotonew')."\";");

??? ?????

$showtitle = $DB_site->query_first("SELECT user.username,user.userid,user.usertitle,user.cust omtitle FROM user WHERE userid=$thread[postuserid]");
$showtitlecurrent = $showtitle[usertitle];
???? ??????? forumdisplaybit
????
$thread[postedby]

??? ?????

<br><smallfont>$showtitlecurrent</smallfont>
??????? ??? ????? ???? ?? ??????? ??
??????

fahad 08-13-2002 04:34 AM

ok

fahad 08-13-2002 04:38 AM

arabic

[D]Vincent 08-13-2002 05:11 AM

No offense but you just have to put <br>($bbuserinfo[usertitle]) in the forum display template where the username is displayed and you get the same effect.

fahad 08-13-2002 05:25 AM

:( :( no no no

$bbuserinfo[usertitle] = your title

$showtitlecurrent = user customtitle started thread

fahad 08-13-2002 05:36 AM

[D]Vincent

[D]Vincent 08-13-2002 05:42 AM

That moderator thing is $bbuserinfo[usertitle]

fahad 08-13-2002 05:49 AM

no
announcement post title

$announcement[usertitle]

mewgood 08-13-2002 06:03 AM

hm..
I though I saw this hack before..

[D]Vincent 08-13-2002 06:16 AM

Vincent]
Quote:

Originally posted by fahad
no
announcement post title

$announcement[usertitle]

God, and it's $post[usertitle] for postbit and $userinfo[usertitle] for user info display, $bbuserinfo[usertitle] works everywhere if I'm not mistaken and I said $bbuserinfo[usertitle] because I don't know what it uses for forum display. Probably $forum[usertitle] or something.

DemiNeo0101 08-13-2002 02:35 PM

this is a fixed version of his hack at: https://vborg.vbsupport.ru/showthrea...=&pagenumber=2

All i see if this though is an extra query for each thread.... Meaning if you have 50 threads showing on a page you'll have 50 extra querys.. :-/ Basicly its just a waist of Querys.

Im only telling you what you did wrong wrong fahad. Try to fix the querys and you'll be fine.

But its a good atemp at a hack so dont put him down or anything. Good job fahad.

Velocd 08-13-2002 06:58 PM

To clear up the simple confusion, mostly for you Vincent..

$bbuserinfo[] - Can be used in any template, but will ALWAYS display YOUR information, not others.
$post[] - Displays information on the users within a thread but only can be used in showthread.php templates (and those in functions.php)
$thread[] - Used in forumdisplay.php templates
$forum[] - used in index.php templates

---------------------

Here is a quick fix for this hack, that will provide no excess queries:

1. Run this query in PhpMyAdmin:
PHP Code:

Alter table thread add usertitle varchar(250not null

2. In newthread.php, find this:
PHP Code:

visible,attach,description

Replace it with:
PHP Code:

visible,attach,description,usertitle

3. Now find:
PHP Code:

,'".addslashes($description)."' 

Replace it with:
PHP Code:

,'".addslashes($description)."','".addslashes($bbuserinfo[usertitle])."' 

4. In forumdisplay.php, find:
PHP Code:

votetotal,attach,description 

Replace it with:
PHP Code:

votetotal,attach,description,usertitle 

5. Now in the template forumdisplaybit, find:
Code:

$thread[postedby]
And after it place:
Code:

<br><smallfont>$thread[usertitle]</smallfont>
And there we go ;)

Velocd 08-13-2002 07:00 PM

Also, it will only work for new threads made, your old threads wont be updated in this fashion. Although try using "update counters" in the Admin CP and maybe that'll refresh everything.

Alien 05-04-2003 05:35 PM

Anyone ever confirm if this works (and with 0 queries added), and if it does if update counters ever made a difference? :D

I'd love to install this, looks great.

-Jason

Boofo 05-04-2003 06:11 PM

Quote:

08-13-02 at 03:00 PM Velocd said this in Post #15
Also, it will only work for new threads made, your old threads wont be updated in this fashion. Although try using "update counters" in the Admin CP and maybe that'll refresh everything.
Update counters doesn't add this to every thread. It will only work on new threads. Is there another query to run that will make it retro-active on older threads?

Boofo 05-04-2003 06:13 PM

Quote:

Today at 01:35 PM Alien said this in Post #16
Anyone ever confirm if this works (and with 0 queries added), and if it does if update counters ever made a difference? :D

I'd love to install this, looks great.

-Jason

Use this one. It doesn't add any extra queries.

https://vborg.vbsupport.ru/showthrea...466#post284466

Alien 05-04-2003 09:09 PM

Thanks alot!

Bison 05-06-2003 04:28 AM

Quote:

05-04-03 at 03:11 PM Boofo said this in Post #17
Update counters doesn't add this to every thread. It will only work on new threads. Is there another query to run that will make it retro-active on older threads?
I've been waiting for this updates as well ... i'll take a poke at it Boofo! :beard:

Boofo 05-06-2003 04:40 AM

Great! Let me know what you find out. Thanks! ;)


All times are GMT. The time now is 04:50 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.01412 seconds
  • Memory Usage 1,772KB
  • 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
  • (2)bbcode_code_printable
  • (11)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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