View Full Version : Need some help
Logikos
04-30-2004, 09:13 AM
Okay, i was thinking about making a hack where if User starts 'X' amount of threads in forum ID 'XX' then show usertitle as "Something" in postbit.
So i got to thinking about how i can grab that info from the database. Then i remembered that you can search by username, and threads started only in any forum. When the results come it will show you how many threads that user has started. So i looked into the search.php and includes/fuction_search.php and i got lost looking how they grab that info if defined.
Can someone kinda give me a push start on this? Would appricate it alot. Thanks.
Xenon
04-30-2004, 12:12 PM
you need a query like that:
SELECT COUNT(threadid) AS threads
FROM thread
WHERE postuserid = xx
AND forumid = yy
Logikos
04-30-2004, 07:13 PM
Thanks alot Xenon, working on it now :)
Logikos
05-03-2004, 05:24 AM
man i cannot figure this out. Anyone? sounds simple but sure isn't. If any "user" makes 1 thread in forums 'X' show title as "title". :(
Xenon
05-03-2004, 04:35 PM
should it be a permanent title or just in a thread, which is in this special forum?
if it should be a permanent title, you have to set the usertitle in the user-table, AND also the customtitle field to 1.
Logikos
05-03-2004, 07:44 PM
should it be a permanent title or just in a thread, which is in this special forum?
if it should be a permanent title, you have to set the usertitle in the user-table, AND also the customtitle field to 1.
I don't want it to be a permanent title.
For example.
If 'Xenon' makes 1 thread in "News & Articals forum" change 'Xenon's' title to 'News Poster':
And if a users see that his title has changed and don't like it, i would alow them to change it if they met the sites title specifications. Hope this helps ya.
I had a friend help me but he said that it would add an extra query for EVERY post. And i definitely do not want that. BTW thanks for helping Xenon really appreciate it! :)
Xenon
05-03-2004, 08:30 PM
you have to change the customtitle value into 2, that will allow the user to change the title himself, if he has the ability to do so according to permissions and such.
but the time you have to add such a query would be in build_new_post(), so that it will just be runned once.
and no, it wouldn't produce one query per post if you do it correctly ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.