View Full Version : customtitle in forumdisplay
fahad
08-12-2002, 10:00 PM
1 - forumdisplay.php
Find
eval("\$thread[gotonew] = \"".gettemplate('forumdisplay_gotonew')."\";");
after that add
$showtitle = $DB_site->query_first("SELECT user.username,user.userid,user.usertitle,user.cust omtitle FROM user WHERE userid=$thread[postuserid]");
$showtitlecurrent = $showtitle[usertitle];
save file
2 - EDIT template forumdisplaybit
after
$thread[postedby]
add
<br><smallfont>$showtitlecurrent</smallfont>
arabic demo:FFF.FM (http://www.fff.fm/vb/forumdisplay.php?forumid=9)
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>
??????? ??? ????? ???? ?? ??????? ?? (http://www.fff.fm)
??????
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]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/showthread.php?s=&threadid=42119&perpage=15&display=&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:
Alter table thread add usertitle varchar(250) not null;
2. In newthread.php, find this:
visible,attach,description)
Replace it with:
visible,attach,description,usertitle)
3. Now find:
,'".addslashes($description)."'
Replace it with:
,'".addslashes($description)."','".addslashes($bbuserinfo[usertitle])."'
4. In forumdisplay.php, find:
votetotal,attach,description
Replace it with:
votetotal,attach,description,usertitle
5. Now in the template forumdisplaybit, find:
$thread[postedby]
And after it place:
<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
08-13-02 at 03:00 PM Velocd said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=284470#post284470)
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
Today at 01:35 PM Alien said this in Post #16 (https://vborg.vbsupport.ru/showthread.php?postid=391308#post391308)
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/showthread.php?postid=284466#post284466
Alien
05-04-2003, 09:09 PM
Thanks alot!
Bison
05-06-2003, 04:28 AM
05-04-03 at 03:11 PM Boofo said this in Post #17 (https://vborg.vbsupport.ru/showthread.php?postid=391326#post391326)
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! ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.