View Full Version : User Titles
Sigon
06-07-2002, 01:09 PM
Ok well I know at my forums a lot of people are always asking when their user title is going to change to the next one and how many posts it takes to get to each level. So what I was thinking if anyone could do this. Would be to create a hack that on a seperate page (like the newsportal,shoutbox kind of pages) list the different user titles. How many posts it takes to get to each one and maybe how many users are at each level.
This would be very cool for my users and I would defo beta test it for whoever makes it. Thanks!
Admin
06-07-2002, 01:20 PM
I *think* this has already been done, have you searched? :)
Sigon
06-07-2002, 06:00 PM
yeah I will search again though
Dean C
06-07-2002, 06:04 PM
i can't remember this being done :s
Sigon
06-07-2002, 06:05 PM
I just searched and found nothing. I think this would help out a lot pf people.
Xenon
06-07-2002, 06:06 PM
i'd say like firefly: i think this has been done, but i can't find it now :)
but if not, it wouldn't be hard to write, just a few lines, and then add it to the avatar list
Sigon
06-07-2002, 06:09 PM
Add it to the Avatar list? I do not want it in the avatar section I could care less about the avatars. I was thinking a seperate page for them
Xenon
06-07-2002, 06:19 PM
where you'll put it, is your problem *gg*
i'd do it myself to the list of the avatars, but, if you want it on a new page, this won't be a problem.
just create a (very) small php file and a template, and it'll work
Sigon
06-07-2002, 06:29 PM
I might like your idea. Are you going to do this?
Xenon
06-07-2002, 06:57 PM
ok, will do it :)
Sigon
06-07-2002, 07:09 PM
Awesome! If you need any help let me know!
Sigon
06-07-2002, 07:09 PM
btw I am actually installing the archive hack now
Xenon
06-07-2002, 07:13 PM
:)
i like to hear that :)
ok, the code is written, but ther is no design, make it like you want it :)
template showtitles:{htmldoctype}
<html>
<head><title>$bbtitle - Titles</title>
$headinclude
</head>
<body>
$header
<table><tr><td>Min Posts</td><td>Usertitle</td></tr>
$titletext
</table>
$footer
</body>
</html>
and upload this file
Sigon
06-07-2002, 08:08 PM
Nice work m8! I am going to customize it a bit but great work! Thanks much!
Xenon
06-07-2002, 09:42 PM
you're welcome :)
Chris M
06-07-2002, 11:37 PM
Cool hack!
Satan
Xenon
06-08-2002, 12:31 PM
thanks ;)
Chris M
06-08-2002, 02:13 PM
Your welcome;)
How would you edit this to find out about Avatars?
Satan
Boofo
06-08-2002, 03:32 PM
I need to have the User Title and Minimum Posts as two sparate variables in the titles.php without any formatting whatsoever in the php file, can it be done? Please? :)
Originally posted by Xenon
:)
i like to hear that :)
ok, the code is written, but ther is no design, make it like you want it :)
template showtitles:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>$bbtitle - Titles</title>
$headinclude
</head>
<body>
$header
<table><tr><td>Min Posts</td><td>Usertitle</td></tr>
$titletext
</table>
$footer
</body>
</html>
and upload this file
Xenon
06-08-2002, 03:53 PM
you'll have a problem: since you don't know how much titles you have, you can't make dynamic variables because in the templates you cannot make a loop to call them all.
you maust make a small sort of formating, or you make your template hardcoded to 3 or 4 or whatever count of your titles..
but if you want to do so:
replace this $titletext="";
while($title=$DB_site->fetch_array($titles)) {
$titletext.="<tr><td>".$title[minposts]."</td><td>".$title[title]."</td></tr>";
}
with this:
$counter=0;
while($title=$DB_site->fetch_array($titles)) {
$titletext[$counter]=$title[title];
$titleposts[$counter]=$title[minposts];
$counter++;
}
then you can user $titletext[x] and $titleposts[x] in your templates
Boofo
06-08-2002, 04:18 PM
I did what you said here and put a 3 in for the x part of it (because I have 3 titles at present) but nothing shows up for the titles or minimum posts. Any ideas? I'm using the showtitles template and it doesn't show anything for those 2 variables in there.
Originally posted by Xenon
you'll have a problem: since you don't know how much titles you have, you can't make dynamic variables because in the templates you cannot make a loop to call them all.
you maust make a small sort of formating, or you make your template hardcoded to 3 or 4 or whatever count of your titles..
but if you want to do so:
replace this $titletext="";
while($title=$DB_site->fetch_array($titles)) {
$titletext.="<tr><td>".$title[minposts]."</td><td>".$title[title]."</td></tr>";
}
with this:
$counter=0;
while($title=$DB_site->fetch_array($titles)) {
$titletext[$counter]=$title[title];
$titleposts[$counter]=$title[minposts];
$counter++;
}
then you can user $titletext[x] and $titleposts[x] in your templates
Xenon
06-08-2002, 04:48 PM
look at the counter variable it starts at 0, so if you have 3 titles you must choose 2 for title nr.3 *gg*
or put the line $counter++ two lines upper
Boofo
06-08-2002, 06:33 PM
I put the counter line two lines up and it works great! Thank you very much. When I get the page done, I will put a link to it for you to check out. :) Thanks again!
Originally posted by Xenon
look at the counter variable it starts at 0, so if you have 3 titles you must choose 2 for title nr.3 *gg*
or put the line $counter++ two lines upper
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.