User Color in browse
Hi something not working so I need any idea
I put this in global.php PHP Code:
and add in fuctions.php PHP Code:
and still not work, what I missed, thanks for help |
Just a quick glance, you are doubling the '#' sign.
|
where you see, its only one
|
case UC_USER: return "#f9a950";
case UC_POWER_USER: return "#f9a200"; case UC_VIP: return "#009F00"; case UC_UPLOADER: return "#6464FF"; case UC_MODERATOR: return "#ff5151"; case UC_ADMINISTRATOR: return "#B000B0"; case UC_SYSOP: return "#2587A7"; case UC_STAFFLEADER: return "#0F6CEE"; Looks like 2 to me. |
ok I change this line and not work
PHP Code:
|
You're going to have to be more specific, what doesn't work? What is the exact error, etc?
|
on browse got same color users not different
|
Where is row['class'] coming from? Is it from a join to users? Is the query correct? Are the results correct? What color is displayed? What class does that match?
|
can we go step by step...
Test is User color black SlaTkis is StaffLeader color black must be darkred http://shrani.si/f/1r/XI/1ZqmnIci/12.png |
I have to guess, because you have not answered the previous questions.
It appears that your query, more specifically your join is flawed. If you look at your error log, you may see that index 'class' does not exist. If you do, simple fix, add the proper join Code:
LEFT JOIN users ON torrents.owner = users.id But without more information, I am only guessing. |
al of this is done in my v2
|
Quote:
|
where I must put class in browse like this one
PHP Code:
|
Code:
"IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where$orderby$limit$class"; |
you cannot put get user class color in there that easily
you need to make a different query just for the "Uploader Name" and use format_username function on it to get color, disable sign, donate sign, warning sign, and other sign that might be and it doesn't have anything to do with browse.php |
Quote:
@DND you do not need to do a separate query just to get owner, that's the purpose of joins. Using format_username is possible but then you need more than just class and username. |
you can also use this in torrenttable_functions in the include
Do not need format_username at all in my v2 of mysqli this what ive done Code:
if ($variant == "index") |
ive done it that way for me and it works.
if it does the job and doesnt put much load on the db..its ok for me (im not talking about only of color class, but also of other things that are in format_username function) |
My code simply requires the userid and format_username handles everything.
|
Cool so everyone as a option in this thread to do one of them :drink:
|
ok guys….thanks for help….. only put in browse
PHP Code:
and PHP Code:
|
read my thread about this
https://www.bvlist.com/showthread.php?t=11871 https://www.bvlist.com/showthread.php?t=11871 |
|
Its easy when you know how mate:drink:
|
yes if you now but one more thing… how we get user color in Forums
|
Now this is one big write mate ill get the Code mysqli one of my HD and convert it back to mysql
|
ok mate Will wait :wave:
|
What tbdev do you have 08 or 09? Do you have original forums or multilayer forum from u232?
|
1 Attachment(s)
@BamBam0077, you asking me I have 08
here is my forums.php |
BamBam0077
Do not mess my thread up with your crap coding ive seen it and none if it works so keep of my thread Know all Know fuck all |
@Napon when you will post a user color for forums
Thanks |
2 Attachment(s)
so this is what your looking for this is 5.6 Plateform also ive coder to PHP7 Plateforms 7.2.10 7.1.31 7.2.20 7.2.30
|
All times are GMT +2. The time now is 08:17. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.